Makefile.am 20 KB

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