Makefile.am 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  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_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)
  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. 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. scheduler/schedulers.sh
  57. CLEANFILES = \
  58. gordon/null_kernel_gordon.spuelf
  59. CLEANFILES += *.gcno *.gcda *.linkinfo
  60. if STARPU_USE_CUDA
  61. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/ $(HWLOC_CFLAGS)
  62. .cu.o:
  63. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  64. endif
  65. if STARPU_HAVE_ICC
  66. .icc.o:
  67. $(ICC) -x c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
  68. $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $< -c -o $@
  69. endif
  70. examplebindir = $(libdir)/starpu/examples/
  71. examplebin_PROGRAMS =
  72. noinst_HEADERS = \
  73. axpy/axpy.h \
  74. cg/cg.h \
  75. heat/lu_kernels_model.h \
  76. heat/dw_sparse_cg.h \
  77. heat/heat.h \
  78. heat/dw_factolu.h \
  79. lu/xlu.h \
  80. lu/xlu_kernels.h \
  81. lu/lu-float.h \
  82. lu/lu-double.h \
  83. lu/complex_float.h \
  84. lu/complex_double.h \
  85. lu/blas_complex.h \
  86. cholesky/cholesky.h \
  87. sched_ctx_utils/sched_ctx_utils.h \
  88. common/blas_model.h \
  89. common/blas.h \
  90. mult/simple.h \
  91. mult/double.h \
  92. gordon/null.h \
  93. fortran/bindings/StarPU_fortran.h \
  94. ppm_downscaler/ppm_downscaler.h \
  95. ppm_downscaler/yuv_downscaler.h \
  96. spmv/matrix_market/mmio.h \
  97. spmv/matrix_market/mm_to_bcsr.h \
  98. spmv/spmv.h \
  99. spmv/dw_block_spmv.h \
  100. basic_examples/multiformat_types.h \
  101. filters/custom_mf/custom_interface.h \
  102. filters/custom_mf/custom_types.h \
  103. interface/complex_interface.h \
  104. interface/complex_codelet.h \
  105. pi/pi.h \
  106. pi/SobolQRNG/sobol.h \
  107. pi/SobolQRNG/sobol_gold.h \
  108. pi/SobolQRNG/sobol_gpu.h \
  109. pi/SobolQRNG/sobol_primitives.h \
  110. reductions/dot_product.h \
  111. basic_examples/vector_scal_cpu_template.h
  112. #####################################
  113. # What to install and what to check #
  114. #####################################
  115. STARPU_EXAMPLES =
  116. TESTS = $(STARPU_EXAMPLES)
  117. TESTS += scheduler/schedulers.sh
  118. if STARPU_HAVE_WINDOWS
  119. check_PROGRAMS = $(STARPU_EXAMPLES)
  120. else
  121. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  122. endif
  123. if !STARPU_HAVE_WINDOWS
  124. ## test loader program
  125. LOADER = loader
  126. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  127. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  128. loader_SOURCES = ../tests/loader.c
  129. 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. examplebin_PROGRAMS += \
  137. basic_examples/hello_world \
  138. basic_examples/vector_scal \
  139. basic_examples/mult \
  140. basic_examples/block \
  141. basic_examples/variable \
  142. basic_examples/multiformat \
  143. cpp/incrementer_cpp \
  144. filters/custom_mf/custom_mf_filter \
  145. filters/fvector \
  146. filters/fblock \
  147. filters/fmatrix \
  148. filters/shadow \
  149. filters/shadow2d \
  150. filters/shadow3d \
  151. tag_example/tag_example \
  152. tag_example/tag_example2 \
  153. tag_example/tag_example3 \
  154. tag_example/tag_example4 \
  155. tag_example/tag_restartable \
  156. spmd/vector_scal_spmd \
  157. spmv/spmv \
  158. callback/callback \
  159. incrementer/incrementer \
  160. binary/binary \
  161. interface/complex \
  162. matvecmult/matvecmult \
  163. profiling/profiling \
  164. scheduler/dummy_sched \
  165. reductions/dot_product \
  166. reductions/minmax_reduction \
  167. ppm_downscaler/ppm_downscaler \
  168. ppm_downscaler/yuv_downscaler
  169. if STARPU_HAVE_F77_H
  170. examplebin_PROGRAMS += \
  171. basic_examples/vector_scal_fortran
  172. endif
  173. if !NO_BLAS_LIB
  174. examplebin_PROGRAMS += \
  175. axpy/axpy \
  176. mult/sgemm \
  177. mult/dgemm \
  178. cholesky/cholesky_tag \
  179. cholesky/cholesky_tile_tag \
  180. cholesky/cholesky_grain_tag \
  181. cholesky/cholesky_implicit \
  182. lu/lu_example_float \
  183. lu/lu_example_double \
  184. lu/lu_implicit_example_float \
  185. lu/lu_implicit_example_double \
  186. heat/heat \
  187. cg/cg \
  188. pipeline/pipeline
  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. binary/binary \
  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. pipeline/pipeline
  248. endif
  249. if MKL_BLAS_LIB
  250. STARPU_EXAMPLES += \
  251. lu/lu_example_complex_float \
  252. lu/lu_example_complex_double \
  253. lu/lu_implicit_example_complex_float \
  254. lu/lu_implicit_example_complex_double
  255. endif
  256. if ATLAS_BLAS_LIB
  257. STARPU_EXAMPLES += \
  258. spmv/dw_block_spmv
  259. endif
  260. ##################
  261. # Basic examples #
  262. ##################
  263. basic_examples_vector_scal_SOURCES = \
  264. basic_examples/vector_scal.c \
  265. basic_examples/vector_scal_cpu.c
  266. if STARPU_HAVE_ICC
  267. basic_examples_vector_scal_SOURCES += \
  268. basic_examples/vector_scal_cpu_icc.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. sched_ctx_utils/sched_ctx_utils.c \
  440. common/blas.c
  441. cholesky_cholesky_implicit_LDADD = \
  442. $(STARPU_BLAS_LDFLAGS)
  443. endif
  444. ##############
  445. # LU example #
  446. ##############
  447. if !NO_BLAS_LIB
  448. lu_lu_example_float_SOURCES = \
  449. lu/lu_example_float.c \
  450. lu/slu.c \
  451. lu/slu_pivot.c \
  452. lu/slu_kernels.c \
  453. common/blas.c
  454. lu_lu_example_float_LDADD = \
  455. $(STARPU_BLAS_LDFLAGS)
  456. lu_lu_example_double_SOURCES = \
  457. lu/lu_example_double.c \
  458. lu/dlu.c \
  459. lu/dlu_pivot.c \
  460. lu/dlu_kernels.c \
  461. common/blas.c
  462. lu_lu_example_double_LDADD = \
  463. $(STARPU_BLAS_LDFLAGS)
  464. lu_lu_implicit_example_float_SOURCES = \
  465. lu/lu_example_float.c \
  466. lu/slu_implicit.c \
  467. lu/slu_implicit_pivot.c \
  468. lu/slu_kernels.c \
  469. common/blas.c
  470. lu_lu_implicit_example_float_LDADD = \
  471. $(STARPU_BLAS_LDFLAGS)
  472. lu_lu_implicit_example_double_SOURCES = \
  473. lu/lu_example_double.c \
  474. lu/dlu_implicit.c \
  475. lu/dlu_implicit_pivot.c \
  476. lu/dlu_kernels.c \
  477. common/blas.c
  478. lu_lu_implicit_example_double_LDADD = \
  479. $(STARPU_BLAS_LDFLAGS)
  480. if MKL_BLAS_LIB
  481. lu_lu_example_complex_float_SOURCES = \
  482. lu/lu_example_complex_float.c \
  483. lu/clu.c \
  484. lu/clu_pivot.c \
  485. lu/clu_kernels.c \
  486. lu/blas_complex.c \
  487. common/blas.c
  488. lu_lu_example_complex_float_LDADD = \
  489. $(STARPU_BLAS_LDFLAGS)
  490. lu_lu_implicit_example_complex_float_SOURCES = \
  491. lu/lu_example_complex_float.c \
  492. lu/clu_implicit.c \
  493. lu/clu_implicit_pivot.c \
  494. lu/clu_kernels.c \
  495. lu/blas_complex.c \
  496. common/blas.c
  497. lu_lu_implicit_example_complex_float_LDADD = \
  498. $(STARPU_BLAS_LDFLAGS)
  499. lu_lu_example_complex_double_SOURCES = \
  500. lu/lu_example_complex_double.c \
  501. lu/zlu.c \
  502. lu/zlu_pivot.c \
  503. lu/zlu_kernels.c \
  504. lu/blas_complex.c \
  505. common/blas.c
  506. lu_lu_example_complex_double_LDADD = \
  507. $(STARPU_BLAS_LDFLAGS)
  508. lu_lu_implicit_example_complex_double_SOURCES = \
  509. lu/lu_example_complex_double.c \
  510. lu/zlu_implicit.c \
  511. lu/zlu_implicit_pivot.c \
  512. lu/zlu_kernels.c \
  513. lu/blas_complex.c \
  514. common/blas.c
  515. lu_lu_implicit_example_complex_double_LDADD = \
  516. $(STARPU_BLAS_LDFLAGS)
  517. endif
  518. endif
  519. ################
  520. # Heat example #
  521. ################
  522. if !NO_BLAS_LIB
  523. heat_heat_SOURCES = \
  524. heat/heat.c \
  525. heat/dw_factolu.c \
  526. heat/dw_factolu_tag.c \
  527. heat/dw_factolu_grain.c \
  528. heat/dw_sparse_cg.c \
  529. heat/heat_display.c \
  530. heat/lu_kernels_model.c \
  531. heat/dw_sparse_cg_kernels.c \
  532. heat/dw_factolu_kernels.c \
  533. common/blas.c
  534. heat_heat_LDADD = \
  535. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  536. $(STARPU_BLAS_LDFLAGS)
  537. endif
  538. ##############
  539. # CG example #
  540. ##############
  541. if !NO_BLAS_LIB
  542. cg_cg_SOURCES = \
  543. cg/cg.c \
  544. cg/cg_kernels.c \
  545. common/blas.c
  546. if STARPU_USE_CUDA
  547. cg_cg_SOURCES += \
  548. cg/cg_dot_kernel.cu
  549. cg/cg_dot_kernel.o: cg/cg_dot_kernel.cu
  550. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  551. endif
  552. cg_cg_LDADD = \
  553. $(STARPU_BLAS_LDFLAGS)
  554. endif
  555. ################
  556. # SPMD example #
  557. ################
  558. spmd_vector_scal_spmd_SOURCES = \
  559. spmd/vector_scal_spmd.c
  560. ################
  561. # SpMV example #
  562. ################
  563. spmv_spmv_SOURCES = \
  564. spmv/spmv.c \
  565. spmv/spmv_kernels.c
  566. if STARPU_USE_CUDA
  567. spmv_spmv_SOURCES += \
  568. spmv/spmv_cuda.cu
  569. endif
  570. if ATLAS_BLAS_LIB
  571. spmv_dw_block_spmv_SOURCES = \
  572. spmv/dw_block_spmv.c \
  573. spmv/dw_block_spmv_kernels.c \
  574. spmv/matrix_market/mm_to_bcsr.c \
  575. spmv/matrix_market/mmio.c
  576. spmv_dw_block_spmv_LDADD = \
  577. $(STARPU_BLAS_LDFLAGS)
  578. endif
  579. ###########################
  580. # C++ Incrementer example #
  581. ###########################
  582. cpp_incrementer_cpp_SOURCES = \
  583. cpp/incrementer_cpp.cpp
  584. if STARPU_USE_CUDA
  585. cpp_incrementer_cpp_SOURCES += \
  586. incrementer/incrementer_kernels.cu
  587. endif
  588. if STARPU_USE_OPENCL
  589. cpp_incrementer_cpp_SOURCES += \
  590. incrementer/incrementer_kernels_opencl.c
  591. endif
  592. #######################
  593. # Incrementer example #
  594. #######################
  595. incrementer_incrementer_SOURCES = \
  596. incrementer/incrementer.c
  597. if STARPU_USE_CUDA
  598. incrementer_incrementer_SOURCES += \
  599. incrementer/incrementer_kernels.cu
  600. endif
  601. if STARPU_USE_OPENCL
  602. incrementer_incrementer_SOURCES += \
  603. incrementer/incrementer_kernels_opencl.c
  604. nobase_STARPU_OPENCL_DATA_DATA += \
  605. incrementer/incrementer_kernels_opencl_kernel.cl
  606. endif
  607. ##################
  608. # Binary example #
  609. ##################
  610. binary_binary_SOURCES = \
  611. binary/binary.c
  612. if STARPU_USE_OPENCL
  613. binary_binary_SOURCES += \
  614. incrementer/incrementer_kernels_opencl.c
  615. endif
  616. #####################
  617. # interface example #
  618. #####################
  619. interface_complex_SOURCES = \
  620. interface/complex.c \
  621. interface/complex_interface.c
  622. if STARPU_USE_CUDA
  623. interface_complex_SOURCES += \
  624. interface/complex_kernels.cu
  625. interface/complex_kernels.o: interface/complex_kernels.cu
  626. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  627. endif
  628. if STARPU_USE_OPENCL
  629. interface_complex_SOURCES +=\
  630. interface/complex_kernels_opencl.c
  631. nobase_STARPU_OPENCL_DATA_DATA += \
  632. interface/complex_kernels.cl
  633. endif
  634. ######################
  635. # matVecMult example #
  636. ######################
  637. if STARPU_USE_OPENCL
  638. nobase_STARPU_OPENCL_DATA_DATA += \
  639. matvecmult/matvecmult_kernel.cl
  640. endif
  641. #######################
  642. # dot_product example #
  643. #######################
  644. reductions_dot_product_SOURCES = \
  645. reductions/dot_product.c
  646. if STARPU_USE_CUDA
  647. reductions_dot_product_SOURCES += \
  648. reductions/dot_product_kernels.cu
  649. reductions/dot_product_kernels.o: reductions/dot_product_kernels.cu
  650. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  651. endif
  652. if STARPU_USE_OPENCL
  653. nobase_STARPU_OPENCL_DATA_DATA += \
  654. reductions/dot_product_opencl_kernels.cl
  655. endif
  656. ##################
  657. # Mandelbrot Set #
  658. ##################
  659. ################
  660. # Top Examples #
  661. ################
  662. examplebin_PROGRAMS += \
  663. top/hello_world_top
  664. top_hello_world_top_SOURCES = \
  665. top/hello_world_top.c
  666. ######
  667. # Pi #
  668. ######
  669. check_PROGRAMS += \
  670. pi/pi \
  671. pi/pi_redux
  672. examplebin_PROGRAMS += \
  673. pi/pi \
  674. pi/pi_redux
  675. pi_pi_SOURCES = \
  676. pi/pi.c \
  677. pi/SobolQRNG/sobol_gold.c \
  678. pi/SobolQRNG/sobol_primitives.c
  679. if STARPU_USE_CUDA
  680. pi_pi_SOURCES += \
  681. pi/pi_kernel.cu \
  682. pi/SobolQRNG/sobol_gpu.cu
  683. endif
  684. pi_pi_redux_SOURCES = \
  685. pi/pi_redux.c
  686. if STARPU_USE_CUDA
  687. pi_pi_redux_SOURCES += \
  688. pi/pi_redux_kernel.cu
  689. pi_pi_redux_LDADD = \
  690. $(STARPU_CURAND_LDFLAGS)
  691. endif
  692. ###########################
  693. # OpenGL interoperability #
  694. ###########################
  695. if HAVE_OPENGL
  696. examplebin_PROGRAMS += \
  697. gl_interop/gl_interop \
  698. gl_interop/gl_interop_idle
  699. gl_interop_gl_interop_SOURCES = \
  700. gl_interop/gl_interop.c
  701. gl_interop_gl_interop_LDADD = \
  702. $(STARPU_OPENGL_RENDER_LDFLAGS)
  703. gl_interop_gl_interop_idle_SOURCES = \
  704. gl_interop/gl_interop_idle.c
  705. gl_interop_gl_interop_idle_LDADD = \
  706. $(STARPU_OPENGL_RENDER_LDFLAGS)
  707. endif
  708. ####################
  709. # pipeline example #
  710. ####################
  711. if !NO_BLAS_LIB
  712. pipeline_pipeline_SOURCES = \
  713. pipeline/pipeline.c \
  714. common/blas.c
  715. pipeline_pipeline_LDADD = \
  716. $(STARPU_BLAS_LDFLAGS)
  717. endif
  718. showcheck:
  719. -cat $(TEST_LOGS) /dev/null
  720. for i in $(SUBDIRS) ; do \
  721. make -C $$i showcheck ; \
  722. done