Makefile.am 24 KB

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