Makefile.am 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. # Copyright (C) 2011 Télécom-SudParis
  5. # Copyright (C) 2016 Uppsala University
  6. # Copyright (C) 2017 Erwan Leria
  7. #
  8. # StarPU is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Lesser General Public License as published by
  10. # the Free Software Foundation; either version 2.1 of the License, or (at
  11. # your option) any later version.
  12. #
  13. # StarPU is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. #
  17. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  18. #
  19. include $(top_srcdir)/starpu.mk
  20. AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
  21. AM_CXXFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CXXFLAGS) -Wno-unused
  22. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(MAGMA_LIBS) $(HWLOC_LIBS) @LIBS@ $(FXT_LIBS)
  23. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  24. AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@ $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
  25. SUBDIRS = stencil
  26. BUILT_SOURCES =
  27. if STARPU_USE_OPENCL
  28. nobase_STARPU_OPENCL_DATA_DATA =
  29. endif
  30. EXTRA_DIST = \
  31. README.txt \
  32. axpy/axpy.h \
  33. axpy/axpy_opencl_kernel.cl \
  34. basic_examples/vector_scal_opencl_kernel.cl \
  35. basic_examples/multiformat_types.h \
  36. basic_examples/multiformat_opencl_kernel.cl \
  37. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl \
  38. common/blas_model.c \
  39. spmd/vector_scal_spmd.c \
  40. spmv/spmv_cuda.cu \
  41. spmv/spmv_opencl.cl \
  42. spmv/matrix_market/examples/fidapm05.mtx \
  43. mult/xgemm.c \
  44. mult/sgemm.sh \
  45. lu/xlu.c \
  46. lu/xlu_pivot.c \
  47. lu/xlu_implicit.c \
  48. lu/xlu_implicit_pivot.c \
  49. lu/xlu_kernels.c \
  50. lu/lu_example.c \
  51. incrementer/incrementer_kernels_opencl_kernel.cl \
  52. basic_examples/variable_kernels_opencl_kernel.cl \
  53. matvecmult/matvecmult_kernel.cl \
  54. basic_examples/block_opencl_kernel.cl \
  55. filters/fblock_opencl_kernel.cl \
  56. filters/custom_mf/conversion_opencl.cl \
  57. filters/custom_mf/custom_opencl.cl \
  58. filters/custom_mf/custom_types.h \
  59. interface/complex_kernels.cl \
  60. reductions/dot_product.h \
  61. reductions/dot_product_opencl_kernels.cl \
  62. scheduler/schedulers.sh \
  63. scheduler/schedulers_context.sh \
  64. fortran/Makefile \
  65. sched_ctx/axpy_partition_gpu.h \
  66. sched_ctx/axpy_partition_gpu.cu \
  67. heat/heat.sh \
  68. cholesky/cholesky.sh \
  69. cholesky/cholesky_compiled.c \
  70. lu/lu.sh
  71. CLEANFILES = *.gcno *.gcda *.linkinfo *.mod starpu_idle_microsec.log *.mps *.dot *.pl *.png *.output tasks.rec perfs.rec perfs2.rec fortran90/starpu_mod.f90 native_fortran/fstarpu_mod.f90
  72. if STARPU_USE_CUDA
  73. if STARPU_COVERITY
  74. include $(top_srcdir)/starpu-mynvcc.mk
  75. else
  76. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(HWLOC_CFLAGS)
  77. .cu.o:
  78. $(V_nvcc) $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  79. endif
  80. endif
  81. if STARPU_HAVE_ICC
  82. .icc.o:
  83. $(V_icc) $(ICC) -x c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $< -c -o $@
  84. endif
  85. examplebindir = $(libdir)/starpu/examples/
  86. examplebin_PROGRAMS =
  87. noinst_HEADERS = \
  88. axpy/axpy.h \
  89. cg/cg.h \
  90. heat/lu_kernels_model.h \
  91. heat/dw_sparse_cg.h \
  92. heat/heat.h \
  93. heat/dw_factolu.h \
  94. lu/xlu.h \
  95. lu/xlu_kernels.h \
  96. lu/lu-float.h \
  97. lu/lu-double.h \
  98. lu/complex_float.h \
  99. lu/complex_double.h \
  100. lu/blas_complex.h \
  101. cholesky/cholesky.h \
  102. sched_ctx_utils/sched_ctx_utils.h \
  103. common/blas_model.h \
  104. common/blas.h \
  105. mult/simple.h \
  106. mult/double.h \
  107. fortran/StarPU_fortran.h \
  108. ppm_downscaler/ppm_downscaler.h \
  109. ppm_downscaler/yuv_downscaler.h \
  110. spmv/matrix_market/mmio.h \
  111. spmv/matrix_market/mm_to_bcsr.h \
  112. spmv/spmv.h \
  113. spmv/dw_block_spmv.h \
  114. basic_examples/multiformat_types.h \
  115. filters/custom_mf/custom_interface.h \
  116. filters/custom_mf/custom_types.h \
  117. interface/complex_interface.h \
  118. interface/complex_codelet.h \
  119. pi/pi.h \
  120. pi/SobolQRNG/sobol.h \
  121. pi/SobolQRNG/sobol_gold.h \
  122. pi/SobolQRNG/sobol_gpu.h \
  123. pi/SobolQRNG/sobol_primitives.h \
  124. reductions/dot_product.h \
  125. basic_examples/vector_scal_cpu_template.h \
  126. sched_ctx/axpy_partition_gpu.h
  127. #####################################
  128. # What to install and what to check #
  129. #####################################
  130. examplebin_PROGRAMS += $(STARPU_EXAMPLES)
  131. TESTS = $(SHELL_TESTS) $(STARPU_EXAMPLES)
  132. SHELL_TESTS =
  133. if !STARPU_USE_MPI_MASTER_SLAVE
  134. SHELL_TESTS += scheduler/schedulers.sh
  135. SHELL_TESTS += scheduler/schedulers_context.sh
  136. if !NO_BLAS_LIB
  137. SHELL_TESTS += mult/sgemm.sh
  138. endif
  139. endif
  140. check_PROGRAMS = $(STARPU_EXAMPLES)
  141. noinst_PROGRAMS =
  142. if !STARPU_HAVE_WINDOWS
  143. ## test loader program
  144. if !STARPU_CROSS_COMPILING
  145. LOADER = loader
  146. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  147. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  148. loader_SOURCES = ../tests/loader.c
  149. noinst_PROGRAMS += loader
  150. else
  151. LOADER =
  152. LOADER_BIN = $(top_builddir)/examples/loader-cross.sh
  153. endif
  154. if STARPU_USE_MPI_MASTER_SLAVE
  155. LOADER_BIN2 = $(MPI_LAUNCHER) $(LOADER_BIN)
  156. else
  157. LOADER_BIN2 = $(LOADER_BIN)
  158. endif
  159. if STARPU_HAVE_AM111
  160. TESTS_ENVIRONMENT = $(MPI_RUN_ARGS) top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  161. LOG_COMPILER = $(LOADER_BIN2)
  162. else
  163. TESTS_ENVIRONMENT = $(MPI_RUN_ARGS) top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN2)
  164. endif
  165. endif
  166. # STARPU_EXAMPLES list all applications which have to be compiled and checked
  167. # Applications which should only be compiled are added directly in examplebin_PROGRAMS
  168. # see for instance mandelbrot/mandelbrot
  169. STARPU_EXAMPLES =
  170. STARPU_EXAMPLES += \
  171. sched_ctx/prio \
  172. scheduler/dummy_sched \
  173. scheduler/dummy_modular_sched \
  174. worker_collections/worker_list_example \
  175. api/bcsr_data_interface \
  176. api/block_data_interface \
  177. api/coo_data_interface \
  178. api/csr_data_interface \
  179. api/matrix_data_interface \
  180. api/multiformat_data_interface \
  181. api/variable_data_interface \
  182. api/vector_data_interface \
  183. api/void_data_interface
  184. if !STARPU_SIMGRID
  185. STARPU_EXAMPLES += \
  186. basic_examples/hello_world \
  187. basic_examples/topology \
  188. basic_examples/vector_scal \
  189. basic_examples/mult \
  190. basic_examples/mult-fpga \
  191. basic_examples/block \
  192. basic_examples/variable \
  193. basic_examples/multiformat \
  194. basic_examples/dynamic_handles \
  195. basic_examples/task_insert_color \
  196. mlr/mlr \
  197. cpp/incrementer_cpp \
  198. cpp/add_vectors \
  199. cpp/add_vectors_interface \
  200. filters/fvector \
  201. filters/fblock \
  202. filters/fmatrix \
  203. filters/fmultiple_manual \
  204. filters/fmultiple_submit \
  205. filters/fmultiple_submit_readonly \
  206. filters/fmultiple_submit_implicit \
  207. filters/frecursive \
  208. filters/fplan_notautomatic \
  209. tag_example/tag_example \
  210. tag_example/tag_example2 \
  211. tag_example/tag_example3 \
  212. tag_example/tag_example4 \
  213. tag_example/tag_restartable \
  214. spmd/vector_scal_spmd \
  215. spmv/spmv \
  216. callback/callback \
  217. callback/prologue \
  218. incrementer/incrementer \
  219. binary/binary \
  220. interface/complex \
  221. matvecmult/matvecmult \
  222. profiling/profiling \
  223. perf_monitoring/perf_counters_01 \
  224. perf_monitoring/perf_counters_02 \
  225. perf_steering/perf_knobs_01 \
  226. perf_steering/perf_knobs_02 \
  227. perf_steering/perf_knobs_03 \
  228. scheduler/heteroprio_test \
  229. sched_ctx/sched_ctx \
  230. sched_ctx/sched_ctx_empty \
  231. sched_ctx/sched_ctx_delete \
  232. sched_ctx/two_cpu_contexts \
  233. sched_ctx/dummy_sched_with_ctx \
  234. worker_collections/worker_tree_example \
  235. reductions/dot_product \
  236. reductions/minmax_reduction \
  237. dependency/task_end_dep \
  238. dependency/task_end_dep_add \
  239. dependency/sequential_consistency
  240. endif
  241. if !STARPU_SIMGRID
  242. STARPU_EXAMPLES += \
  243. scheduler/dummy_sched
  244. if STARPU_HAVE_CXX11
  245. STARPU_EXAMPLES += \
  246. cpp/add_vectors_cpp11
  247. endif
  248. if STARPU_HAVE_F77
  249. if STARPU_HAVE_F77_H
  250. STARPU_EXAMPLES += \
  251. fortran/hello
  252. endif
  253. STARPU_EXAMPLES += \
  254. basic_examples/vector_scal_fortran
  255. endif
  256. if STARPU_HAVE_FC
  257. if !STARPU_SANITIZE
  258. STARPU_EXAMPLES += \
  259. fortran90/f90_example \
  260. native_fortran/nf_vector \
  261. native_fortran/nf_matrix \
  262. native_fortran/nf_example \
  263. native_fortran/nf_dynbuf \
  264. native_fortran/nf_varbuf \
  265. native_fortran/nf_sched_ctx \
  266. native_fortran/nf_partition
  267. endif
  268. endif
  269. endif
  270. if !NO_BLAS_LIB
  271. STARPU_EXAMPLES += \
  272. mult/sgemm \
  273. mult/dgemm \
  274. lu/lu_example_float \
  275. lu/lu_example_double \
  276. lu/lu_implicit_example_float \
  277. lu/lu_implicit_example_double \
  278. cholesky/cholesky_tag \
  279. cholesky/cholesky_tile_tag \
  280. cholesky/cholesky_implicit \
  281. cholesky/cholesky_compil
  282. if !STARPU_SIMGRID
  283. STARPU_EXAMPLES += \
  284. axpy/axpy \
  285. cholesky/cholesky_grain_tag \
  286. heat/heat \
  287. cg/cg \
  288. pipeline/pipeline
  289. if !STARPU_USE_MPI_MASTER_SLAVE
  290. SHELL_TESTS += \
  291. heat/heat.sh \
  292. lu/lu.sh
  293. endif
  294. endif
  295. if STARPU_SIMGRID
  296. if !STARPU_QUICK_CHECK
  297. SHELL_TESTS += \
  298. cholesky/cholesky.sh
  299. endif
  300. endif
  301. endif
  302. if !STARPU_SIMGRID
  303. if MKL_BLAS_LIB
  304. STARPU_EXAMPLES += \
  305. lu/lu_example_complex_float \
  306. lu/lu_example_complex_double \
  307. lu/lu_implicit_example_complex_float \
  308. lu/lu_implicit_example_complex_double
  309. endif
  310. if STARPU_HAVE_CBLAS_H
  311. STARPU_EXAMPLES += \
  312. spmv/dw_block_spmv
  313. endif
  314. if !STARPU_SIMGRID
  315. if STARPU_HAVE_F77
  316. if STARPU_HAVE_F77_H
  317. STARPU_EXAMPLES += \
  318. fortran/hello
  319. endif
  320. STARPU_EXAMPLES += \
  321. basic_examples/vector_scal_fortran
  322. endif
  323. endif
  324. if STARPU_HAVE_OPENMP
  325. STARPU_EXAMPLES += \
  326. openmp/vector_scal_omp \
  327. sched_ctx/sched_ctx_without_sched_policy\
  328. sched_ctx/nested_sched_ctxs \
  329. sched_ctx/sched_ctx_without_sched_policy_awake\
  330. sched_ctx/parallel_tasks_reuse_handle \
  331. sched_ctx/parallel_code
  332. if STARPU_HAVE_HWLOC
  333. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  334. STARPU_EXAMPLES += \
  335. sched_ctx/parallel_tasks_with_cluster_api
  336. endif
  337. endif
  338. endif
  339. endif !STARPU_SIMGRID
  340. if STARPU_USE_CUDA
  341. STARPU_EXAMPLES += \
  342. sched_ctx/gpu_partition
  343. sched_ctx_gpu_partition_SOURCES = \
  344. sched_ctx/gpu_partition.c \
  345. sched_ctx/axpy_partition_gpu.cu
  346. endif
  347. ##################
  348. # Basic examples #
  349. ##################
  350. basic_examples_vector_scal_SOURCES = \
  351. basic_examples/vector_scal.c \
  352. basic_examples/vector_scal_cpu.c
  353. if STARPU_HAVE_ICC
  354. if STARPU_CROSS_COMPILING
  355. basic_examples_vector_scal_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) $(basic_examples_vector_scal_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  356. else
  357. basic_examples_vector_scal_SOURCES += \
  358. basic_examples/vector_scal_cpu_icc.icc
  359. basic_examples_vector_scal_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(ICC) $(basic_examples_vector_scal_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  360. endif
  361. else
  362. basic_examples_vector_scal_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) $(basic_examples_vector_scal_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  363. endif
  364. if STARPU_USE_CUDA
  365. basic_examples_vector_scal_SOURCES += \
  366. basic_examples/vector_scal_cuda.cu
  367. endif
  368. if STARPU_USE_OPENCL
  369. basic_examples_vector_scal_SOURCES += \
  370. basic_examples/vector_scal_opencl.c
  371. nobase_STARPU_OPENCL_DATA_DATA += \
  372. basic_examples/vector_scal_opencl_kernel.cl
  373. endif
  374. if STARPU_HAVE_F77
  375. basic_examples_vector_scal_fortran_SOURCES = \
  376. basic_examples/vector_scal_fortran.F \
  377. basic_examples/vector_scal_c.c \
  378. basic_examples/vector_scal_cpu.c
  379. if STARPU_USE_CUDA
  380. basic_examples_vector_scal_fortran_SOURCES += \
  381. basic_examples/vector_scal_cuda.cu
  382. basic_examples_vector_scal_fortran_LDADD = \
  383. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  384. endif
  385. if STARPU_HAVE_F77_H
  386. fortran_hello_SOURCES = \
  387. fortran/hello_c.c \
  388. fortran/hello.F \
  389. fortran/StarPU_fortran.h
  390. endif
  391. endif
  392. if STARPU_HAVE_FC
  393. fortran90_f90_example_SOURCES = \
  394. fortran90/mod_types.f90 \
  395. fortran90/starpu_mod.f90 \
  396. fortran90/mod_interface.f90 \
  397. fortran90/mod_compute.f90 \
  398. fortran90/marshalling.c \
  399. fortran90/f90_example.f90
  400. native_fortran_nf_vector_SOURCES = \
  401. native_fortran/nf_codelets.f90 \
  402. native_fortran/fstarpu_mod.f90 \
  403. native_fortran/nf_vector.f90
  404. native_fortran_nf_matrix_SOURCES = \
  405. native_fortran/nf_codelets.f90 \
  406. native_fortran/fstarpu_mod.f90 \
  407. native_fortran/nf_matrix.f90
  408. native_fortran_nf_example_SOURCES = \
  409. native_fortran/nf_types.f90 \
  410. native_fortran/nf_compute.f90 \
  411. native_fortran/fstarpu_mod.f90 \
  412. native_fortran/nf_example.f90
  413. native_fortran_nf_dynbuf_SOURCES = \
  414. native_fortran/nf_dynbuf_cl.f90 \
  415. native_fortran/fstarpu_mod.f90 \
  416. native_fortran/nf_dynbuf.f90
  417. native_fortran_nf_varbuf_SOURCES = \
  418. native_fortran/nf_varbuf_cl.f90 \
  419. native_fortran/fstarpu_mod.f90 \
  420. native_fortran/nf_varbuf.f90
  421. native_fortran_nf_sched_ctx_SOURCES = \
  422. native_fortran/nf_sched_ctx_cl.f90 \
  423. native_fortran/fstarpu_mod.f90 \
  424. native_fortran/nf_sched_ctx.f90
  425. native_fortran_nf_partition_SOURCES = \
  426. native_fortran/nf_partition_cl.f90 \
  427. native_fortran/fstarpu_mod.f90 \
  428. native_fortran/nf_partition.f90
  429. endif
  430. #######################
  431. # Multiformat example #
  432. #######################
  433. basic_examples_multiformat_SOURCES = \
  434. basic_examples/multiformat.c \
  435. basic_examples/multiformat_conversion_codelets.c
  436. if STARPU_USE_CUDA
  437. basic_examples_multiformat_SOURCES += \
  438. basic_examples/multiformat_cuda.cu \
  439. basic_examples/multiformat_conversion_codelets_cuda.cu
  440. endif
  441. if STARPU_USE_OPENCL
  442. basic_examples_multiformat_SOURCES += \
  443. basic_examples/multiformat_opencl.c \
  444. basic_examples/multiformat_conversion_codelets_opencl.c
  445. nobase_STARPU_OPENCL_DATA_DATA += \
  446. basic_examples/multiformat_opencl_kernel.cl \
  447. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  448. endif
  449. #################
  450. # block example #
  451. #################
  452. basic_examples_block_SOURCES = \
  453. basic_examples/block.c \
  454. basic_examples/block_cpu.c
  455. if STARPU_USE_CUDA
  456. basic_examples_block_SOURCES += \
  457. basic_examples/block_cuda.cu
  458. endif
  459. if STARPU_USE_OPENCL
  460. basic_examples_block_SOURCES += \
  461. basic_examples/block_opencl.c
  462. nobase_STARPU_OPENCL_DATA_DATA += \
  463. basic_examples/block_opencl_kernel.cl
  464. endif
  465. if STARPU_USE_FPGA
  466. basic_examples_mmult_SOURCES = \
  467. basic_examples/mult-fpga.c
  468. endif
  469. ####################
  470. # Variable example #
  471. ####################
  472. basic_examples_variable_SOURCES = \
  473. basic_examples/variable.c \
  474. basic_examples/variable_kernels_cpu.c
  475. if STARPU_USE_CUDA
  476. basic_examples_variable_SOURCES += \
  477. basic_examples/variable_kernels.cu
  478. endif
  479. if STARPU_USE_OPENCL
  480. basic_examples_variable_SOURCES += \
  481. basic_examples/variable_kernels_opencl.c
  482. nobase_STARPU_OPENCL_DATA_DATA += \
  483. basic_examples/variable_kernels_opencl_kernel.cl
  484. endif
  485. ###########
  486. # Filters #
  487. ###########
  488. filters_fblock_SOURCES = \
  489. filters/fblock.c \
  490. filters/fblock_cpu.c
  491. if STARPU_USE_CUDA
  492. filters_fblock_SOURCES += \
  493. filters/fblock_cuda.cu
  494. endif
  495. if STARPU_USE_OPENCL
  496. filters_fblock_SOURCES += \
  497. filters/fblock_opencl.c
  498. nobase_STARPU_OPENCL_DATA_DATA += \
  499. filters/fblock_opencl_kernel.cl
  500. endif
  501. filters_fmultiple_manual_SOURCES = \
  502. filters/fmultiple_manual.c
  503. if STARPU_USE_CUDA
  504. filters_fmultiple_manual_SOURCES += \
  505. filters/fmultiple_cuda.cu
  506. endif
  507. filters_fmultiple_submit_SOURCES = \
  508. filters/fmultiple_submit.c
  509. if STARPU_USE_CUDA
  510. filters_fmultiple_submit_SOURCES += \
  511. filters/fmultiple_cuda.cu
  512. endif
  513. filters_fmultiple_submit_readonly_SOURCES = \
  514. filters/fmultiple_submit_readonly.c
  515. if STARPU_USE_CUDA
  516. filters_fmultiple_submit_readonly_SOURCES += \
  517. filters/fmultiple_cuda.cu
  518. endif
  519. filters_fmultiple_submit_implicit_SOURCES = \
  520. filters/fmultiple_submit_implicit.c
  521. if STARPU_USE_CUDA
  522. filters_fmultiple_submit_implicit_SOURCES += \
  523. filters/fmultiple_cuda.cu
  524. endif
  525. examplebin_PROGRAMS += \
  526. filters/shadow \
  527. filters/shadow2d \
  528. filters/shadow3d
  529. #############################
  530. # Custom multiformat filter #
  531. #############################
  532. #TODO: see why the application is failing
  533. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  534. examplebin_PROGRAMS += \
  535. filters/custom_mf/custom_mf_filter
  536. filters_custom_mf_custom_mf_filter_SOURCES=\
  537. filters/custom_mf/custom_mf_filter.c \
  538. filters/custom_mf/custom_interface.c \
  539. filters/custom_mf/custom_conversion_codelets.c
  540. if STARPU_USE_CUDA
  541. filters_custom_mf_custom_mf_filter_SOURCES += \
  542. filters/custom_mf/conversion.cu \
  543. filters/custom_mf/cuda.cu
  544. endif
  545. if STARPU_USE_OPENCL
  546. filters_custom_mf_custom_mf_filter_SOURCES += \
  547. filters/custom_mf/conversion_opencl.c \
  548. filters/custom_mf/custom_opencl.c
  549. nobase_STARPU_OPENCL_DATA_DATA += \
  550. filters/custom_mf/conversion_opencl.cl \
  551. filters/custom_mf/custom_opencl.cl
  552. endif
  553. ################
  554. # AXPY example #
  555. ################
  556. if !NO_BLAS_LIB
  557. axpy_axpy_SOURCES = \
  558. axpy/axpy.c \
  559. common/blas.c
  560. if STARPU_USE_OPENCL
  561. axpy_axpy_SOURCES += \
  562. axpy/axpy_opencl.c
  563. nobase_STARPU_OPENCL_DATA_DATA += \
  564. axpy/axpy_opencl_kernel.cl
  565. endif
  566. axpy_axpy_LDADD = \
  567. $(STARPU_BLAS_LDFLAGS)
  568. endif
  569. ################
  570. # Mult example #
  571. ################
  572. if !NO_BLAS_LIB
  573. mult_sgemm_SOURCES = \
  574. mult/sgemm.c \
  575. common/blas.c
  576. mult_sgemm_LDADD = \
  577. $(STARPU_BLAS_LDFLAGS)
  578. mult_dgemm_SOURCES = \
  579. mult/dgemm.c \
  580. common/blas.c
  581. mult_dgemm_LDADD = \
  582. $(STARPU_BLAS_LDFLAGS)
  583. endif
  584. ####################
  585. # Cholesky example #
  586. ####################
  587. if !NO_BLAS_LIB
  588. cholesky_cholesky_tag_SOURCES = \
  589. cholesky/cholesky_tag.c \
  590. cholesky/cholesky_models.c \
  591. cholesky/cholesky_kernels.c \
  592. common/blas.c
  593. cholesky_cholesky_tag_LDADD = \
  594. $(STARPU_BLAS_LDFLAGS)
  595. cholesky_cholesky_tile_tag_SOURCES = \
  596. cholesky/cholesky_tile_tag.c \
  597. cholesky/cholesky_models.c \
  598. cholesky/cholesky_kernels.c \
  599. common/blas.c
  600. cholesky_cholesky_tile_tag_LDADD = \
  601. $(STARPU_BLAS_LDFLAGS)
  602. cholesky_cholesky_grain_tag_SOURCES = \
  603. cholesky/cholesky_grain_tag.c \
  604. cholesky/cholesky_models.c \
  605. cholesky/cholesky_kernels.c \
  606. common/blas.c
  607. cholesky_cholesky_grain_tag_LDADD = \
  608. $(STARPU_BLAS_LDFLAGS)
  609. cholesky_cholesky_implicit_SOURCES = \
  610. cholesky/cholesky_implicit.c \
  611. cholesky/cholesky_models.c \
  612. cholesky/cholesky_kernels.c \
  613. sched_ctx_utils/sched_ctx_utils.c \
  614. common/blas.c
  615. cholesky_cholesky_implicit_LDADD = \
  616. $(STARPU_BLAS_LDFLAGS)
  617. cholesky_cholesky_compil_SOURCES = \
  618. cholesky/cholesky_compil.c \
  619. cholesky/cholesky_models.c \
  620. cholesky/cholesky_kernels.c \
  621. sched_ctx_utils/sched_ctx_utils.c \
  622. common/blas.c
  623. cholesky_cholesky_compil_LDADD = \
  624. $(STARPU_BLAS_LDFLAGS)
  625. endif
  626. ##############
  627. # LU example #
  628. ##############
  629. if !NO_BLAS_LIB
  630. lu_lu_example_float_SOURCES = \
  631. lu/lu_example_float.c \
  632. lu/slu.c \
  633. lu/slu_pivot.c \
  634. lu/slu_kernels.c \
  635. common/blas.c
  636. lu_lu_example_float_LDADD = \
  637. $(STARPU_BLAS_LDFLAGS)
  638. lu_lu_example_double_SOURCES = \
  639. lu/lu_example_double.c \
  640. lu/dlu.c \
  641. lu/dlu_pivot.c \
  642. lu/dlu_kernels.c \
  643. common/blas.c
  644. lu_lu_example_double_LDADD = \
  645. $(STARPU_BLAS_LDFLAGS)
  646. lu_lu_implicit_example_float_SOURCES = \
  647. lu/lu_example_float.c \
  648. lu/slu_implicit.c \
  649. lu/slu_implicit_pivot.c \
  650. lu/slu_kernels.c \
  651. common/blas.c
  652. lu_lu_implicit_example_float_LDADD = \
  653. $(STARPU_BLAS_LDFLAGS)
  654. lu_lu_implicit_example_double_SOURCES = \
  655. lu/lu_example_double.c \
  656. lu/dlu_implicit.c \
  657. lu/dlu_implicit_pivot.c \
  658. lu/dlu_kernels.c \
  659. common/blas.c
  660. lu_lu_implicit_example_double_LDADD = \
  661. $(STARPU_BLAS_LDFLAGS)
  662. if MKL_BLAS_LIB
  663. lu_lu_example_complex_float_SOURCES = \
  664. lu/lu_example_complex_float.c \
  665. lu/clu.c \
  666. lu/clu_pivot.c \
  667. lu/clu_kernels.c \
  668. lu/blas_complex.c \
  669. common/blas.c
  670. lu_lu_example_complex_float_LDADD = \
  671. $(STARPU_BLAS_LDFLAGS)
  672. lu_lu_implicit_example_complex_float_SOURCES = \
  673. lu/lu_example_complex_float.c \
  674. lu/clu_implicit.c \
  675. lu/clu_implicit_pivot.c \
  676. lu/clu_kernels.c \
  677. lu/blas_complex.c \
  678. common/blas.c
  679. lu_lu_implicit_example_complex_float_LDADD = \
  680. $(STARPU_BLAS_LDFLAGS)
  681. lu_lu_example_complex_double_SOURCES = \
  682. lu/lu_example_complex_double.c \
  683. lu/zlu.c \
  684. lu/zlu_pivot.c \
  685. lu/zlu_kernels.c \
  686. lu/blas_complex.c \
  687. common/blas.c
  688. lu_lu_example_complex_double_LDADD = \
  689. $(STARPU_BLAS_LDFLAGS)
  690. lu_lu_implicit_example_complex_double_SOURCES = \
  691. lu/lu_example_complex_double.c \
  692. lu/zlu_implicit.c \
  693. lu/zlu_implicit_pivot.c \
  694. lu/zlu_kernels.c \
  695. lu/blas_complex.c \
  696. common/blas.c
  697. lu_lu_implicit_example_complex_double_LDADD = \
  698. $(STARPU_BLAS_LDFLAGS)
  699. endif
  700. endif
  701. ################
  702. # Heat example #
  703. ################
  704. if !NO_BLAS_LIB
  705. heat_heat_SOURCES = \
  706. heat/heat.c \
  707. heat/dw_factolu.c \
  708. heat/dw_factolu_tag.c \
  709. heat/dw_factolu_grain.c \
  710. heat/dw_sparse_cg.c \
  711. heat/heat_display.c \
  712. heat/lu_kernels_model.c \
  713. heat/dw_sparse_cg_kernels.c \
  714. heat/dw_factolu_kernels.c \
  715. common/blas.c
  716. heat_heat_LDADD = \
  717. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  718. $(STARPU_BLAS_LDFLAGS)
  719. endif
  720. ##############
  721. # CG example #
  722. ##############
  723. if !NO_BLAS_LIB
  724. cg_cg_SOURCES = \
  725. cg/cg.c \
  726. cg/cg_kernels.c \
  727. common/blas.c
  728. cg_cg_LDADD = \
  729. $(STARPU_BLAS_LDFLAGS)
  730. endif
  731. ################
  732. # SPMD example #
  733. ################
  734. spmd_vector_scal_spmd_SOURCES = \
  735. spmd/vector_scal_spmd.c
  736. ################
  737. # SpMV example #
  738. ################
  739. spmv_spmv_SOURCES = \
  740. spmv/spmv.c \
  741. spmv/spmv_kernels.c
  742. if STARPU_USE_CUDA
  743. spmv_spmv_SOURCES += \
  744. spmv/spmv_cuda.cu
  745. endif
  746. spmv_dw_block_spmv_SOURCES = \
  747. spmv/dw_block_spmv.c \
  748. spmv/dw_block_spmv_kernels.c \
  749. spmv/matrix_market/mm_to_bcsr.c \
  750. spmv/matrix_market/mmio.c
  751. spmv_dw_block_spmv_LDADD = \
  752. $(STARPU_BLAS_LDFLAGS)
  753. ###########################
  754. # C++ Incrementer example #
  755. ###########################
  756. cpp_incrementer_cpp_SOURCES = \
  757. cpp/incrementer_cpp.cpp
  758. if STARPU_USE_CUDA
  759. cpp_incrementer_cpp_SOURCES += \
  760. incrementer/incrementer_kernels.cu
  761. endif
  762. if STARPU_USE_OPENCL
  763. cpp_incrementer_cpp_SOURCES += \
  764. incrementer/incrementer_kernels_opencl.c
  765. endif
  766. ###########################
  767. # C++ Add vectors example #
  768. ###########################
  769. cpp_add_vectors_SOURCES = \
  770. cpp/add_vectors.cpp
  771. cpp_add_vectors_interface_SOURCES = \
  772. cpp/add_vectors_interface.cpp
  773. if STARPU_HAVE_CXX11
  774. cpp_add_vectors_cpp11_SOURCES = \
  775. cpp/add_vectors_cpp11.cpp
  776. endif
  777. #######################
  778. # Incrementer example #
  779. #######################
  780. incrementer_incrementer_SOURCES = \
  781. incrementer/incrementer.c
  782. if STARPU_USE_CUDA
  783. incrementer_incrementer_SOURCES += \
  784. incrementer/incrementer_kernels.cu
  785. endif
  786. if STARPU_USE_OPENCL
  787. incrementer_incrementer_SOURCES += \
  788. incrementer/incrementer_kernels_opencl.c
  789. nobase_STARPU_OPENCL_DATA_DATA += \
  790. incrementer/incrementer_kernels_opencl_kernel.cl
  791. endif
  792. ##################
  793. # Binary example #
  794. ##################
  795. binary_binary_SOURCES = \
  796. binary/binary.c
  797. if STARPU_USE_OPENCL
  798. binary_binary_SOURCES += \
  799. incrementer/incrementer_kernels_opencl.c
  800. endif
  801. #####################
  802. # interface example #
  803. #####################
  804. interface_complex_SOURCES = \
  805. interface/complex.c \
  806. interface/complex_interface.c \
  807. interface/complex_filters.c
  808. if STARPU_USE_CUDA
  809. interface_complex_SOURCES += \
  810. interface/complex_kernels.cu
  811. endif
  812. if STARPU_USE_OPENCL
  813. interface_complex_SOURCES +=\
  814. interface/complex_kernels_opencl.c
  815. nobase_STARPU_OPENCL_DATA_DATA += \
  816. interface/complex_kernels.cl
  817. endif
  818. ######################
  819. # matVecMult example #
  820. ######################
  821. if STARPU_USE_OPENCL
  822. nobase_STARPU_OPENCL_DATA_DATA += \
  823. matvecmult/matvecmult_kernel.cl
  824. endif
  825. #######################
  826. # dot_product example #
  827. #######################
  828. reductions_dot_product_SOURCES = \
  829. reductions/dot_product.c
  830. if STARPU_USE_CUDA
  831. reductions_dot_product_SOURCES += \
  832. reductions/dot_product_kernels.cu
  833. endif
  834. if STARPU_USE_OPENCL
  835. nobase_STARPU_OPENCL_DATA_DATA += \
  836. reductions/dot_product_opencl_kernels.cl
  837. endif
  838. ##################
  839. # Mandelbrot Set #
  840. ##################
  841. examplebin_PROGRAMS += \
  842. mandelbrot/mandelbrot
  843. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  844. if HAVE_X11
  845. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  846. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
  847. endif
  848. ####################
  849. # Image downscaler #
  850. ####################
  851. examplebin_PROGRAMS += \
  852. ppm_downscaler/ppm_downscaler \
  853. ppm_downscaler/yuv_downscaler
  854. ######
  855. # Pi #
  856. ######
  857. if !STARPU_HAVE_WINDOWS
  858. examplebin_PROGRAMS += \
  859. pi/pi \
  860. pi/pi_redux
  861. pi_pi_SOURCES = \
  862. pi/pi.c \
  863. pi/SobolQRNG/sobol_gold.c \
  864. pi/SobolQRNG/sobol_primitives.c
  865. if STARPU_USE_CUDA
  866. pi_pi_SOURCES += \
  867. pi/pi_kernel.cu \
  868. pi/SobolQRNG/sobol_gpu.cu
  869. endif
  870. pi_pi_redux_SOURCES = \
  871. pi/pi_redux.c
  872. if STARPU_USE_CUDA
  873. pi_pi_redux_SOURCES += \
  874. pi/pi_redux_kernel.cu
  875. pi_pi_redux_LDADD = \
  876. $(STARPU_CURAND_LDFLAGS)
  877. endif
  878. endif
  879. ###########################
  880. # OpenGL interoperability #
  881. ###########################
  882. if HAVE_OPENGL
  883. examplebin_PROGRAMS += \
  884. gl_interop/gl_interop \
  885. gl_interop/gl_interop_idle
  886. gl_interop_gl_interop_SOURCES = \
  887. gl_interop/gl_interop.c
  888. gl_interop_gl_interop_LDADD = \
  889. $(STARPU_OPENGL_RENDER_LDFLAGS)
  890. gl_interop_gl_interop_idle_SOURCES = \
  891. gl_interop/gl_interop_idle.c
  892. gl_interop_gl_interop_idle_LDADD = \
  893. $(STARPU_OPENGL_RENDER_LDFLAGS)
  894. endif
  895. ####################
  896. # pipeline example #
  897. ####################
  898. if !NO_BLAS_LIB
  899. pipeline_pipeline_SOURCES = \
  900. pipeline/pipeline.c \
  901. common/blas.c
  902. pipeline_pipeline_LDADD = \
  903. $(STARPU_BLAS_LDFLAGS)
  904. endif
  905. ##################
  906. # openmp example #
  907. ##################
  908. if STARPU_HAVE_OPENMP
  909. openmp_vector_scal_omp_CFLAGS = \
  910. $(AM_CFLAGS) -fopenmp
  911. sched_ctx_parallel_code_CFLAGS = \
  912. $(AM_CFLAGS) -fopenmp
  913. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  914. $(AM_CFLAGS) -fopenmp
  915. sched_ctx_nested_sched_ctxs_CFLAGS = \
  916. $(AM_CFLAGS) -fopenmp
  917. sched_ctx_parallel_tasks_reuse_handle_CFLAGS = \
  918. $(AM_CFLAGS) -fopenmp
  919. endif
  920. # - link over source file to build our own object
  921. fortran90/starpu_mod.f90:
  922. @$(MKDIR_P) $(dir $@)
  923. $(V_ln) $(LN_S) $(abs_top_srcdir)/include/$(notdir $@) $@
  924. native_fortran/fstarpu_mod.f90:
  925. @$(MKDIR_P) $(dir $@)
  926. $(V_ln) $(LN_S) $(abs_top_srcdir)/include/$(notdir $@) $@
  927. if STARPU_HAVE_FC
  928. # Fortran90 example
  929. # - express the creation of .mod along .o
  930. starpu_mod.mod: fortran90/starpu_mod.o
  931. mod_types.mod: fortran90/mod_types.o
  932. mod_compute.mod: fortran90/mod_compute.o
  933. mod_interface.mod: fortran90/mod_interface.o
  934. # - list explicit dependences to control proper module files dependencies
  935. fortran90/mod_compute.o: mod_types.mod mod_interface.mod starpu_mod.mod
  936. fortran90/f90_example.o: mod_types.mod mod_interface.mod mod_compute.mod starpu_mod.mod
  937. # Native Fortran example
  938. # - express the creation of .mod along .o
  939. fstarpu_mod.mod: native_fortran/fstarpu_mod.o
  940. nf_codelets.mod: native_fortran/nf_codelets.o
  941. nf_compute.mod: native_fortran/nf_compute.o
  942. nf_dynbuf_cl.mod: native_fortran/nf_dynbuf_cl.o
  943. nf_partition_cl.mod: native_fortran/nf_partition_cl.o
  944. nf_sched_ctx_cl.mod: native_fortran/nf_sched_ctx_cl.o
  945. nf_types.mod: native_fortran/nf_types.o
  946. nf_varbuf_cl.mod: native_fortran/nf_varbuf_cl.o
  947. # - list explicit dependences to control proper module files dependencies
  948. native_fortran/nf_codelets.o: fstarpu_mod.mod
  949. native_fortran/nf_compute.o: nf_types.mod fstarpu_mod.mod
  950. native_fortran/nf_dynbuf_cl.o: fstarpu_mod.mod
  951. native_fortran/nf_dynbuf.o: nf_dynbuf_cl.mod fstarpu_mod.mod
  952. native_fortran/nf_example.o: nf_types.mod nf_compute.mod fstarpu_mod.mod
  953. native_fortran/nf_matrix.o: nf_codelets.mod fstarpu_mod.mod
  954. native_fortran/nf_partition_cl.o: fstarpu_mod.mod
  955. native_fortran/nf_partition.o: nf_partition_cl.mod fstarpu_mod.mod
  956. native_fortran/nf_sched_ctx_cl.o: fstarpu_mod.mod
  957. native_fortran/nf_sched_ctx.o: nf_sched_ctx_cl.mod fstarpu_mod.mod
  958. native_fortran/nf_varbuf_cl.o: fstarpu_mod.mod
  959. native_fortran/nf_varbuf.o: nf_varbuf_cl.mod fstarpu_mod.mod
  960. native_fortran/nf_vector.o: nf_codelets.mod fstarpu_mod.mod
  961. endif