Makefile.am 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890
  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. sched_ctx/sched_ctx_without_sched_policy_awake
  229. if STARPU_LONG_CHECK
  230. STARPU_EXAMPLES += \
  231. sched_ctx/parallel_code
  232. endif
  233. endif
  234. ##################
  235. # Basic examples #
  236. ##################
  237. basic_examples_vector_scal_SOURCES = \
  238. basic_examples/vector_scal.c \
  239. basic_examples/vector_scal_cpu.c
  240. if STARPU_HAVE_ICC
  241. if STARPU_CROSS_COMPILING
  242. else
  243. basic_examples_vector_scal_SOURCES += \
  244. basic_examples/vector_scal_cpu_icc.icc
  245. endif
  246. endif
  247. if STARPU_USE_CUDA
  248. basic_examples_vector_scal_SOURCES += \
  249. basic_examples/vector_scal_cuda.cu
  250. endif
  251. if STARPU_USE_OPENCL
  252. basic_examples_vector_scal_SOURCES += \
  253. basic_examples/vector_scal_opencl.c
  254. nobase_STARPU_OPENCL_DATA_DATA += \
  255. basic_examples/vector_scal_opencl_kernel.cl
  256. endif
  257. if STARPU_HAVE_F77_H
  258. basic_examples_vector_scal_fortran_SOURCES = \
  259. basic_examples/vector_scal_fortran.F \
  260. basic_examples/vector_scal_c.c \
  261. basic_examples/vector_scal_cpu.c
  262. if STARPU_USE_CUDA
  263. basic_examples_vector_scal_fortran_SOURCES += \
  264. basic_examples/vector_scal_cuda.cu
  265. basic_examples_vector_scal_fortran_LDADD = \
  266. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  267. endif
  268. fortran_hello_SOURCES = \
  269. fortran/hello_c.c \
  270. fortran/hello.F \
  271. fortran/StarPU_fortran.h
  272. endif
  273. #######################
  274. # Multiformat example #
  275. #######################
  276. basic_examples_multiformat_SOURCES = \
  277. basic_examples/multiformat.c \
  278. basic_examples/multiformat_conversion_codelets.c
  279. if STARPU_USE_CUDA
  280. basic_examples_multiformat_SOURCES += \
  281. basic_examples/multiformat_cuda.cu \
  282. basic_examples/multiformat_conversion_codelets_cuda.cu
  283. endif
  284. if STARPU_USE_OPENCL
  285. basic_examples_multiformat_SOURCES += \
  286. basic_examples/multiformat_opencl.c \
  287. basic_examples/multiformat_conversion_codelets_opencl.c
  288. nobase_STARPU_OPENCL_DATA_DATA += \
  289. basic_examples/multiformat_opencl_kernel.cl \
  290. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  291. endif
  292. #################
  293. # block example #
  294. #################
  295. basic_examples_block_SOURCES = \
  296. basic_examples/block.c \
  297. basic_examples/block_cpu.c
  298. if STARPU_USE_CUDA
  299. basic_examples_block_SOURCES += \
  300. basic_examples/block_cuda.cu
  301. endif
  302. if STARPU_USE_OPENCL
  303. basic_examples_block_SOURCES += \
  304. basic_examples/block_opencl.c
  305. nobase_STARPU_OPENCL_DATA_DATA += \
  306. basic_examples/block_opencl_kernel.cl
  307. endif
  308. ####################
  309. # Variable example #
  310. ####################
  311. basic_examples_variable_SOURCES = \
  312. basic_examples/variable.c \
  313. basic_examples/variable_kernels_cpu.c
  314. if STARPU_USE_CUDA
  315. basic_examples_variable_SOURCES += \
  316. basic_examples/variable_kernels.cu
  317. endif
  318. if STARPU_USE_OPENCL
  319. basic_examples_variable_SOURCES += \
  320. basic_examples/variable_kernels_opencl.c
  321. nobase_STARPU_OPENCL_DATA_DATA += \
  322. basic_examples/variable_kernels_opencl_kernel.cl
  323. endif
  324. ###########
  325. # Filters #
  326. ###########
  327. filters_fblock_SOURCES = \
  328. filters/fblock.c \
  329. filters/fblock_cpu.c
  330. if STARPU_USE_CUDA
  331. filters_fblock_SOURCES += \
  332. filters/fblock_cuda.cu
  333. endif
  334. if STARPU_USE_OPENCL
  335. filters_fblock_SOURCES += \
  336. filters/fblock_opencl.c
  337. nobase_STARPU_OPENCL_DATA_DATA += \
  338. filters/fblock_opencl_kernel.cl
  339. endif
  340. #############################
  341. # Custom multiformat filter #
  342. #############################
  343. #TODO: see why the application is failing
  344. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  345. examplebin_PROGRAMS += \
  346. filters/custom_mf/custom_mf_filter
  347. filters_custom_mf_custom_mf_filter_SOURCES=\
  348. filters/custom_mf/custom_mf_filter.c \
  349. filters/custom_mf/custom_interface.c \
  350. filters/custom_mf/custom_conversion_codelets.c
  351. if STARPU_USE_CUDA
  352. filters_custom_mf_custom_mf_filter_SOURCES += \
  353. filters/custom_mf/conversion.cu \
  354. filters/custom_mf/cuda.cu
  355. endif
  356. if STARPU_USE_OPENCL
  357. filters_custom_mf_custom_mf_filter_SOURCES += \
  358. filters/custom_mf/conversion_opencl.c \
  359. filters/custom_mf/custom_opencl.c
  360. nobase_STARPU_OPENCL_DATA_DATA += \
  361. filters/custom_mf/conversion_opencl.cl \
  362. filters/custom_mf/custom_opencl.cl
  363. endif
  364. ################
  365. # AXPY example #
  366. ################
  367. if !NO_BLAS_LIB
  368. axpy_axpy_SOURCES = \
  369. axpy/axpy.c \
  370. common/blas.c
  371. if STARPU_USE_OPENCL
  372. axpy_axpy_SOURCES += \
  373. axpy/axpy_opencl.c
  374. nobase_STARPU_OPENCL_DATA_DATA += \
  375. axpy/axpy_opencl_kernel.cl
  376. endif
  377. axpy_axpy_LDADD = \
  378. $(STARPU_BLAS_LDFLAGS)
  379. endif
  380. ################
  381. # Mult example #
  382. ################
  383. if !NO_BLAS_LIB
  384. mult_sgemm_SOURCES = \
  385. mult/sgemm.c \
  386. common/blas.c
  387. mult_sgemm_LDADD = \
  388. $(STARPU_BLAS_LDFLAGS)
  389. mult_dgemm_SOURCES = \
  390. mult/dgemm.c \
  391. common/blas.c
  392. mult_dgemm_LDADD = \
  393. $(STARPU_BLAS_LDFLAGS)
  394. endif
  395. ####################
  396. # Cholesky example #
  397. ####################
  398. if !NO_BLAS_LIB
  399. cholesky_cholesky_tag_SOURCES = \
  400. cholesky/cholesky_tag.c \
  401. cholesky/cholesky_models.c \
  402. cholesky/cholesky_kernels.c \
  403. common/blas.c
  404. cholesky_cholesky_tag_LDADD = \
  405. $(STARPU_BLAS_LDFLAGS)
  406. cholesky_cholesky_tile_tag_SOURCES = \
  407. cholesky/cholesky_tile_tag.c \
  408. cholesky/cholesky_models.c \
  409. cholesky/cholesky_kernels.c \
  410. common/blas.c
  411. cholesky_cholesky_tile_tag_LDADD = \
  412. $(STARPU_BLAS_LDFLAGS)
  413. cholesky_cholesky_grain_tag_SOURCES = \
  414. cholesky/cholesky_grain_tag.c \
  415. cholesky/cholesky_models.c \
  416. cholesky/cholesky_kernels.c \
  417. common/blas.c
  418. cholesky_cholesky_grain_tag_LDADD = \
  419. $(STARPU_BLAS_LDFLAGS)
  420. cholesky_cholesky_implicit_SOURCES = \
  421. cholesky/cholesky_implicit.c \
  422. cholesky/cholesky_models.c \
  423. cholesky/cholesky_kernels.c \
  424. sched_ctx_utils/sched_ctx_utils.c \
  425. common/blas.c
  426. cholesky_cholesky_implicit_LDADD = \
  427. $(STARPU_BLAS_LDFLAGS)
  428. endif
  429. ##############
  430. # LU example #
  431. ##############
  432. if !NO_BLAS_LIB
  433. lu_lu_example_float_SOURCES = \
  434. lu/lu_example_float.c \
  435. lu/slu.c \
  436. lu/slu_pivot.c \
  437. lu/slu_kernels.c \
  438. common/blas.c
  439. lu_lu_example_float_LDADD = \
  440. $(STARPU_BLAS_LDFLAGS)
  441. lu_lu_example_double_SOURCES = \
  442. lu/lu_example_double.c \
  443. lu/dlu.c \
  444. lu/dlu_pivot.c \
  445. lu/dlu_kernels.c \
  446. common/blas.c
  447. lu_lu_example_double_LDADD = \
  448. $(STARPU_BLAS_LDFLAGS)
  449. lu_lu_implicit_example_float_SOURCES = \
  450. lu/lu_example_float.c \
  451. lu/slu_implicit.c \
  452. lu/slu_implicit_pivot.c \
  453. lu/slu_kernels.c \
  454. common/blas.c
  455. lu_lu_implicit_example_float_LDADD = \
  456. $(STARPU_BLAS_LDFLAGS)
  457. lu_lu_implicit_example_double_SOURCES = \
  458. lu/lu_example_double.c \
  459. lu/dlu_implicit.c \
  460. lu/dlu_implicit_pivot.c \
  461. lu/dlu_kernels.c \
  462. common/blas.c
  463. lu_lu_implicit_example_double_LDADD = \
  464. $(STARPU_BLAS_LDFLAGS)
  465. if MKL_BLAS_LIB
  466. lu_lu_example_complex_float_SOURCES = \
  467. lu/lu_example_complex_float.c \
  468. lu/clu.c \
  469. lu/clu_pivot.c \
  470. lu/clu_kernels.c \
  471. lu/blas_complex.c \
  472. common/blas.c
  473. lu_lu_example_complex_float_LDADD = \
  474. $(STARPU_BLAS_LDFLAGS)
  475. lu_lu_implicit_example_complex_float_SOURCES = \
  476. lu/lu_example_complex_float.c \
  477. lu/clu_implicit.c \
  478. lu/clu_implicit_pivot.c \
  479. lu/clu_kernels.c \
  480. lu/blas_complex.c \
  481. common/blas.c
  482. lu_lu_implicit_example_complex_float_LDADD = \
  483. $(STARPU_BLAS_LDFLAGS)
  484. lu_lu_example_complex_double_SOURCES = \
  485. lu/lu_example_complex_double.c \
  486. lu/zlu.c \
  487. lu/zlu_pivot.c \
  488. lu/zlu_kernels.c \
  489. lu/blas_complex.c \
  490. common/blas.c
  491. lu_lu_example_complex_double_LDADD = \
  492. $(STARPU_BLAS_LDFLAGS)
  493. lu_lu_implicit_example_complex_double_SOURCES = \
  494. lu/lu_example_complex_double.c \
  495. lu/zlu_implicit.c \
  496. lu/zlu_implicit_pivot.c \
  497. lu/zlu_kernels.c \
  498. lu/blas_complex.c \
  499. common/blas.c
  500. lu_lu_implicit_example_complex_double_LDADD = \
  501. $(STARPU_BLAS_LDFLAGS)
  502. endif
  503. endif
  504. ################
  505. # Heat example #
  506. ################
  507. if !NO_BLAS_LIB
  508. heat_heat_SOURCES = \
  509. heat/heat.c \
  510. heat/dw_factolu.c \
  511. heat/dw_factolu_tag.c \
  512. heat/dw_factolu_grain.c \
  513. heat/dw_sparse_cg.c \
  514. heat/heat_display.c \
  515. heat/lu_kernels_model.c \
  516. heat/dw_sparse_cg_kernels.c \
  517. heat/dw_factolu_kernels.c \
  518. common/blas.c
  519. heat_heat_LDADD = \
  520. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  521. $(STARPU_BLAS_LDFLAGS)
  522. endif
  523. ##############
  524. # CG example #
  525. ##############
  526. if !NO_BLAS_LIB
  527. cg_cg_SOURCES = \
  528. cg/cg.c \
  529. cg/cg_kernels.c \
  530. common/blas.c
  531. if STARPU_USE_CUDA
  532. cg_cg_SOURCES += \
  533. cg/cg_dot_kernel.cu
  534. cg/cg_dot_kernel.o: cg/cg_dot_kernel.cu
  535. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  536. endif
  537. cg_cg_LDADD = \
  538. $(STARPU_BLAS_LDFLAGS)
  539. endif
  540. ################
  541. # SPMD example #
  542. ################
  543. spmd_vector_scal_spmd_SOURCES = \
  544. spmd/vector_scal_spmd.c
  545. ################
  546. # SpMV example #
  547. ################
  548. spmv_spmv_SOURCES = \
  549. spmv/spmv.c \
  550. spmv/spmv_kernels.c
  551. if STARPU_USE_CUDA
  552. spmv_spmv_SOURCES += \
  553. spmv/spmv_cuda.cu
  554. endif
  555. if ATLAS_BLAS_LIB
  556. spmv_dw_block_spmv_SOURCES = \
  557. spmv/dw_block_spmv.c \
  558. spmv/dw_block_spmv_kernels.c \
  559. spmv/matrix_market/mm_to_bcsr.c \
  560. spmv/matrix_market/mmio.c
  561. spmv_dw_block_spmv_LDADD = \
  562. $(STARPU_BLAS_LDFLAGS)
  563. endif
  564. ###########################
  565. # C++ Incrementer example #
  566. ###########################
  567. cpp_incrementer_cpp_SOURCES = \
  568. cpp/incrementer_cpp.cpp
  569. if STARPU_USE_CUDA
  570. cpp_incrementer_cpp_SOURCES += \
  571. incrementer/incrementer_kernels.cu
  572. endif
  573. if STARPU_USE_OPENCL
  574. cpp_incrementer_cpp_SOURCES += \
  575. incrementer/incrementer_kernels_opencl.c
  576. endif
  577. #######################
  578. # Incrementer example #
  579. #######################
  580. incrementer_incrementer_SOURCES = \
  581. incrementer/incrementer.c
  582. if STARPU_USE_CUDA
  583. incrementer_incrementer_SOURCES += \
  584. incrementer/incrementer_kernels.cu
  585. endif
  586. if STARPU_USE_OPENCL
  587. incrementer_incrementer_SOURCES += \
  588. incrementer/incrementer_kernels_opencl.c
  589. nobase_STARPU_OPENCL_DATA_DATA += \
  590. incrementer/incrementer_kernels_opencl_kernel.cl
  591. endif
  592. ##################
  593. # Binary example #
  594. ##################
  595. binary_binary_SOURCES = \
  596. binary/binary.c
  597. if STARPU_USE_OPENCL
  598. binary_binary_SOURCES += \
  599. incrementer/incrementer_kernels_opencl.c
  600. endif
  601. #####################
  602. # interface example #
  603. #####################
  604. interface_complex_SOURCES = \
  605. interface/complex.c \
  606. interface/complex_interface.c
  607. if STARPU_USE_CUDA
  608. interface_complex_SOURCES += \
  609. interface/complex_kernels.cu
  610. interface/complex_kernels.o: interface/complex_kernels.cu
  611. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  612. endif
  613. if STARPU_USE_OPENCL
  614. interface_complex_SOURCES +=\
  615. interface/complex_kernels_opencl.c
  616. nobase_STARPU_OPENCL_DATA_DATA += \
  617. interface/complex_kernels.cl
  618. endif
  619. ######################
  620. # matVecMult example #
  621. ######################
  622. if STARPU_USE_OPENCL
  623. nobase_STARPU_OPENCL_DATA_DATA += \
  624. matvecmult/matvecmult_kernel.cl
  625. endif
  626. #######################
  627. # dot_product example #
  628. #######################
  629. reductions_dot_product_SOURCES = \
  630. reductions/dot_product.c
  631. if STARPU_USE_CUDA
  632. reductions_dot_product_SOURCES += \
  633. reductions/dot_product_kernels.cu
  634. reductions/dot_product_kernels.o: reductions/dot_product_kernels.cu
  635. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  636. endif
  637. if STARPU_USE_OPENCL
  638. nobase_STARPU_OPENCL_DATA_DATA += \
  639. reductions/dot_product_opencl_kernels.cl
  640. endif
  641. ##################
  642. # Mandelbrot Set #
  643. ##################
  644. examplebin_PROGRAMS += \
  645. mandelbrot/mandelbrot
  646. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  647. if HAVE_X11
  648. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  649. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11
  650. endif
  651. ################
  652. # Top Examples #
  653. ################
  654. examplebin_PROGRAMS += \
  655. top/hello_world_top
  656. top_hello_world_top_SOURCES = \
  657. top/hello_world_top.c
  658. ######
  659. # Pi #
  660. ######
  661. if !STARPU_HAVE_WINDOWS
  662. examplebin_PROGRAMS += \
  663. pi/pi \
  664. pi/pi_redux
  665. pi_pi_SOURCES = \
  666. pi/pi.c \
  667. pi/SobolQRNG/sobol_gold.c \
  668. pi/SobolQRNG/sobol_primitives.c
  669. if STARPU_USE_CUDA
  670. pi_pi_SOURCES += \
  671. pi/pi_kernel.cu \
  672. pi/SobolQRNG/sobol_gpu.cu
  673. endif
  674. pi_pi_redux_SOURCES = \
  675. pi/pi_redux.c
  676. if STARPU_USE_CUDA
  677. pi_pi_redux_SOURCES += \
  678. pi/pi_redux_kernel.cu
  679. pi_pi_redux_LDADD = \
  680. $(STARPU_CURAND_LDFLAGS)
  681. endif
  682. endif
  683. ###########################
  684. # OpenGL interoperability #
  685. ###########################
  686. if HAVE_OPENGL
  687. examplebin_PROGRAMS += \
  688. gl_interop/gl_interop \
  689. gl_interop/gl_interop_idle
  690. gl_interop_gl_interop_SOURCES = \
  691. gl_interop/gl_interop.c
  692. gl_interop_gl_interop_LDADD = \
  693. $(STARPU_OPENGL_RENDER_LDFLAGS)
  694. gl_interop_gl_interop_idle_SOURCES = \
  695. gl_interop/gl_interop_idle.c
  696. gl_interop_gl_interop_idle_LDADD = \
  697. $(STARPU_OPENGL_RENDER_LDFLAGS)
  698. endif
  699. ####################
  700. # pipeline example #
  701. ####################
  702. if !NO_BLAS_LIB
  703. pipeline_pipeline_SOURCES = \
  704. pipeline/pipeline.c \
  705. common/blas.c
  706. pipeline_pipeline_LDADD = \
  707. $(STARPU_BLAS_LDFLAGS)
  708. endif
  709. ##################
  710. # openmp example #
  711. ##################
  712. if !STARPU_HAVE_WINDOWS
  713. openmp_vector_scal_omp_CFLAGS = \
  714. $(AM_CFLAGS) -fopenmp
  715. sched_ctx_parallel_code_CFLAGS = \
  716. $(AM_CFLAGS) -fopenmp
  717. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  718. $(AM_CFLAGS) -fopenmp
  719. sched_ctx_nested_sched_ctxs_CFLAGS = \
  720. $(AM_CFLAGS) -fopenmp
  721. endif
  722. showcheck:
  723. -cat $(TEST_LOGS) /dev/null
  724. for i in $(SUBDIRS) ; do \
  725. make -C $$i showcheck ; \
  726. done