Makefile.am 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834
  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) 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. 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. 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. 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. openmp/vector_scal.c \
  50. filters/fblock_opencl_kernel.cl \
  51. filters/custom_mf/conversion_opencl.cl \
  52. filters/custom_mf/custom_opencl.cl \
  53. interface/complex_kernels.cl \
  54. reductions/dot_product_opencl_kernels.cl \
  55. scheduler/schedulers.sh
  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. common/blas_model.h \
  101. common/blas.h \
  102. mult/simple.h \
  103. mult/double.h \
  104. gordon/null.h \
  105. fortran/bindings/StarPU_fortran.h \
  106. ppm_downscaler/ppm_downscaler.h \
  107. ppm_downscaler/yuv_downscaler.h \
  108. spmv/matrix_market/mmio.h \
  109. spmv/matrix_market/mm_to_bcsr.h \
  110. spmv/spmv.h \
  111. spmv/dw_block_spmv.h \
  112. basic_examples/multiformat_types.h \
  113. filters/custom_mf/custom_interface.h \
  114. filters/custom_mf/custom_types.h \
  115. interface/complex_interface.h \
  116. pi/pi.h \
  117. pi/SobolQRNG/sobol.h \
  118. pi/SobolQRNG/sobol_gold.h \
  119. pi/SobolQRNG/sobol_gpu.h \
  120. pi/SobolQRNG/sobol_primitives.h \
  121. reductions/dot_product.h
  122. #####################################
  123. # What to install and what to check #
  124. #####################################
  125. STARPU_EXAMPLES =
  126. TESTS = $(STARPU_EXAMPLES)
  127. TESTS += scheduler/schedulers.sh
  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. spmd/vector_scal_spmd \
  159. spmv/spmv \
  160. callback/callback \
  161. incrementer/incrementer \
  162. interface/complex \
  163. matvecmult/matvecmult \
  164. profiling/profiling \
  165. scheduler/dummy_sched \
  166. reductions/dot_product \
  167. reductions/minmax_reduction \
  168. mandelbrot/mandelbrot \
  169. ppm_downscaler/ppm_downscaler \
  170. ppm_downscaler/yuv_downscaler
  171. if STARPU_HAVE_F77_H
  172. examplebin_PROGRAMS += \
  173. basic_examples/vector_scal_fortran
  174. endif
  175. if !NO_BLAS_LIB
  176. examplebin_PROGRAMS += \
  177. axpy/axpy \
  178. mult/sgemm \
  179. mult/dgemm \
  180. cholesky/cholesky_tag \
  181. cholesky/cholesky_tile_tag \
  182. cholesky/cholesky_grain_tag \
  183. cholesky/cholesky_implicit \
  184. lu/lu_example_float \
  185. lu/lu_example_double \
  186. lu/lu_implicit_example_float \
  187. lu/lu_implicit_example_double \
  188. heat/heat \
  189. cg/cg
  190. endif
  191. if MKL_BLAS_LIB
  192. examplebin_PROGRAMS += \
  193. lu/lu_example_complex_float \
  194. lu/lu_example_complex_double \
  195. lu/lu_implicit_example_complex_float \
  196. lu/lu_implicit_example_complex_double
  197. endif
  198. if ATLAS_BLAS_LIB
  199. examplebin_PROGRAMS += \
  200. spmv/dw_block_spmv
  201. endif
  202. STARPU_EXAMPLES += \
  203. basic_examples/hello_world \
  204. basic_examples/vector_scal \
  205. basic_examples/mult \
  206. basic_examples/block \
  207. basic_examples/variable \
  208. basic_examples/multiformat \
  209. cpp/incrementer_cpp \
  210. filters/fvector \
  211. filters/fblock \
  212. filters/fmatrix \
  213. tag_example/tag_example \
  214. tag_example/tag_example2 \
  215. tag_example/tag_example3 \
  216. tag_example/tag_example4 \
  217. tag_example/tag_restartable \
  218. spmd/vector_scal_spmd \
  219. spmv/spmv \
  220. callback/callback \
  221. incrementer/incrementer \
  222. interface/complex \
  223. matvecmult/matvecmult \
  224. profiling/profiling \
  225. scheduler/dummy_sched \
  226. reductions/dot_product \
  227. reductions/minmax_reduction
  228. if STARPU_HAVE_F77_H
  229. STARPU_EXAMPLES += \
  230. basic_examples/vector_scal_fortran
  231. endif
  232. if !NO_BLAS_LIB
  233. STARPU_EXAMPLES += \
  234. axpy/axpy \
  235. mult/sgemm \
  236. mult/dgemm \
  237. cholesky/cholesky_tag \
  238. cholesky/cholesky_tile_tag \
  239. cholesky/cholesky_grain_tag \
  240. cholesky/cholesky_implicit \
  241. lu/lu_example_float \
  242. lu/lu_example_double \
  243. lu/lu_implicit_example_float \
  244. lu/lu_implicit_example_double \
  245. heat/heat \
  246. cg/cg
  247. endif
  248. if MKL_BLAS_LIB
  249. STARPU_EXAMPLES += \
  250. lu/lu_example_complex_float \
  251. lu/lu_example_complex_double \
  252. lu/lu_implicit_example_complex_float \
  253. lu/lu_implicit_example_complex_double
  254. endif
  255. if ATLAS_BLAS_LIB
  256. STARPU_EXAMPLES += \
  257. spmv/dw_block_spmv
  258. endif
  259. ##################
  260. # Basic examples #
  261. ##################
  262. basic_examples_vector_scal_SOURCES = \
  263. basic_examples/vector_scal.c \
  264. basic_examples/vector_scal_cpu.c
  265. if STARPU_HAVE_ICC
  266. basic_examples_vector_scal_SOURCES += \
  267. basic_examples/vector_scal_cpu_icc.icc
  268. basic_examples/vector_scal_cpu_icc.o: CFLAGS += -Dscal_cpu_func=scal_cpu_func_icc -Dscal_sse_func=scal_sse_func_icc
  269. endif
  270. if STARPU_USE_CUDA
  271. basic_examples_vector_scal_SOURCES += \
  272. basic_examples/vector_scal_cuda.cu
  273. endif
  274. if STARPU_USE_OPENCL
  275. basic_examples_vector_scal_SOURCES += \
  276. basic_examples/vector_scal_opencl.c
  277. nobase_STARPU_OPENCL_DATA_DATA += \
  278. basic_examples/vector_scal_opencl_kernel.cl
  279. endif
  280. if STARPU_HAVE_F77_H
  281. basic_examples_vector_scal_fortran_SOURCES = \
  282. basic_examples/vector_scal_fortran.F \
  283. basic_examples/vector_scal_c.c \
  284. basic_examples/vector_scal_cpu.c
  285. if STARPU_USE_CUDA
  286. basic_examples_vector_scal_fortran_SOURCES += \
  287. basic_examples/vector_scal_cuda.cu
  288. basic_examples_vector_scal_fortran_LDADD = \
  289. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  290. endif
  291. endif
  292. #######################
  293. # Multiformat example #
  294. #######################
  295. basic_examples_multiformat_SOURCES = \
  296. basic_examples/multiformat.c \
  297. basic_examples/multiformat_conversion_codelets.c
  298. if STARPU_USE_CUDA
  299. basic_examples_multiformat_SOURCES += \
  300. basic_examples/multiformat_cuda.cu \
  301. basic_examples/multiformat_conversion_codelets_cuda.cu
  302. endif
  303. if STARPU_USE_OPENCL
  304. basic_examples_multiformat_SOURCES += \
  305. basic_examples/multiformat_opencl.c \
  306. basic_examples/multiformat_conversion_codelets_opencl.c
  307. nobase_STARPU_OPENCL_DATA_DATA += \
  308. basic_examples/multiformat_opencl_kernel.cl \
  309. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  310. endif
  311. #################
  312. # block example #
  313. #################
  314. basic_examples_block_SOURCES = \
  315. basic_examples/block.c \
  316. basic_examples/block_cpu.c
  317. if STARPU_USE_CUDA
  318. basic_examples_block_SOURCES += \
  319. basic_examples/block_cuda.cu
  320. endif
  321. if STARPU_USE_OPENCL
  322. basic_examples_block_SOURCES += \
  323. basic_examples/block_opencl.c
  324. nobase_STARPU_OPENCL_DATA_DATA += \
  325. basic_examples/block_opencl_kernel.cl
  326. endif
  327. ####################
  328. # Variable example #
  329. ####################
  330. basic_examples_variable_SOURCES = \
  331. basic_examples/variable.c \
  332. basic_examples/variable_kernels_cpu.c
  333. if STARPU_USE_CUDA
  334. basic_examples_variable_SOURCES += \
  335. basic_examples/variable_kernels.cu
  336. endif
  337. if STARPU_USE_OPENCL
  338. basic_examples_variable_SOURCES += \
  339. basic_examples/variable_kernels_opencl.c
  340. nobase_STARPU_OPENCL_DATA_DATA += \
  341. basic_examples/variable_kernels_opencl_kernel.cl
  342. endif
  343. ###########
  344. # Filters #
  345. ###########
  346. filters_fblock_SOURCES = \
  347. filters/fblock.c \
  348. filters/fblock_cpu.c
  349. if STARPU_USE_CUDA
  350. filters_fblock_SOURCES += \
  351. filters/fblock_cuda.cu
  352. endif
  353. if STARPU_USE_OPENCL
  354. filters_fblock_SOURCES += \
  355. filters/fblock_opencl.c
  356. nobase_STARPU_OPENCL_DATA_DATA += \
  357. filters/fblock_opencl_kernel.cl
  358. endif
  359. #############################
  360. # Custom multiformat filter #
  361. #############################
  362. filters_custom_mf_custom_mf_filter_SOURCES=\
  363. filters/custom_mf/custom_mf_filter.c \
  364. filters/custom_mf/custom_interface.c \
  365. filters/custom_mf/custom_conversion_codelets.c
  366. if STARPU_USE_CUDA
  367. filters_custom_mf_custom_mf_filter_SOURCES += \
  368. filters/custom_mf/conversion.cu \
  369. filters/custom_mf/cuda.cu
  370. endif
  371. if STARPU_USE_OPENCL
  372. filters_custom_mf_custom_mf_filter_SOURCES += \
  373. filters/custom_mf/conversion_opencl.c \
  374. filters/custom_mf/custom_opencl.c
  375. nobase_STARPU_OPENCL_DATA_DATA += \
  376. filters/custom_mf/conversion_opencl.cl \
  377. filters/custom_mf/custom_opencl.cl
  378. endif
  379. ################
  380. # AXPY example #
  381. ################
  382. if !NO_BLAS_LIB
  383. axpy_axpy_SOURCES = \
  384. axpy/axpy.c \
  385. common/blas.c
  386. if STARPU_USE_OPENCL
  387. axpy_axpy_SOURCES += \
  388. axpy/axpy_opencl.c
  389. nobase_STARPU_OPENCL_DATA_DATA += \
  390. axpy/axpy_opencl_kernel.cl
  391. endif
  392. axpy_axpy_LDADD = \
  393. $(STARPU_BLAS_LDFLAGS)
  394. endif
  395. ################
  396. # Mult example #
  397. ################
  398. if !NO_BLAS_LIB
  399. mult_sgemm_SOURCES = \
  400. mult/sgemm.c \
  401. common/blas.c
  402. mult_sgemm_LDADD = \
  403. $(STARPU_BLAS_LDFLAGS)
  404. mult_dgemm_SOURCES = \
  405. mult/dgemm.c \
  406. common/blas.c
  407. mult_dgemm_LDADD = \
  408. $(STARPU_BLAS_LDFLAGS)
  409. endif
  410. ####################
  411. # Cholesky example #
  412. ####################
  413. if !NO_BLAS_LIB
  414. cholesky_cholesky_tag_SOURCES = \
  415. cholesky/cholesky_tag.c \
  416. cholesky/cholesky_models.c \
  417. cholesky/cholesky_kernels.c \
  418. common/blas.c
  419. cholesky_cholesky_tag_LDADD = \
  420. $(STARPU_BLAS_LDFLAGS)
  421. cholesky_cholesky_tile_tag_SOURCES = \
  422. cholesky/cholesky_tile_tag.c \
  423. cholesky/cholesky_models.c \
  424. cholesky/cholesky_kernels.c \
  425. common/blas.c
  426. cholesky_cholesky_tile_tag_LDADD = \
  427. $(STARPU_BLAS_LDFLAGS)
  428. cholesky_cholesky_grain_tag_SOURCES = \
  429. cholesky/cholesky_grain_tag.c \
  430. cholesky/cholesky_models.c \
  431. cholesky/cholesky_kernels.c \
  432. common/blas.c
  433. cholesky_cholesky_grain_tag_LDADD = \
  434. $(STARPU_BLAS_LDFLAGS)
  435. cholesky_cholesky_implicit_SOURCES = \
  436. cholesky/cholesky_implicit.c \
  437. cholesky/cholesky_models.c \
  438. cholesky/cholesky_kernels.c \
  439. common/blas.c
  440. cholesky_cholesky_implicit_LDADD = \
  441. $(STARPU_BLAS_LDFLAGS)
  442. endif
  443. ##############
  444. # LU example #
  445. ##############
  446. if !NO_BLAS_LIB
  447. lu_lu_example_float_SOURCES = \
  448. lu/lu_example_float.c \
  449. lu/slu.c \
  450. lu/slu_pivot.c \
  451. lu/slu_kernels.c \
  452. common/blas.c
  453. lu_lu_example_float_LDADD = \
  454. $(STARPU_BLAS_LDFLAGS)
  455. lu_lu_example_double_SOURCES = \
  456. lu/lu_example_double.c \
  457. lu/dlu.c \
  458. lu/dlu_pivot.c \
  459. lu/dlu_kernels.c \
  460. common/blas.c
  461. lu_lu_example_double_LDADD = \
  462. $(STARPU_BLAS_LDFLAGS)
  463. lu_lu_implicit_example_float_SOURCES = \
  464. lu/lu_example_float.c \
  465. lu/slu_implicit.c \
  466. lu/slu_implicit_pivot.c \
  467. lu/slu_kernels.c \
  468. common/blas.c
  469. lu_lu_implicit_example_float_LDADD = \
  470. $(STARPU_BLAS_LDFLAGS)
  471. lu_lu_implicit_example_double_SOURCES = \
  472. lu/lu_example_double.c \
  473. lu/dlu_implicit.c \
  474. lu/dlu_implicit_pivot.c \
  475. lu/dlu_kernels.c \
  476. common/blas.c
  477. lu_lu_implicit_example_double_LDADD = \
  478. $(STARPU_BLAS_LDFLAGS)
  479. if MKL_BLAS_LIB
  480. lu_lu_example_complex_float_SOURCES = \
  481. lu/lu_example_complex_float.c \
  482. lu/clu.c \
  483. lu/clu_pivot.c \
  484. lu/clu_kernels.c \
  485. lu/blas_complex.c \
  486. common/blas.c
  487. lu_lu_example_complex_float_LDADD = \
  488. $(STARPU_BLAS_LDFLAGS)
  489. lu_lu_implicit_example_complex_float_SOURCES = \
  490. lu/lu_example_complex_float.c \
  491. lu/clu_implicit.c \
  492. lu/clu_implicit_pivot.c \
  493. lu/clu_kernels.c \
  494. lu/blas_complex.c \
  495. common/blas.c
  496. lu_lu_implicit_example_complex_float_LDADD = \
  497. $(STARPU_BLAS_LDFLAGS)
  498. lu_lu_example_complex_double_SOURCES = \
  499. lu/lu_example_complex_double.c \
  500. lu/zlu.c \
  501. lu/zlu_pivot.c \
  502. lu/zlu_kernels.c \
  503. lu/blas_complex.c \
  504. common/blas.c
  505. lu_lu_example_complex_double_LDADD = \
  506. $(STARPU_BLAS_LDFLAGS)
  507. lu_lu_implicit_example_complex_double_SOURCES = \
  508. lu/lu_example_complex_double.c \
  509. lu/zlu_implicit.c \
  510. lu/zlu_implicit_pivot.c \
  511. lu/zlu_kernels.c \
  512. lu/blas_complex.c \
  513. common/blas.c
  514. lu_lu_implicit_example_complex_double_LDADD = \
  515. $(STARPU_BLAS_LDFLAGS)
  516. endif
  517. endif
  518. ################
  519. # Heat example #
  520. ################
  521. if !NO_BLAS_LIB
  522. heat_heat_SOURCES = \
  523. heat/heat.c \
  524. heat/dw_factolu.c \
  525. heat/dw_factolu_tag.c \
  526. heat/dw_factolu_grain.c \
  527. heat/dw_sparse_cg.c \
  528. heat/heat_display.c \
  529. heat/lu_kernels_model.c \
  530. heat/dw_sparse_cg_kernels.c \
  531. heat/dw_factolu_kernels.c \
  532. common/blas.c
  533. heat_heat_LDADD = \
  534. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  535. $(STARPU_BLAS_LDFLAGS)
  536. endif
  537. ##############
  538. # CG example #
  539. ##############
  540. if !NO_BLAS_LIB
  541. cg_cg_SOURCES = \
  542. cg/cg.c \
  543. cg/cg_kernels.c \
  544. common/blas.c
  545. if STARPU_USE_CUDA
  546. cg_cg_SOURCES += \
  547. cg/cg_dot_kernel.cu
  548. endif
  549. cg_cg_LDADD = \
  550. $(STARPU_BLAS_LDFLAGS)
  551. endif
  552. ################
  553. # SPMD example #
  554. ################
  555. spmd_vector_scal_spmd_SOURCES = \
  556. spmd/vector_scal_spmd.c
  557. ################
  558. # SpMV example #
  559. ################
  560. spmv_spmv_SOURCES = \
  561. spmv/spmv.c \
  562. spmv/spmv_kernels.c
  563. if STARPU_USE_CUDA
  564. spmv_spmv_SOURCES += \
  565. spmv/spmv_cuda.cu
  566. endif
  567. if ATLAS_BLAS_LIB
  568. spmv_dw_block_spmv_SOURCES = \
  569. spmv/dw_block_spmv.c \
  570. spmv/dw_block_spmv_kernels.c \
  571. spmv/matrix_market/mm_to_bcsr.c \
  572. spmv/matrix_market/mmio.c
  573. spmv_dw_block_spmv_LDADD = \
  574. $(STARPU_BLAS_LDFLAGS)
  575. endif
  576. ###########################
  577. # C++ Incrementer example #
  578. ###########################
  579. cpp_incrementer_cpp_SOURCES = \
  580. cpp/incrementer_cpp.cpp
  581. if STARPU_USE_CUDA
  582. cpp_incrementer_cpp_SOURCES += \
  583. incrementer/incrementer_kernels.cu
  584. endif
  585. if STARPU_USE_OPENCL
  586. cpp_incrementer_cpp_SOURCES += \
  587. incrementer/incrementer_kernels_opencl.c
  588. endif
  589. #######################
  590. # Incrementer example #
  591. #######################
  592. incrementer_incrementer_SOURCES = \
  593. incrementer/incrementer.c
  594. if STARPU_USE_CUDA
  595. incrementer_incrementer_SOURCES += \
  596. incrementer/incrementer_kernels.cu
  597. endif
  598. if STARPU_USE_OPENCL
  599. incrementer_incrementer_SOURCES += \
  600. incrementer/incrementer_kernels_opencl.c
  601. nobase_STARPU_OPENCL_DATA_DATA += \
  602. incrementer/incrementer_kernels_opencl_kernel.cl
  603. endif
  604. #####################
  605. # interface example #
  606. #####################
  607. interface_complex_SOURCES = \
  608. interface/complex.c \
  609. interface/complex_interface.c
  610. if STARPU_USE_CUDA
  611. interface_complex_SOURCES += \
  612. interface/complex_kernels.cu
  613. endif
  614. if STARPU_USE_OPENCL
  615. interface_complex_SOURCES +=\
  616. interface/complex_kernels_opencl.c
  617. nobase_STARPU_OPENCL_DATA_DATA += \
  618. interface/complex_kernels.cl
  619. endif
  620. ######################
  621. # matVecMult example #
  622. ######################
  623. if STARPU_USE_OPENCL
  624. nobase_STARPU_OPENCL_DATA_DATA += \
  625. matvecmult/matvecmult_kernel.cl
  626. endif
  627. #######################
  628. # dot_product example #
  629. #######################
  630. reductions_dot_product_SOURCES = \
  631. reductions/dot_product.c
  632. if STARPU_USE_CUDA
  633. reductions_dot_product_SOURCES += \
  634. reductions/dot_product_kernels.cu
  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. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  644. if HAVE_X11
  645. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  646. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11
  647. endif
  648. ################
  649. # Top Examples #
  650. ################
  651. examplebin_PROGRAMS += \
  652. top/hello_world_top
  653. top_hello_world_top_SOURCES = \
  654. top/hello_world_top.c
  655. ######
  656. # Pi #
  657. ######
  658. check_PROGRAMS += \
  659. pi/pi \
  660. pi/pi_redux
  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. showcheck:
  682. -cat $(TEST_LOGS) /dev/null
  683. for i in $(SUBDIRS) ; do \
  684. make -C $$i showcheck ; \
  685. done