Makefile.am 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842
  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/lu-float.h \
  95. lu/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. 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. spmd/vector_scal_spmd \
  218. spmv/spmv \
  219. callback/callback \
  220. incrementer/incrementer \
  221. interface/complex \
  222. matvecmult/matvecmult \
  223. profiling/profiling \
  224. scheduler/dummy_sched \
  225. reductions/dot_product \
  226. reductions/minmax_reduction
  227. if STARPU_HAVE_F77_H
  228. STARPU_EXAMPLES += \
  229. basic_examples/vector_scal_fortran
  230. endif
  231. if !NO_BLAS_LIB
  232. STARPU_EXAMPLES += \
  233. axpy/axpy \
  234. mult/sgemm \
  235. mult/dgemm \
  236. cholesky/cholesky_tag \
  237. cholesky/cholesky_tile_tag \
  238. cholesky/cholesky_grain_tag \
  239. cholesky/cholesky_implicit \
  240. lu/lu_example_float \
  241. lu/lu_example_double \
  242. lu/lu_implicit_example_float \
  243. lu/lu_implicit_example_double \
  244. heat/heat \
  245. cg/cg
  246. endif
  247. if MKL_BLAS_LIB
  248. STARPU_EXAMPLES += \
  249. lu/lu_example_complex_float \
  250. lu/lu_example_complex_double \
  251. lu/lu_implicit_example_complex_float \
  252. lu/lu_implicit_example_complex_double
  253. endif
  254. if ATLAS_BLAS_LIB
  255. STARPU_EXAMPLES += \
  256. spmv/dw_block_spmv
  257. endif
  258. ##################
  259. # Basic examples #
  260. ##################
  261. basic_examples_vector_scal_SOURCES = \
  262. basic_examples/vector_scal.c \
  263. basic_examples/vector_scal_cpu.c
  264. if STARPU_HAVE_ICC
  265. basic_examples_vector_scal_SOURCES += \
  266. basic_examples/vector_scal_cpu_icc.icc
  267. basic_examples/vector_scal_cpu_icc.o: CFLAGS += -Dscal_cpu_func=scal_cpu_func_icc -Dscal_sse_func=scal_sse_func_icc
  268. endif
  269. if STARPU_USE_CUDA
  270. basic_examples_vector_scal_SOURCES += \
  271. basic_examples/vector_scal_cuda.cu
  272. endif
  273. if STARPU_USE_OPENCL
  274. basic_examples_vector_scal_SOURCES += \
  275. basic_examples/vector_scal_opencl.c
  276. nobase_STARPU_OPENCL_DATA_DATA += \
  277. basic_examples/vector_scal_opencl_kernel.cl
  278. endif
  279. if STARPU_HAVE_F77_H
  280. basic_examples_vector_scal_fortran_SOURCES = \
  281. basic_examples/vector_scal_fortran.F \
  282. basic_examples/vector_scal_c.c \
  283. basic_examples/vector_scal_cpu.c
  284. if STARPU_USE_CUDA
  285. basic_examples_vector_scal_fortran_SOURCES += \
  286. basic_examples/vector_scal_cuda.cu
  287. basic_examples_vector_scal_fortran_LDADD = \
  288. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  289. endif
  290. endif
  291. #######################
  292. # Multiformat example #
  293. #######################
  294. basic_examples_multiformat_SOURCES = \
  295. basic_examples/multiformat.c \
  296. basic_examples/multiformat_conversion_codelets.c
  297. if STARPU_USE_CUDA
  298. basic_examples_multiformat_SOURCES += \
  299. basic_examples/multiformat_cuda.cu \
  300. basic_examples/multiformat_conversion_codelets_cuda.cu
  301. endif
  302. if STARPU_USE_OPENCL
  303. basic_examples_multiformat_SOURCES += \
  304. basic_examples/multiformat_opencl.c \
  305. basic_examples/multiformat_conversion_codelets_opencl.c
  306. nobase_STARPU_OPENCL_DATA_DATA += \
  307. basic_examples/multiformat_opencl_kernel.cl \
  308. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  309. endif
  310. #################
  311. # block example #
  312. #################
  313. basic_examples_block_SOURCES = \
  314. basic_examples/block.c \
  315. basic_examples/block_cpu.c
  316. if STARPU_USE_CUDA
  317. basic_examples_block_SOURCES += \
  318. basic_examples/block_cuda.cu
  319. endif
  320. if STARPU_USE_OPENCL
  321. basic_examples_block_SOURCES += \
  322. basic_examples/block_opencl.c
  323. nobase_STARPU_OPENCL_DATA_DATA += \
  324. basic_examples/block_opencl_kernel.cl
  325. endif
  326. ####################
  327. # Variable example #
  328. ####################
  329. basic_examples_variable_SOURCES = \
  330. basic_examples/variable.c \
  331. basic_examples/variable_kernels_cpu.c
  332. if STARPU_USE_CUDA
  333. basic_examples_variable_SOURCES += \
  334. basic_examples/variable_kernels.cu
  335. endif
  336. if STARPU_USE_OPENCL
  337. basic_examples_variable_SOURCES += \
  338. basic_examples/variable_kernels_opencl.c
  339. nobase_STARPU_OPENCL_DATA_DATA += \
  340. basic_examples/variable_kernels_opencl_kernel.cl
  341. endif
  342. ###########
  343. # Filters #
  344. ###########
  345. filters_fblock_SOURCES = \
  346. filters/fblock.c \
  347. filters/fblock_cpu.c
  348. if STARPU_USE_CUDA
  349. filters_fblock_SOURCES += \
  350. filters/fblock_cuda.cu
  351. endif
  352. if STARPU_USE_OPENCL
  353. filters_fblock_SOURCES += \
  354. filters/fblock_opencl.c
  355. nobase_STARPU_OPENCL_DATA_DATA += \
  356. filters/fblock_opencl_kernel.cl
  357. endif
  358. #############################
  359. # Custom multiformat filter #
  360. #############################
  361. filters_custom_mf_custom_mf_filter_SOURCES=\
  362. filters/custom_mf/custom_mf_filter.c \
  363. filters/custom_mf/custom_interface.c \
  364. filters/custom_mf/custom_conversion_codelets.c
  365. if STARPU_USE_CUDA
  366. filters_custom_mf_custom_mf_filter_SOURCES += \
  367. filters/custom_mf/conversion.cu \
  368. filters/custom_mf/cuda.cu
  369. endif
  370. if STARPU_USE_OPENCL
  371. filters_custom_mf_custom_mf_filter_SOURCES += \
  372. filters/custom_mf/conversion_opencl.c \
  373. filters/custom_mf/custom_opencl.c
  374. nobase_STARPU_OPENCL_DATA_DATA += \
  375. filters/custom_mf/conversion_opencl.cl \
  376. filters/custom_mf/custom_opencl.cl
  377. endif
  378. ################
  379. # AXPY example #
  380. ################
  381. if !NO_BLAS_LIB
  382. axpy_axpy_SOURCES = \
  383. axpy/axpy.c \
  384. common/blas.c
  385. if STARPU_USE_OPENCL
  386. axpy_axpy_SOURCES += \
  387. axpy/axpy_opencl.c
  388. nobase_STARPU_OPENCL_DATA_DATA += \
  389. axpy/axpy_opencl_kernel.cl
  390. endif
  391. axpy_axpy_LDADD = \
  392. $(STARPU_BLAS_LDFLAGS)
  393. endif
  394. ################
  395. # Mult example #
  396. ################
  397. if !NO_BLAS_LIB
  398. mult_sgemm_SOURCES = \
  399. mult/sgemm.c \
  400. common/blas.c
  401. mult_sgemm_LDADD = \
  402. $(STARPU_BLAS_LDFLAGS)
  403. mult_dgemm_SOURCES = \
  404. mult/dgemm.c \
  405. common/blas.c
  406. mult_dgemm_LDADD = \
  407. $(STARPU_BLAS_LDFLAGS)
  408. endif
  409. ####################
  410. # Cholesky example #
  411. ####################
  412. if !NO_BLAS_LIB
  413. cholesky_cholesky_tag_SOURCES = \
  414. cholesky/cholesky_tag.c \
  415. cholesky/cholesky_models.c \
  416. cholesky/cholesky_kernels.c \
  417. common/blas.c
  418. cholesky_cholesky_tag_LDADD = \
  419. $(STARPU_BLAS_LDFLAGS)
  420. cholesky_cholesky_tile_tag_SOURCES = \
  421. cholesky/cholesky_tile_tag.c \
  422. cholesky/cholesky_models.c \
  423. cholesky/cholesky_kernels.c \
  424. common/blas.c
  425. cholesky_cholesky_tile_tag_LDADD = \
  426. $(STARPU_BLAS_LDFLAGS)
  427. cholesky_cholesky_grain_tag_SOURCES = \
  428. cholesky/cholesky_grain_tag.c \
  429. cholesky/cholesky_models.c \
  430. cholesky/cholesky_kernels.c \
  431. common/blas.c
  432. cholesky_cholesky_grain_tag_LDADD = \
  433. $(STARPU_BLAS_LDFLAGS)
  434. cholesky_cholesky_implicit_SOURCES = \
  435. cholesky/cholesky_implicit.c \
  436. cholesky/cholesky_models.c \
  437. cholesky/cholesky_kernels.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. # SPMD example #
  553. ################
  554. spmd_vector_scal_spmd_SOURCES = \
  555. spmd/vector_scal_spmd.c
  556. ################
  557. # SpMV example #
  558. ################
  559. spmv_spmv_SOURCES = \
  560. spmv/spmv.c \
  561. spmv/spmv_kernels.c
  562. if STARPU_USE_CUDA
  563. spmv_spmv_SOURCES += \
  564. spmv/spmv_cuda.cu
  565. endif
  566. if ATLAS_BLAS_LIB
  567. spmv_dw_block_spmv_SOURCES = \
  568. spmv/dw_block_spmv.c \
  569. spmv/dw_block_spmv_kernels.c \
  570. spmv/matrix_market/mm_to_bcsr.c \
  571. spmv/matrix_market/mmio.c
  572. spmv_dw_block_spmv_LDADD = \
  573. $(STARPU_BLAS_LDFLAGS)
  574. endif
  575. ###########################
  576. # C++ Incrementer example #
  577. ###########################
  578. cpp_incrementer_cpp_SOURCES = \
  579. cpp/incrementer_cpp.cpp
  580. if STARPU_USE_CUDA
  581. cpp_incrementer_cpp_SOURCES += \
  582. incrementer/incrementer_kernels.cu
  583. endif
  584. if STARPU_USE_OPENCL
  585. cpp_incrementer_cpp_SOURCES += \
  586. incrementer/incrementer_kernels_opencl.c
  587. endif
  588. #######################
  589. # Incrementer example #
  590. #######################
  591. incrementer_incrementer_SOURCES = \
  592. incrementer/incrementer.c
  593. if STARPU_USE_CUDA
  594. incrementer_incrementer_SOURCES += \
  595. incrementer/incrementer_kernels.cu
  596. endif
  597. if STARPU_USE_OPENCL
  598. incrementer_incrementer_SOURCES += \
  599. incrementer/incrementer_kernels_opencl.c
  600. nobase_STARPU_OPENCL_DATA_DATA += \
  601. incrementer/incrementer_kernels_opencl_kernel.cl
  602. endif
  603. #####################
  604. # interface example #
  605. #####################
  606. interface_complex_SOURCES = \
  607. interface/complex.c \
  608. interface/complex_interface.c
  609. if STARPU_USE_CUDA
  610. interface_complex_SOURCES += \
  611. interface/complex_kernels.cu
  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. endif
  635. if STARPU_USE_OPENCL
  636. nobase_STARPU_OPENCL_DATA_DATA += \
  637. reductions/dot_product_opencl_kernels.cl
  638. endif
  639. ##################
  640. # Mandelbrot Set #
  641. ##################
  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. ###########################
  676. # OpenGL interoperability #
  677. ###########################
  678. if HAVE_OPENGL
  679. examplebin_PROGRAMS += \
  680. gl_interop/gl_interop
  681. gl_interop_gl_interop_SOURCES = \
  682. gl_interop/gl_interop.c
  683. gl_interop_gl_interop_LDADD = \
  684. $(STARPU_OPENGL_RENDER_LDFLAGS)
  685. endif
  686. showcheck:
  687. -cat $(TEST_LOGS) /dev/null
  688. for i in $(SUBDIRS) ; do \
  689. make -C $$i showcheck ; \
  690. done