Makefile.am 29 KB

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