Makefile.am 29 KB

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