Makefile.am 19 KB

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