Makefile.am 29 KB

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