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