Makefile.am 29 KB

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