Makefile.am 28 KB

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