Makefile.am 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2021 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) -Wno-unused
  21. AM_CXXFLAGS += $(MAGMA_CFLAGS) -Wno-unused
  22. AM_FFLAGS += $(MAGMA_CFLAGS) -Wno-unused -Wno-unused-dummy-argument
  23. AM_FCFLAGS += $(MAGMA_CFLAGS) -Wno-unused -Wno-unused-dummy-argument
  24. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include $(STARPU_H_CPPFLAGS)
  25. AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
  26. LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
  27. LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
  28. LIBS += $(MAGMA_LIBS)
  29. SUBDIRS = stencil
  30. BUILT_SOURCES =
  31. if STARPU_USE_OPENCL
  32. nobase_STARPU_OPENCL_DATA_DATA =
  33. endif
  34. EXTRA_DIST = \
  35. README.txt \
  36. axpy/axpy.h \
  37. axpy/axpy_opencl_kernel.cl \
  38. basic_examples/vector_scal_opencl_kernel.cl \
  39. basic_examples/multiformat_types.h \
  40. basic_examples/multiformat_opencl_kernel.cl \
  41. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl \
  42. common/blas_model.c \
  43. spmd/vector_scal_spmd.c \
  44. spmv/spmv_cuda.cu \
  45. spmv/spmv_opencl.cl \
  46. spmv/matrix_market/examples/fidapm05.mtx \
  47. mult/xgemm.c \
  48. mult/sgemm.sh \
  49. lu/xlu.c \
  50. lu/xlu_pivot.c \
  51. lu/xlu_implicit.c \
  52. lu/xlu_implicit_pivot.c \
  53. lu/xlu_kernels.c \
  54. lu/lu_example.c \
  55. incrementer/incrementer_kernels_opencl_kernel.cl \
  56. basic_examples/variable_kernels_opencl_kernel.cl \
  57. matvecmult/matvecmult_kernel.cl \
  58. basic_examples/block_opencl_kernel.cl \
  59. filters/fblock_opencl_kernel.cl \
  60. filters/custom_mf/conversion_opencl.cl \
  61. filters/custom_mf/custom_opencl.cl \
  62. filters/custom_mf/custom_types.h \
  63. interface/complex_kernels.cl \
  64. reductions/dot_product.h \
  65. reductions/dot_product_opencl_kernels.cl \
  66. scheduler/schedulers.sh \
  67. scheduler/schedulers_context.sh \
  68. fortran/Makefile \
  69. sched_ctx/axpy_partition_gpu.h \
  70. sched_ctx/axpy_partition_gpu.cu \
  71. heat/heat.sh \
  72. cholesky/cholesky.sh \
  73. cholesky/cholesky_compiled.c \
  74. lu/lu.sh
  75. CLEANFILES = *.gcno *.gcda *.linkinfo *.mod starpu_idle_microsec.log *.mps */*.mps */*/*.mps *.dot */*.dot */*/*.dot *.pl */*.pl */*/*.pl *.png *.output tasks.rec perfs.rec */perfs.rec */*/perfs.rec perfs2.rec fortran90/starpu_mod.f90 native_fortran/fstarpu_mod.f90
  76. if STARPU_USE_CUDA
  77. if STARPU_COVERITY
  78. include $(top_srcdir)/starpu-mynvcc.mk
  79. else
  80. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(HWLOC_CFLAGS)
  81. .cu.o:
  82. $(V_nvcc) $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  83. endif
  84. endif
  85. if STARPU_HAVE_ICC
  86. .icc.o:
  87. $(V_icc) $(ICC) -x c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $< -c -o $@
  88. endif
  89. examplebindir = $(libdir)/starpu/examples/
  90. examplebin_PROGRAMS =
  91. noinst_HEADERS = \
  92. axpy/axpy.h \
  93. cg/cg.h \
  94. heat/lu_kernels_model.h \
  95. heat/dw_sparse_cg.h \
  96. heat/heat.h \
  97. heat/dw_factolu.h \
  98. lu/xlu.h \
  99. lu/xlu_kernels.h \
  100. lu/lu-float.h \
  101. lu/lu-double.h \
  102. lu/complex_float.h \
  103. lu/complex_double.h \
  104. lu/blas_complex.h \
  105. cholesky/cholesky.h \
  106. sched_ctx_utils/sched_ctx_utils.h \
  107. common/blas_model.h \
  108. common/blas.h \
  109. mult/simple.h \
  110. mult/double.h \
  111. fortran/StarPU_fortran.h \
  112. ppm_downscaler/ppm_downscaler.h \
  113. ppm_downscaler/yuv_downscaler.h \
  114. spmv/matrix_market/mmio.h \
  115. spmv/matrix_market/mm_to_bcsr.h \
  116. spmv/spmv.h \
  117. spmv/dw_block_spmv.h \
  118. basic_examples/multiformat_types.h \
  119. filters/custom_mf/custom_interface.h \
  120. filters/custom_mf/custom_types.h \
  121. interface/complex_interface.h \
  122. interface/complex_codelet.h \
  123. pi/pi.h \
  124. pi/SobolQRNG/sobol.h \
  125. pi/SobolQRNG/sobol_gold.h \
  126. pi/SobolQRNG/sobol_gpu.h \
  127. pi/SobolQRNG/sobol_primitives.h \
  128. reductions/dot_product.h \
  129. basic_examples/vector_scal_cpu_template.h \
  130. sched_ctx/axpy_partition_gpu.h
  131. #####################################
  132. # What to install and what to check #
  133. #####################################
  134. examplebin_PROGRAMS += $(STARPU_EXAMPLES)
  135. TESTS = $(SHELL_TESTS) $(STARPU_EXAMPLES)
  136. SHELL_TESTS =
  137. if !STARPU_USE_MPI_MASTER_SLAVE
  138. SHELL_TESTS += scheduler/schedulers.sh
  139. SHELL_TESTS += scheduler/schedulers_context.sh
  140. if !STARPU_NO_BLAS_LIB
  141. SHELL_TESTS += mult/sgemm.sh
  142. endif
  143. endif
  144. check_PROGRAMS = $(STARPU_EXAMPLES)
  145. noinst_PROGRAMS =
  146. if !STARPU_HAVE_WINDOWS
  147. ## test loader program
  148. if !STARPU_CROSS_COMPILING
  149. LOADER = loader
  150. loader_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/
  151. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  152. loader_SOURCES = ../tests/loader.c
  153. noinst_PROGRAMS += loader
  154. else
  155. LOADER =
  156. LOADER_BIN = $(top_builddir)/examples/loader-cross.sh
  157. endif
  158. if STARPU_USE_MPI_MASTER_SLAVE
  159. LOADER_BIN2 = $(MPI_LAUNCHER) $(LOADER_BIN)
  160. else
  161. LOADER_BIN2 = $(LOADER_BIN)
  162. endif
  163. if STARPU_HAVE_AM111
  164. TESTS_ENVIRONMENT = $(MPI_RUN_ARGS) top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  165. LOG_COMPILER = $(LOADER_BIN2)
  166. else
  167. TESTS_ENVIRONMENT = $(MPI_RUN_ARGS) top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN2)
  168. endif
  169. endif
  170. # STARPU_EXAMPLES list all applications which have to be compiled and checked
  171. # Applications which should only be compiled are added directly in examplebin_PROGRAMS
  172. # see for instance mandelbrot/mandelbrot
  173. STARPU_EXAMPLES =
  174. STARPU_EXAMPLES += \
  175. sched_ctx/prio \
  176. scheduler/dummy_sched \
  177. scheduler/dummy_modular_sched \
  178. worker_collections/worker_list_example \
  179. api/bcsr_data_interface \
  180. api/block_data_interface \
  181. api/coo_data_interface \
  182. api/csr_data_interface \
  183. api/matrix_data_interface \
  184. api/multiformat_data_interface \
  185. api/tensor_data_interface \
  186. api/variable_data_interface \
  187. api/vector_data_interface \
  188. api/void_data_interface
  189. if !STARPU_SIMGRID
  190. STARPU_EXAMPLES += \
  191. basic_examples/hello_world \
  192. basic_examples/topology \
  193. basic_examples/vector_scal \
  194. basic_examples/mult \
  195. basic_examples/block \
  196. basic_examples/variable \
  197. basic_examples/multiformat \
  198. basic_examples/dynamic_handles \
  199. basic_examples/task_insert_color \
  200. mlr/mlr \
  201. cpp/incrementer_cpp \
  202. cpp/add_vectors \
  203. cpp/add_vectors_interface \
  204. filters/fread \
  205. filters/fvector \
  206. filters/fblock \
  207. filters/fmatrix \
  208. filters/fmultiple_manual \
  209. filters/fmultiple_submit \
  210. filters/fmultiple_submit_readonly \
  211. filters/fmultiple_submit_implicit \
  212. filters/frecursive \
  213. filters/fplan_notautomatic \
  214. tag_example/tag_example \
  215. tag_example/tag_example2 \
  216. tag_example/tag_example3 \
  217. tag_example/tag_example4 \
  218. tag_example/tag_restartable \
  219. spmd/vector_scal_spmd \
  220. spmv/spmv \
  221. callback/callback \
  222. callback/prologue \
  223. incrementer/incrementer \
  224. binary/binary \
  225. interface/complex \
  226. matvecmult/matvecmult \
  227. profiling/profiling \
  228. perf_monitoring/perf_counters_01 \
  229. perf_monitoring/perf_counters_02 \
  230. perf_steering/perf_knobs_01 \
  231. perf_steering/perf_knobs_02 \
  232. perf_steering/perf_knobs_03 \
  233. scheduler/heteroprio_test \
  234. sched_ctx/sched_ctx \
  235. sched_ctx/sched_ctx_empty \
  236. sched_ctx/sched_ctx_delete \
  237. sched_ctx/two_cpu_contexts \
  238. sched_ctx/dummy_sched_with_ctx \
  239. worker_collections/worker_tree_example \
  240. reductions/dot_product \
  241. reductions/minmax_reduction \
  242. dependency/task_end_dep \
  243. dependency/task_end_dep_add \
  244. dependency/sequential_consistency
  245. endif
  246. if !STARPU_SIMGRID
  247. STARPU_EXAMPLES += \
  248. scheduler/dummy_sched
  249. if STARPU_HAVE_CXX11
  250. STARPU_EXAMPLES += \
  251. cpp/add_vectors_cpp11
  252. endif
  253. if STARPU_HAVE_F77
  254. if STARPU_HAVE_F77_H
  255. STARPU_EXAMPLES += \
  256. fortran/hello
  257. endif
  258. STARPU_EXAMPLES += \
  259. basic_examples/vector_scal_fortran
  260. endif
  261. if STARPU_HAVE_FC
  262. if !STARPU_SANITIZE
  263. STARPU_EXAMPLES += \
  264. fortran90/f90_example \
  265. native_fortran/nf_vector \
  266. native_fortran/nf_matrix \
  267. native_fortran/nf_example \
  268. native_fortran/nf_dynbuf \
  269. native_fortran/nf_varbuf \
  270. native_fortran/nf_sched_ctx \
  271. native_fortran/nf_partition
  272. endif
  273. endif
  274. endif
  275. if !STARPU_NO_BLAS_LIB
  276. STARPU_EXAMPLES += \
  277. mult/sgemm \
  278. mult/dgemm \
  279. lu/lu_example_float \
  280. lu/lu_example_double \
  281. lu/lu_implicit_example_float \
  282. lu/lu_implicit_example_double \
  283. cholesky/cholesky_tag \
  284. cholesky/cholesky_tile_tag \
  285. cholesky/cholesky_implicit \
  286. cholesky/cholesky_compil
  287. if !STARPU_SIMGRID
  288. STARPU_EXAMPLES += \
  289. axpy/axpy \
  290. cholesky/cholesky_grain_tag \
  291. heat/heat \
  292. cg/cg \
  293. pipeline/pipeline
  294. if !STARPU_USE_MPI_MASTER_SLAVE
  295. SHELL_TESTS += \
  296. heat/heat.sh \
  297. lu/lu.sh
  298. endif
  299. endif
  300. if STARPU_SIMGRID
  301. if !STARPU_QUICK_CHECK
  302. SHELL_TESTS += \
  303. cholesky/cholesky.sh
  304. endif
  305. endif
  306. endif
  307. if !STARPU_SIMGRID
  308. if STARPU_MKL_BLAS_LIB
  309. STARPU_EXAMPLES += \
  310. lu/lu_example_complex_float \
  311. lu/lu_example_complex_double \
  312. lu/lu_implicit_example_complex_float \
  313. lu/lu_implicit_example_complex_double
  314. endif
  315. if STARPU_HAVE_CBLAS_H
  316. STARPU_EXAMPLES += \
  317. spmv/dw_block_spmv
  318. endif
  319. if !STARPU_SIMGRID
  320. if STARPU_HAVE_F77
  321. if STARPU_HAVE_F77_H
  322. STARPU_EXAMPLES += \
  323. fortran/hello
  324. endif
  325. STARPU_EXAMPLES += \
  326. basic_examples/vector_scal_fortran
  327. endif
  328. endif
  329. if STARPU_HAVE_OPENMP
  330. STARPU_EXAMPLES += \
  331. openmp/vector_scal_omp \
  332. sched_ctx/sched_ctx_without_sched_policy\
  333. sched_ctx/nested_sched_ctxs \
  334. sched_ctx/sched_ctx_without_sched_policy_awake\
  335. sched_ctx/parallel_tasks_reuse_handle \
  336. sched_ctx/parallel_code
  337. if STARPU_HAVE_HWLOC
  338. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  339. STARPU_EXAMPLES += \
  340. sched_ctx/parallel_tasks_with_cluster_api
  341. endif
  342. endif
  343. endif
  344. endif !STARPU_SIMGRID
  345. if STARPU_USE_CUDA
  346. STARPU_EXAMPLES += \
  347. sched_ctx/gpu_partition
  348. sched_ctx_gpu_partition_SOURCES = \
  349. sched_ctx/gpu_partition.c \
  350. sched_ctx/axpy_partition_gpu.cu
  351. endif
  352. ##################
  353. # Basic examples #
  354. ##################
  355. basic_examples_vector_scal_SOURCES = \
  356. basic_examples/vector_scal.c \
  357. basic_examples/vector_scal_cpu.c
  358. if STARPU_HAVE_ICC
  359. if STARPU_CROSS_COMPILING
  360. 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 $@
  361. else
  362. basic_examples_vector_scal_SOURCES += \
  363. basic_examples/vector_scal_cpu_icc.icc
  364. 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 $@
  365. endif
  366. else
  367. 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 $@
  368. endif
  369. if STARPU_USE_CUDA
  370. basic_examples_vector_scal_SOURCES += \
  371. basic_examples/vector_scal_cuda.cu
  372. endif
  373. if STARPU_USE_OPENCL
  374. basic_examples_vector_scal_SOURCES += \
  375. basic_examples/vector_scal_opencl.c
  376. nobase_STARPU_OPENCL_DATA_DATA += \
  377. basic_examples/vector_scal_opencl_kernel.cl
  378. endif
  379. if STARPU_HAVE_F77
  380. basic_examples_vector_scal_fortran_SOURCES = \
  381. basic_examples/vector_scal_fortran.F \
  382. basic_examples/vector_scal_c.c \
  383. basic_examples/vector_scal_cpu.c
  384. if STARPU_USE_CUDA
  385. basic_examples_vector_scal_fortran_SOURCES += \
  386. basic_examples/vector_scal_cuda.cu
  387. basic_examples_vector_scal_fortran_LDADD = \
  388. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  389. endif
  390. if STARPU_HAVE_F77_H
  391. fortran_hello_SOURCES = \
  392. fortran/hello_c.c \
  393. fortran/hello.F \
  394. fortran/StarPU_fortran.h
  395. endif
  396. endif
  397. if STARPU_HAVE_FC
  398. fortran90_f90_example_SOURCES = \
  399. fortran90/mod_types.f90 \
  400. fortran90/starpu_mod.f90 \
  401. fortran90/mod_interface.f90 \
  402. fortran90/mod_compute.f90 \
  403. fortran90/marshalling.c \
  404. fortran90/f90_example.f90
  405. native_fortran_nf_vector_SOURCES = \
  406. native_fortran/nf_codelets.f90 \
  407. native_fortran/fstarpu_mod.f90 \
  408. native_fortran/nf_vector.f90
  409. native_fortran_nf_matrix_SOURCES = \
  410. native_fortran/nf_codelets.f90 \
  411. native_fortran/fstarpu_mod.f90 \
  412. native_fortran/nf_matrix.f90
  413. native_fortran_nf_example_SOURCES = \
  414. native_fortran/nf_types.f90 \
  415. native_fortran/nf_compute.f90 \
  416. native_fortran/fstarpu_mod.f90 \
  417. native_fortran/nf_example.f90
  418. native_fortran_nf_dynbuf_SOURCES = \
  419. native_fortran/nf_dynbuf_cl.f90 \
  420. native_fortran/fstarpu_mod.f90 \
  421. native_fortran/nf_dynbuf.f90
  422. native_fortran_nf_varbuf_SOURCES = \
  423. native_fortran/nf_varbuf_cl.f90 \
  424. native_fortran/fstarpu_mod.f90 \
  425. native_fortran/nf_varbuf.f90
  426. native_fortran_nf_sched_ctx_SOURCES = \
  427. native_fortran/nf_sched_ctx_cl.f90 \
  428. native_fortran/fstarpu_mod.f90 \
  429. native_fortran/nf_sched_ctx.f90
  430. native_fortran_nf_partition_SOURCES = \
  431. native_fortran/nf_partition_cl.f90 \
  432. native_fortran/fstarpu_mod.f90 \
  433. native_fortran/nf_partition.f90
  434. endif
  435. #######################
  436. # Multiformat example #
  437. #######################
  438. basic_examples_multiformat_SOURCES = \
  439. basic_examples/multiformat.c \
  440. basic_examples/multiformat_conversion_codelets.c
  441. if STARPU_USE_CUDA
  442. basic_examples_multiformat_SOURCES += \
  443. basic_examples/multiformat_cuda.cu \
  444. basic_examples/multiformat_conversion_codelets_cuda.cu
  445. endif
  446. if STARPU_USE_OPENCL
  447. basic_examples_multiformat_SOURCES += \
  448. basic_examples/multiformat_opencl.c \
  449. basic_examples/multiformat_conversion_codelets_opencl.c
  450. nobase_STARPU_OPENCL_DATA_DATA += \
  451. basic_examples/multiformat_opencl_kernel.cl \
  452. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  453. endif
  454. #################
  455. # block example #
  456. #################
  457. basic_examples_block_SOURCES = \
  458. basic_examples/block.c \
  459. basic_examples/block_cpu.c
  460. if STARPU_USE_CUDA
  461. basic_examples_block_SOURCES += \
  462. basic_examples/block_cuda.cu
  463. endif
  464. if STARPU_USE_OPENCL
  465. basic_examples_block_SOURCES += \
  466. basic_examples/block_opencl.c
  467. nobase_STARPU_OPENCL_DATA_DATA += \
  468. basic_examples/block_opencl_kernel.cl
  469. endif
  470. ####################
  471. # Variable example #
  472. ####################
  473. basic_examples_variable_SOURCES = \
  474. basic_examples/variable.c \
  475. basic_examples/variable_kernels_cpu.c
  476. if STARPU_USE_CUDA
  477. basic_examples_variable_SOURCES += \
  478. basic_examples/variable_kernels.cu
  479. endif
  480. if STARPU_USE_OPENCL
  481. basic_examples_variable_SOURCES += \
  482. basic_examples/variable_kernels_opencl.c
  483. nobase_STARPU_OPENCL_DATA_DATA += \
  484. basic_examples/variable_kernels_opencl_kernel.cl
  485. endif
  486. ###########
  487. # Filters #
  488. ###########
  489. filters_fblock_SOURCES = \
  490. filters/fblock.c \
  491. filters/fblock_cpu.c
  492. if STARPU_USE_CUDA
  493. filters_fblock_SOURCES += \
  494. filters/fblock_cuda.cu
  495. endif
  496. if STARPU_USE_OPENCL
  497. filters_fblock_SOURCES += \
  498. filters/fblock_opencl.c
  499. nobase_STARPU_OPENCL_DATA_DATA += \
  500. filters/fblock_opencl_kernel.cl
  501. endif
  502. filters_fmultiple_manual_SOURCES = \
  503. filters/fmultiple_manual.c
  504. if STARPU_USE_CUDA
  505. filters_fmultiple_manual_SOURCES += \
  506. filters/fmultiple_cuda.cu
  507. endif
  508. filters_fmultiple_submit_SOURCES = \
  509. filters/fmultiple_submit.c
  510. if STARPU_USE_CUDA
  511. filters_fmultiple_submit_SOURCES += \
  512. filters/fmultiple_cuda.cu
  513. endif
  514. filters_fmultiple_submit_readonly_SOURCES = \
  515. filters/fmultiple_submit_readonly.c
  516. if STARPU_USE_CUDA
  517. filters_fmultiple_submit_readonly_SOURCES += \
  518. filters/fmultiple_cuda.cu
  519. endif
  520. filters_fmultiple_submit_implicit_SOURCES = \
  521. filters/fmultiple_submit_implicit.c
  522. if STARPU_USE_CUDA
  523. filters_fmultiple_submit_implicit_SOURCES += \
  524. filters/fmultiple_cuda.cu
  525. endif
  526. examplebin_PROGRAMS += \
  527. filters/shadow \
  528. filters/shadow2d \
  529. filters/shadow3d
  530. #############################
  531. # Custom multiformat filter #
  532. #############################
  533. #TODO: see why the application is failing
  534. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  535. examplebin_PROGRAMS += \
  536. filters/custom_mf/custom_mf_filter
  537. filters_custom_mf_custom_mf_filter_SOURCES=\
  538. filters/custom_mf/custom_mf_filter.c \
  539. filters/custom_mf/custom_interface.c \
  540. filters/custom_mf/custom_conversion_codelets.c
  541. if STARPU_USE_CUDA
  542. filters_custom_mf_custom_mf_filter_SOURCES += \
  543. filters/custom_mf/conversion.cu \
  544. filters/custom_mf/cuda.cu
  545. endif
  546. if STARPU_USE_OPENCL
  547. filters_custom_mf_custom_mf_filter_SOURCES += \
  548. filters/custom_mf/conversion_opencl.c \
  549. filters/custom_mf/custom_opencl.c
  550. nobase_STARPU_OPENCL_DATA_DATA += \
  551. filters/custom_mf/conversion_opencl.cl \
  552. filters/custom_mf/custom_opencl.cl
  553. endif
  554. ################
  555. # AXPY example #
  556. ################
  557. if !STARPU_NO_BLAS_LIB
  558. axpy_axpy_SOURCES = \
  559. axpy/axpy.c \
  560. common/blas.c
  561. if STARPU_USE_OPENCL
  562. axpy_axpy_SOURCES += \
  563. axpy/axpy_opencl.c
  564. nobase_STARPU_OPENCL_DATA_DATA += \
  565. axpy/axpy_opencl_kernel.cl
  566. endif
  567. axpy_axpy_LDADD = \
  568. $(STARPU_BLAS_LDFLAGS)
  569. endif
  570. ################
  571. # Mult example #
  572. ################
  573. if !STARPU_NO_BLAS_LIB
  574. mult_sgemm_SOURCES = \
  575. mult/sgemm.c \
  576. common/blas.c
  577. mult_sgemm_LDADD = \
  578. $(STARPU_BLAS_LDFLAGS)
  579. mult_dgemm_SOURCES = \
  580. mult/dgemm.c \
  581. common/blas.c
  582. mult_dgemm_LDADD = \
  583. $(STARPU_BLAS_LDFLAGS)
  584. endif
  585. ####################
  586. # Cholesky example #
  587. ####################
  588. if !STARPU_NO_BLAS_LIB
  589. cholesky_cholesky_tag_SOURCES = \
  590. cholesky/cholesky_tag.c \
  591. cholesky/cholesky_models.c \
  592. cholesky/cholesky_kernels.c \
  593. common/blas.c
  594. cholesky_cholesky_tag_LDADD = \
  595. $(STARPU_BLAS_LDFLAGS)
  596. cholesky_cholesky_tile_tag_SOURCES = \
  597. cholesky/cholesky_tile_tag.c \
  598. cholesky/cholesky_models.c \
  599. cholesky/cholesky_kernels.c \
  600. common/blas.c
  601. cholesky_cholesky_tile_tag_LDADD = \
  602. $(STARPU_BLAS_LDFLAGS)
  603. cholesky_cholesky_grain_tag_SOURCES = \
  604. cholesky/cholesky_grain_tag.c \
  605. cholesky/cholesky_models.c \
  606. cholesky/cholesky_kernels.c \
  607. common/blas.c
  608. cholesky_cholesky_grain_tag_LDADD = \
  609. $(STARPU_BLAS_LDFLAGS)
  610. cholesky_cholesky_implicit_SOURCES = \
  611. cholesky/cholesky_implicit.c \
  612. cholesky/cholesky_models.c \
  613. cholesky/cholesky_kernels.c \
  614. sched_ctx_utils/sched_ctx_utils.c \
  615. common/blas.c
  616. cholesky_cholesky_implicit_LDADD = \
  617. $(STARPU_BLAS_LDFLAGS)
  618. cholesky_cholesky_compil_SOURCES = \
  619. cholesky/cholesky_compil.c \
  620. cholesky/cholesky_models.c \
  621. cholesky/cholesky_kernels.c \
  622. sched_ctx_utils/sched_ctx_utils.c \
  623. common/blas.c
  624. cholesky_cholesky_compil_LDADD = \
  625. $(STARPU_BLAS_LDFLAGS)
  626. endif
  627. ##############
  628. # LU example #
  629. ##############
  630. if !STARPU_NO_BLAS_LIB
  631. lu_lu_example_float_SOURCES = \
  632. lu/lu_example_float.c \
  633. lu/slu.c \
  634. lu/slu_pivot.c \
  635. lu/slu_kernels.c \
  636. common/blas.c
  637. lu_lu_example_float_LDADD = \
  638. $(STARPU_BLAS_LDFLAGS)
  639. lu_lu_example_double_SOURCES = \
  640. lu/lu_example_double.c \
  641. lu/dlu.c \
  642. lu/dlu_pivot.c \
  643. lu/dlu_kernels.c \
  644. common/blas.c
  645. lu_lu_example_double_LDADD = \
  646. $(STARPU_BLAS_LDFLAGS)
  647. lu_lu_implicit_example_float_SOURCES = \
  648. lu/lu_example_float.c \
  649. lu/slu_implicit.c \
  650. lu/slu_implicit_pivot.c \
  651. lu/slu_kernels.c \
  652. common/blas.c
  653. lu_lu_implicit_example_float_LDADD = \
  654. $(STARPU_BLAS_LDFLAGS)
  655. lu_lu_implicit_example_double_SOURCES = \
  656. lu/lu_example_double.c \
  657. lu/dlu_implicit.c \
  658. lu/dlu_implicit_pivot.c \
  659. lu/dlu_kernels.c \
  660. common/blas.c
  661. lu_lu_implicit_example_double_LDADD = \
  662. $(STARPU_BLAS_LDFLAGS)
  663. if STARPU_MKL_BLAS_LIB
  664. lu_lu_example_complex_float_SOURCES = \
  665. lu/lu_example_complex_float.c \
  666. lu/clu.c \
  667. lu/clu_pivot.c \
  668. lu/clu_kernels.c \
  669. lu/blas_complex.c \
  670. common/blas.c
  671. lu_lu_example_complex_float_LDADD = \
  672. $(STARPU_BLAS_LDFLAGS)
  673. lu_lu_implicit_example_complex_float_SOURCES = \
  674. lu/lu_example_complex_float.c \
  675. lu/clu_implicit.c \
  676. lu/clu_implicit_pivot.c \
  677. lu/clu_kernels.c \
  678. lu/blas_complex.c \
  679. common/blas.c
  680. lu_lu_implicit_example_complex_float_LDADD = \
  681. $(STARPU_BLAS_LDFLAGS)
  682. lu_lu_example_complex_double_SOURCES = \
  683. lu/lu_example_complex_double.c \
  684. lu/zlu.c \
  685. lu/zlu_pivot.c \
  686. lu/zlu_kernels.c \
  687. lu/blas_complex.c \
  688. common/blas.c
  689. lu_lu_example_complex_double_LDADD = \
  690. $(STARPU_BLAS_LDFLAGS)
  691. lu_lu_implicit_example_complex_double_SOURCES = \
  692. lu/lu_example_complex_double.c \
  693. lu/zlu_implicit.c \
  694. lu/zlu_implicit_pivot.c \
  695. lu/zlu_kernels.c \
  696. lu/blas_complex.c \
  697. common/blas.c
  698. lu_lu_implicit_example_complex_double_LDADD = \
  699. $(STARPU_BLAS_LDFLAGS)
  700. endif
  701. endif
  702. ################
  703. # Heat example #
  704. ################
  705. if !STARPU_NO_BLAS_LIB
  706. heat_heat_SOURCES = \
  707. heat/heat.c \
  708. heat/dw_factolu.c \
  709. heat/dw_factolu_tag.c \
  710. heat/dw_factolu_grain.c \
  711. heat/dw_sparse_cg.c \
  712. heat/heat_display.c \
  713. heat/lu_kernels_model.c \
  714. heat/dw_sparse_cg_kernels.c \
  715. heat/dw_factolu_kernels.c \
  716. common/blas.c
  717. heat_heat_LDADD = \
  718. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  719. $(STARPU_BLAS_LDFLAGS)
  720. endif
  721. ##############
  722. # CG example #
  723. ##############
  724. if !STARPU_NO_BLAS_LIB
  725. cg_cg_SOURCES = \
  726. cg/cg.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_CPPFLAGS)
  844. if STARPU_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 STARPU_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 !STARPU_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