Makefile.am 26 KB

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