Makefile.am 25 KB

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