Makefile.am 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2013 Université de Bordeaux 1
  4. # Copyright (C) 2010, 2011, 2012, 2013, 2014 Centre National de la Recherche Scientifique
  5. # Copyright (C) 2011 Télécom-SudParis
  6. # Copyright (C) 2011-2012 INRIA
  7. #
  8. # StarPU is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Lesser General Public License as published by
  10. # the Free Software Foundation; either version 2.1 of the License, or (at
  11. # your option) any later version.
  12. #
  13. # StarPU is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. #
  17. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  18. AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
  19. AM_CXXFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
  20. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(MAGMA_LIBS) $(HWLOC_LIBS) @LIBS@
  21. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  22. AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
  23. SUBDIRS = stencil
  24. BUILT_SOURCES =
  25. if STARPU_USE_OPENCL
  26. nobase_STARPU_OPENCL_DATA_DATA =
  27. endif
  28. EXTRA_DIST = \
  29. axpy/axpy_opencl_kernel.cl \
  30. basic_examples/vector_scal_opencl_kernel.cl \
  31. basic_examples/multiformat_opencl_kernel.cl \
  32. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl \
  33. common/blas_model.c \
  34. spmd/vector_scal_spmd.c \
  35. spmv/spmv_cuda.cu \
  36. spmv/spmv_opencl.cl \
  37. spmv/matrix_market/examples/fidapm05.mtx \
  38. mult/xgemm.c \
  39. lu/xlu.c \
  40. lu/xlu_pivot.c \
  41. lu/xlu_implicit.c \
  42. lu/xlu_implicit_pivot.c \
  43. lu/xlu_kernels.c \
  44. lu/lu_example.c \
  45. incrementer/incrementer_kernels_opencl_kernel.cl \
  46. basic_examples/variable_kernels_opencl_kernel.cl \
  47. matvecmult/matvecmult_kernel.cl \
  48. basic_examples/block_opencl_kernel.cl \
  49. filters/fblock_opencl_kernel.cl \
  50. filters/custom_mf/conversion_opencl.cl \
  51. filters/custom_mf/custom_opencl.cl \
  52. interface/complex_kernels.cl \
  53. reductions/dot_product_opencl_kernels.cl \
  54. scheduler/schedulers.sh
  55. CLEANFILES = *.gcno *.gcda *.linkinfo *.mod starpu_idle_microsec.log
  56. if STARPU_USE_CUDA
  57. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/ $(HWLOC_CFLAGS)
  58. .cu.o:
  59. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  60. endif
  61. if STARPU_HAVE_ICC
  62. .icc.o:
  63. $(ICC) -x c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
  64. $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $< -c -o $@
  65. endif
  66. examplebindir = $(libdir)/starpu/examples/
  67. examplebin_PROGRAMS =
  68. noinst_HEADERS = \
  69. axpy/axpy.h \
  70. cg/cg.h \
  71. heat/lu_kernels_model.h \
  72. heat/dw_sparse_cg.h \
  73. heat/heat.h \
  74. heat/dw_factolu.h \
  75. lu/xlu.h \
  76. lu/xlu_kernels.h \
  77. lu/lu-float.h \
  78. lu/lu-double.h \
  79. lu/complex_float.h \
  80. lu/complex_double.h \
  81. lu/blas_complex.h \
  82. cholesky/cholesky.h \
  83. sched_ctx_utils/sched_ctx_utils.h \
  84. common/blas_model.h \
  85. common/blas.h \
  86. mult/simple.h \
  87. mult/double.h \
  88. fortran/StarPU_fortran.h \
  89. ppm_downscaler/ppm_downscaler.h \
  90. ppm_downscaler/yuv_downscaler.h \
  91. spmv/matrix_market/mmio.h \
  92. spmv/matrix_market/mm_to_bcsr.h \
  93. spmv/spmv.h \
  94. spmv/dw_block_spmv.h \
  95. basic_examples/multiformat_types.h \
  96. filters/custom_mf/custom_interface.h \
  97. filters/custom_mf/custom_types.h \
  98. interface/complex_interface.h \
  99. interface/complex_codelet.h \
  100. pi/pi.h \
  101. pi/SobolQRNG/sobol.h \
  102. pi/SobolQRNG/sobol_gold.h \
  103. pi/SobolQRNG/sobol_gpu.h \
  104. pi/SobolQRNG/sobol_primitives.h \
  105. reductions/dot_product.h \
  106. basic_examples/vector_scal_cpu_template.h
  107. #####################################
  108. # What to install and what to check #
  109. #####################################
  110. examplebin_PROGRAMS += $(STARPU_EXAMPLES)
  111. TESTS = $(STARPU_EXAMPLES)
  112. TESTS += scheduler/schedulers.sh
  113. if STARPU_HAVE_WINDOWS
  114. check_PROGRAMS = $(STARPU_EXAMPLES)
  115. else
  116. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  117. endif
  118. if !STARPU_HAVE_WINDOWS
  119. ## test loader program
  120. if !STARPU_CROSS_COMPILING
  121. LOADER = loader
  122. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  123. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  124. loader_SOURCES = ../tests/loader.c
  125. else
  126. LOADER =
  127. LOADER_BIN = $(top_builddir)/tests/loader-cross.sh
  128. endif
  129. if STARPU_HAVE_AM111
  130. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  131. LOG_COMPILER = $(LOADER_BIN)
  132. else
  133. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  134. endif
  135. endif
  136. # STARPU_EXAMPLES list all applications which have to be compiled and checked
  137. # Applications which should only be compiled are added directly in examplebin_PROGRAMS
  138. # see for instance mandelbrot/mandelbrot
  139. STARPU_EXAMPLES = \
  140. basic_examples/hello_world \
  141. basic_examples/vector_scal \
  142. basic_examples/mult \
  143. basic_examples/block \
  144. basic_examples/variable \
  145. basic_examples/multiformat \
  146. cpp/incrementer_cpp \
  147. filters/fvector \
  148. filters/fblock \
  149. filters/fmatrix \
  150. tag_example/tag_example \
  151. tag_example/tag_example2 \
  152. tag_example/tag_example3 \
  153. tag_example/tag_example4 \
  154. tag_example/tag_restartable \
  155. spmd/vector_scal_spmd \
  156. spmv/spmv \
  157. callback/callback \
  158. callback/prologue \
  159. incrementer/incrementer \
  160. binary/binary \
  161. interface/complex \
  162. matvecmult/matvecmult \
  163. profiling/profiling \
  164. scheduler/dummy_sched \
  165. sched_ctx/sched_ctx \
  166. sched_ctx/prio \
  167. sched_ctx/dummy_sched_with_ctx \
  168. worker_collections/worker_tree_example \
  169. worker_collections/worker_list_example \
  170. reductions/dot_product \
  171. reductions/minmax_reduction
  172. if !STARPU_SIMGRID
  173. STARPU_EXAMPLES += \
  174. scheduler/dummy_sched
  175. if STARPU_HAVE_F77_H
  176. STARPU_EXAMPLES += \
  177. basic_examples/vector_scal_fortran \
  178. fortran/hello
  179. endif
  180. endif
  181. if !NO_BLAS_LIB
  182. STARPU_EXAMPLES += \
  183. axpy/axpy \
  184. mult/sgemm \
  185. mult/dgemm \
  186. cholesky/cholesky_tag \
  187. cholesky/cholesky_tile_tag \
  188. cholesky/cholesky_grain_tag \
  189. cholesky/cholesky_implicit \
  190. lu/lu_example_float \
  191. lu/lu_example_double \
  192. lu/lu_implicit_example_float \
  193. lu/lu_implicit_example_double \
  194. heat/heat \
  195. cg/cg \
  196. pipeline/pipeline
  197. endif
  198. if MKL_BLAS_LIB
  199. STARPU_EXAMPLES += \
  200. lu/lu_example_complex_float \
  201. lu/lu_example_complex_double \
  202. lu/lu_implicit_example_complex_float \
  203. lu/lu_implicit_example_complex_double
  204. endif
  205. if ATLAS_BLAS_LIB
  206. STARPU_EXAMPLES += \
  207. spmv/dw_block_spmv
  208. endif
  209. if STARPU_LONG_CHECK
  210. STARPU_EXAMPLES += \
  211. sched_ctx/parallel_code
  212. endif
  213. if STARPU_HAVE_F77_H
  214. STARPU_EXAMPLES += \
  215. basic_examples/vector_scal_fortran \
  216. fortran/hello
  217. endif
  218. if !STARPU_HAVE_WINDOWS
  219. STARPU_EXAMPLES += \
  220. openmp/vector_scal_omp \
  221. sched_ctx/sched_ctx_without_sched_policy\
  222. sched_ctx/nested_sched_ctxs \
  223. sched_ctx/sched_ctx_without_sched_policy\
  224. sched_ctx/sched_ctx_without_sched_policy_awake
  225. if STARPU_LONG_CHECK
  226. STARPU_EXAMPLES += \
  227. sched_ctx/parallel_code
  228. endif
  229. endif
  230. ##################
  231. # Basic examples #
  232. ##################
  233. basic_examples_vector_scal_SOURCES = \
  234. basic_examples/vector_scal.c \
  235. basic_examples/vector_scal_cpu.c
  236. if STARPU_HAVE_ICC
  237. if STARPU_CROSS_COMPILING
  238. else
  239. basic_examples_vector_scal_SOURCES += \
  240. basic_examples/vector_scal_cpu_icc.icc
  241. endif
  242. endif
  243. if STARPU_USE_CUDA
  244. basic_examples_vector_scal_SOURCES += \
  245. basic_examples/vector_scal_cuda.cu
  246. endif
  247. if STARPU_USE_OPENCL
  248. basic_examples_vector_scal_SOURCES += \
  249. basic_examples/vector_scal_opencl.c
  250. nobase_STARPU_OPENCL_DATA_DATA += \
  251. basic_examples/vector_scal_opencl_kernel.cl
  252. endif
  253. if STARPU_HAVE_F77_H
  254. basic_examples_vector_scal_fortran_SOURCES = \
  255. basic_examples/vector_scal_fortran.F \
  256. basic_examples/vector_scal_c.c \
  257. basic_examples/vector_scal_cpu.c
  258. if STARPU_USE_CUDA
  259. basic_examples_vector_scal_fortran_SOURCES += \
  260. basic_examples/vector_scal_cuda.cu
  261. basic_examples_vector_scal_fortran_LDADD = \
  262. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  263. endif
  264. fortran_hello_SOURCES = \
  265. fortran/hello_c.c \
  266. fortran/hello.F \
  267. fortran/StarPU_fortran.h
  268. endif
  269. #######################
  270. # Multiformat example #
  271. #######################
  272. basic_examples_multiformat_SOURCES = \
  273. basic_examples/multiformat.c \
  274. basic_examples/multiformat_conversion_codelets.c
  275. if STARPU_USE_CUDA
  276. basic_examples_multiformat_SOURCES += \
  277. basic_examples/multiformat_cuda.cu \
  278. basic_examples/multiformat_conversion_codelets_cuda.cu
  279. endif
  280. if STARPU_USE_OPENCL
  281. basic_examples_multiformat_SOURCES += \
  282. basic_examples/multiformat_opencl.c \
  283. basic_examples/multiformat_conversion_codelets_opencl.c
  284. nobase_STARPU_OPENCL_DATA_DATA += \
  285. basic_examples/multiformat_opencl_kernel.cl \
  286. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  287. endif
  288. #################
  289. # block example #
  290. #################
  291. basic_examples_block_SOURCES = \
  292. basic_examples/block.c \
  293. basic_examples/block_cpu.c
  294. if STARPU_USE_CUDA
  295. basic_examples_block_SOURCES += \
  296. basic_examples/block_cuda.cu
  297. endif
  298. if STARPU_USE_OPENCL
  299. basic_examples_block_SOURCES += \
  300. basic_examples/block_opencl.c
  301. nobase_STARPU_OPENCL_DATA_DATA += \
  302. basic_examples/block_opencl_kernel.cl
  303. endif
  304. ####################
  305. # Variable example #
  306. ####################
  307. basic_examples_variable_SOURCES = \
  308. basic_examples/variable.c \
  309. basic_examples/variable_kernels_cpu.c
  310. if STARPU_USE_CUDA
  311. basic_examples_variable_SOURCES += \
  312. basic_examples/variable_kernels.cu
  313. endif
  314. if STARPU_USE_OPENCL
  315. basic_examples_variable_SOURCES += \
  316. basic_examples/variable_kernels_opencl.c
  317. nobase_STARPU_OPENCL_DATA_DATA += \
  318. basic_examples/variable_kernels_opencl_kernel.cl
  319. endif
  320. ###########
  321. # Filters #
  322. ###########
  323. filters_fblock_SOURCES = \
  324. filters/fblock.c \
  325. filters/fblock_cpu.c
  326. if STARPU_USE_CUDA
  327. filters_fblock_SOURCES += \
  328. filters/fblock_cuda.cu
  329. endif
  330. if STARPU_USE_OPENCL
  331. filters_fblock_SOURCES += \
  332. filters/fblock_opencl.c
  333. nobase_STARPU_OPENCL_DATA_DATA += \
  334. filters/fblock_opencl_kernel.cl
  335. endif
  336. #############################
  337. # Custom multiformat filter #
  338. #############################
  339. #TODO: see why the application is failing
  340. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  341. examplebin_PROGRAMS += \
  342. filters/custom_mf/custom_mf_filter
  343. filters_custom_mf_custom_mf_filter_SOURCES=\
  344. filters/custom_mf/custom_mf_filter.c \
  345. filters/custom_mf/custom_interface.c \
  346. filters/custom_mf/custom_conversion_codelets.c
  347. if STARPU_USE_CUDA
  348. filters_custom_mf_custom_mf_filter_SOURCES += \
  349. filters/custom_mf/conversion.cu \
  350. filters/custom_mf/cuda.cu
  351. endif
  352. if STARPU_USE_OPENCL
  353. filters_custom_mf_custom_mf_filter_SOURCES += \
  354. filters/custom_mf/conversion_opencl.c \
  355. filters/custom_mf/custom_opencl.c
  356. nobase_STARPU_OPENCL_DATA_DATA += \
  357. filters/custom_mf/conversion_opencl.cl \
  358. filters/custom_mf/custom_opencl.cl
  359. endif
  360. ################
  361. # AXPY example #
  362. ################
  363. if !NO_BLAS_LIB
  364. axpy_axpy_SOURCES = \
  365. axpy/axpy.c \
  366. common/blas.c
  367. if STARPU_USE_OPENCL
  368. axpy_axpy_SOURCES += \
  369. axpy/axpy_opencl.c
  370. nobase_STARPU_OPENCL_DATA_DATA += \
  371. axpy/axpy_opencl_kernel.cl
  372. endif
  373. axpy_axpy_LDADD = \
  374. $(STARPU_BLAS_LDFLAGS)
  375. endif
  376. ################
  377. # Mult example #
  378. ################
  379. if !NO_BLAS_LIB
  380. mult_sgemm_SOURCES = \
  381. mult/sgemm.c \
  382. common/blas.c
  383. mult_sgemm_LDADD = \
  384. $(STARPU_BLAS_LDFLAGS)
  385. mult_dgemm_SOURCES = \
  386. mult/dgemm.c \
  387. common/blas.c
  388. mult_dgemm_LDADD = \
  389. $(STARPU_BLAS_LDFLAGS)
  390. endif
  391. ####################
  392. # Cholesky example #
  393. ####################
  394. if !NO_BLAS_LIB
  395. cholesky_cholesky_tag_SOURCES = \
  396. cholesky/cholesky_tag.c \
  397. cholesky/cholesky_models.c \
  398. cholesky/cholesky_kernels.c \
  399. common/blas.c
  400. cholesky_cholesky_tag_LDADD = \
  401. $(STARPU_BLAS_LDFLAGS)
  402. cholesky_cholesky_tile_tag_SOURCES = \
  403. cholesky/cholesky_tile_tag.c \
  404. cholesky/cholesky_models.c \
  405. cholesky/cholesky_kernels.c \
  406. common/blas.c
  407. cholesky_cholesky_tile_tag_LDADD = \
  408. $(STARPU_BLAS_LDFLAGS)
  409. cholesky_cholesky_grain_tag_SOURCES = \
  410. cholesky/cholesky_grain_tag.c \
  411. cholesky/cholesky_models.c \
  412. cholesky/cholesky_kernels.c \
  413. common/blas.c
  414. cholesky_cholesky_grain_tag_LDADD = \
  415. $(STARPU_BLAS_LDFLAGS)
  416. cholesky_cholesky_implicit_SOURCES = \
  417. cholesky/cholesky_implicit.c \
  418. cholesky/cholesky_models.c \
  419. cholesky/cholesky_kernels.c \
  420. sched_ctx_utils/sched_ctx_utils.c \
  421. common/blas.c
  422. cholesky_cholesky_implicit_LDADD = \
  423. $(STARPU_BLAS_LDFLAGS)
  424. endif
  425. ##############
  426. # LU example #
  427. ##############
  428. if !NO_BLAS_LIB
  429. lu_lu_example_float_SOURCES = \
  430. lu/lu_example_float.c \
  431. lu/slu.c \
  432. lu/slu_pivot.c \
  433. lu/slu_kernels.c \
  434. common/blas.c
  435. lu_lu_example_float_LDADD = \
  436. $(STARPU_BLAS_LDFLAGS)
  437. lu_lu_example_double_SOURCES = \
  438. lu/lu_example_double.c \
  439. lu/dlu.c \
  440. lu/dlu_pivot.c \
  441. lu/dlu_kernels.c \
  442. common/blas.c
  443. lu_lu_example_double_LDADD = \
  444. $(STARPU_BLAS_LDFLAGS)
  445. lu_lu_implicit_example_float_SOURCES = \
  446. lu/lu_example_float.c \
  447. lu/slu_implicit.c \
  448. lu/slu_implicit_pivot.c \
  449. lu/slu_kernels.c \
  450. common/blas.c
  451. lu_lu_implicit_example_float_LDADD = \
  452. $(STARPU_BLAS_LDFLAGS)
  453. lu_lu_implicit_example_double_SOURCES = \
  454. lu/lu_example_double.c \
  455. lu/dlu_implicit.c \
  456. lu/dlu_implicit_pivot.c \
  457. lu/dlu_kernels.c \
  458. common/blas.c
  459. lu_lu_implicit_example_double_LDADD = \
  460. $(STARPU_BLAS_LDFLAGS)
  461. if MKL_BLAS_LIB
  462. lu_lu_example_complex_float_SOURCES = \
  463. lu/lu_example_complex_float.c \
  464. lu/clu.c \
  465. lu/clu_pivot.c \
  466. lu/clu_kernels.c \
  467. lu/blas_complex.c \
  468. common/blas.c
  469. lu_lu_example_complex_float_LDADD = \
  470. $(STARPU_BLAS_LDFLAGS)
  471. lu_lu_implicit_example_complex_float_SOURCES = \
  472. lu/lu_example_complex_float.c \
  473. lu/clu_implicit.c \
  474. lu/clu_implicit_pivot.c \
  475. lu/clu_kernels.c \
  476. lu/blas_complex.c \
  477. common/blas.c
  478. lu_lu_implicit_example_complex_float_LDADD = \
  479. $(STARPU_BLAS_LDFLAGS)
  480. lu_lu_example_complex_double_SOURCES = \
  481. lu/lu_example_complex_double.c \
  482. lu/zlu.c \
  483. lu/zlu_pivot.c \
  484. lu/zlu_kernels.c \
  485. lu/blas_complex.c \
  486. common/blas.c
  487. lu_lu_example_complex_double_LDADD = \
  488. $(STARPU_BLAS_LDFLAGS)
  489. lu_lu_implicit_example_complex_double_SOURCES = \
  490. lu/lu_example_complex_double.c \
  491. lu/zlu_implicit.c \
  492. lu/zlu_implicit_pivot.c \
  493. lu/zlu_kernels.c \
  494. lu/blas_complex.c \
  495. common/blas.c
  496. lu_lu_implicit_example_complex_double_LDADD = \
  497. $(STARPU_BLAS_LDFLAGS)
  498. endif
  499. endif
  500. ################
  501. # Heat example #
  502. ################
  503. if !NO_BLAS_LIB
  504. heat_heat_SOURCES = \
  505. heat/heat.c \
  506. heat/dw_factolu.c \
  507. heat/dw_factolu_tag.c \
  508. heat/dw_factolu_grain.c \
  509. heat/dw_sparse_cg.c \
  510. heat/heat_display.c \
  511. heat/lu_kernels_model.c \
  512. heat/dw_sparse_cg_kernels.c \
  513. heat/dw_factolu_kernels.c \
  514. common/blas.c
  515. heat_heat_LDADD = \
  516. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  517. $(STARPU_BLAS_LDFLAGS)
  518. endif
  519. ##############
  520. # CG example #
  521. ##############
  522. if !NO_BLAS_LIB
  523. cg_cg_SOURCES = \
  524. cg/cg.c \
  525. cg/cg_kernels.c \
  526. common/blas.c
  527. if STARPU_USE_CUDA
  528. cg_cg_SOURCES += \
  529. cg/cg_dot_kernel.cu
  530. cg/cg_dot_kernel.o: cg/cg_dot_kernel.cu
  531. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  532. endif
  533. cg_cg_LDADD = \
  534. $(STARPU_BLAS_LDFLAGS)
  535. endif
  536. ################
  537. # SPMD example #
  538. ################
  539. spmd_vector_scal_spmd_SOURCES = \
  540. spmd/vector_scal_spmd.c
  541. ################
  542. # SpMV example #
  543. ################
  544. spmv_spmv_SOURCES = \
  545. spmv/spmv.c \
  546. spmv/spmv_kernels.c
  547. if STARPU_USE_CUDA
  548. spmv_spmv_SOURCES += \
  549. spmv/spmv_cuda.cu
  550. endif
  551. if ATLAS_BLAS_LIB
  552. spmv_dw_block_spmv_SOURCES = \
  553. spmv/dw_block_spmv.c \
  554. spmv/dw_block_spmv_kernels.c \
  555. spmv/matrix_market/mm_to_bcsr.c \
  556. spmv/matrix_market/mmio.c
  557. spmv_dw_block_spmv_LDADD = \
  558. $(STARPU_BLAS_LDFLAGS)
  559. endif
  560. ###########################
  561. # C++ Incrementer example #
  562. ###########################
  563. cpp_incrementer_cpp_SOURCES = \
  564. cpp/incrementer_cpp.cpp
  565. if STARPU_USE_CUDA
  566. cpp_incrementer_cpp_SOURCES += \
  567. incrementer/incrementer_kernels.cu
  568. endif
  569. if STARPU_USE_OPENCL
  570. cpp_incrementer_cpp_SOURCES += \
  571. incrementer/incrementer_kernels_opencl.c
  572. endif
  573. #######################
  574. # Incrementer example #
  575. #######################
  576. incrementer_incrementer_SOURCES = \
  577. incrementer/incrementer.c
  578. if STARPU_USE_CUDA
  579. incrementer_incrementer_SOURCES += \
  580. incrementer/incrementer_kernels.cu
  581. endif
  582. if STARPU_USE_OPENCL
  583. incrementer_incrementer_SOURCES += \
  584. incrementer/incrementer_kernels_opencl.c
  585. nobase_STARPU_OPENCL_DATA_DATA += \
  586. incrementer/incrementer_kernels_opencl_kernel.cl
  587. endif
  588. ##################
  589. # Binary example #
  590. ##################
  591. binary_binary_SOURCES = \
  592. binary/binary.c
  593. if STARPU_USE_OPENCL
  594. binary_binary_SOURCES += \
  595. incrementer/incrementer_kernels_opencl.c
  596. endif
  597. #####################
  598. # interface example #
  599. #####################
  600. interface_complex_SOURCES = \
  601. interface/complex.c \
  602. interface/complex_interface.c
  603. if STARPU_USE_CUDA
  604. interface_complex_SOURCES += \
  605. interface/complex_kernels.cu
  606. interface/complex_kernels.o: interface/complex_kernels.cu
  607. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  608. endif
  609. if STARPU_USE_OPENCL
  610. interface_complex_SOURCES +=\
  611. interface/complex_kernels_opencl.c
  612. nobase_STARPU_OPENCL_DATA_DATA += \
  613. interface/complex_kernels.cl
  614. endif
  615. ######################
  616. # matVecMult example #
  617. ######################
  618. if STARPU_USE_OPENCL
  619. nobase_STARPU_OPENCL_DATA_DATA += \
  620. matvecmult/matvecmult_kernel.cl
  621. endif
  622. #######################
  623. # dot_product example #
  624. #######################
  625. reductions_dot_product_SOURCES = \
  626. reductions/dot_product.c
  627. if STARPU_USE_CUDA
  628. reductions_dot_product_SOURCES += \
  629. reductions/dot_product_kernels.cu
  630. reductions/dot_product_kernels.o: reductions/dot_product_kernels.cu
  631. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  632. endif
  633. if STARPU_USE_OPENCL
  634. nobase_STARPU_OPENCL_DATA_DATA += \
  635. reductions/dot_product_opencl_kernels.cl
  636. endif
  637. ##################
  638. # Mandelbrot Set #
  639. ##################
  640. examplebin_PROGRAMS += \
  641. mandelbrot/mandelbrot
  642. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  643. if HAVE_X11
  644. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  645. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11
  646. endif
  647. ################
  648. # Top Examples #
  649. ################
  650. examplebin_PROGRAMS += \
  651. top/hello_world_top
  652. top_hello_world_top_SOURCES = \
  653. top/hello_world_top.c
  654. ######
  655. # Pi #
  656. ######
  657. if !STARPU_HAVE_WINDOWS
  658. examplebin_PROGRAMS += \
  659. pi/pi \
  660. pi/pi_redux
  661. pi_pi_SOURCES = \
  662. pi/pi.c \
  663. pi/SobolQRNG/sobol_gold.c \
  664. pi/SobolQRNG/sobol_primitives.c
  665. if STARPU_USE_CUDA
  666. pi_pi_SOURCES += \
  667. pi/pi_kernel.cu \
  668. pi/SobolQRNG/sobol_gpu.cu
  669. endif
  670. pi_pi_redux_SOURCES = \
  671. pi/pi_redux.c
  672. if STARPU_USE_CUDA
  673. pi_pi_redux_SOURCES += \
  674. pi/pi_redux_kernel.cu
  675. pi_pi_redux_LDADD = \
  676. $(STARPU_CURAND_LDFLAGS)
  677. endif
  678. endif
  679. ###########################
  680. # OpenGL interoperability #
  681. ###########################
  682. if HAVE_OPENGL
  683. examplebin_PROGRAMS += \
  684. gl_interop/gl_interop \
  685. gl_interop/gl_interop_idle
  686. gl_interop_gl_interop_SOURCES = \
  687. gl_interop/gl_interop.c
  688. gl_interop_gl_interop_LDADD = \
  689. $(STARPU_OPENGL_RENDER_LDFLAGS)
  690. gl_interop_gl_interop_idle_SOURCES = \
  691. gl_interop/gl_interop_idle.c
  692. gl_interop_gl_interop_idle_LDADD = \
  693. $(STARPU_OPENGL_RENDER_LDFLAGS)
  694. endif
  695. ####################
  696. # pipeline example #
  697. ####################
  698. if !NO_BLAS_LIB
  699. pipeline_pipeline_SOURCES = \
  700. pipeline/pipeline.c \
  701. common/blas.c
  702. pipeline_pipeline_LDADD = \
  703. $(STARPU_BLAS_LDFLAGS)
  704. endif
  705. ##################
  706. # openmp example #
  707. ##################
  708. if !STARPU_HAVE_WINDOWS
  709. openmp_vector_scal_omp_CFLAGS = \
  710. $(AM_CFLAGS) -fopenmp
  711. sched_ctx_parallel_code_CFLAGS = \
  712. $(AM_CFLAGS) -fopenmp
  713. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  714. $(AM_CFLAGS) -fopenmp
  715. sched_ctx_nested_sched_ctxs_CFLAGS = \
  716. $(AM_CFLAGS) -fopenmp
  717. endif
  718. showcheck:
  719. -cat $(TEST_LOGS) /dev/null
  720. for i in $(SUBDIRS) ; do \
  721. make -C $$i showcheck ; \
  722. done