Makefile.am 28 KB

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