Makefile.am 28 KB

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