Makefile.am 28 KB

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