Makefile.am 20 KB

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