Makefile.am 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873
  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, 2013 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) -Werror=implicit
  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. mult/xgemm.c \
  38. lu/xlu.c \
  39. lu/xlu_pivot.c \
  40. lu/xlu_implicit.c \
  41. lu/xlu_implicit_pivot.c \
  42. lu/xlu_kernels.c \
  43. lu/lu_example.c \
  44. sched_ctx_utils/sched_ctx_utils.c \
  45. sched_ctx/sched_ctx.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 = *.gcno *.gcda *.linkinfo
  58. if STARPU_USE_CUDA
  59. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/ $(HWLOC_CFLAGS)
  60. .cu.o:
  61. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  62. endif
  63. if STARPU_HAVE_ICC
  64. .icc.o:
  65. $(ICC) -x c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
  66. $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $< -c -o $@
  67. endif
  68. examplebindir = $(libdir)/starpu/examples/
  69. examplebin_PROGRAMS =
  70. noinst_HEADERS = \
  71. axpy/axpy.h \
  72. cg/cg.h \
  73. heat/lu_kernels_model.h \
  74. heat/dw_sparse_cg.h \
  75. heat/heat.h \
  76. heat/dw_factolu.h \
  77. lu/xlu.h \
  78. lu/xlu_kernels.h \
  79. lu/lu-float.h \
  80. lu/lu-double.h \
  81. lu/complex_float.h \
  82. lu/complex_double.h \
  83. lu/blas_complex.h \
  84. cholesky/cholesky.h \
  85. sched_ctx_utils/sched_ctx_utils.h \
  86. common/blas_model.h \
  87. common/blas.h \
  88. mult/simple.h \
  89. mult/double.h \
  90. fortran/bindings/StarPU_fortran.h \
  91. ppm_downscaler/ppm_downscaler.h \
  92. ppm_downscaler/yuv_downscaler.h \
  93. spmv/matrix_market/mmio.h \
  94. spmv/matrix_market/mm_to_bcsr.h \
  95. spmv/spmv.h \
  96. spmv/dw_block_spmv.h \
  97. basic_examples/multiformat_types.h \
  98. filters/custom_mf/custom_interface.h \
  99. filters/custom_mf/custom_types.h \
  100. interface/complex_interface.h \
  101. interface/complex_codelet.h \
  102. pi/pi.h \
  103. pi/SobolQRNG/sobol.h \
  104. pi/SobolQRNG/sobol_gold.h \
  105. pi/SobolQRNG/sobol_gpu.h \
  106. pi/SobolQRNG/sobol_primitives.h \
  107. reductions/dot_product.h \
  108. basic_examples/vector_scal_cpu_template.h
  109. #####################################
  110. # What to install and what to check #
  111. #####################################
  112. STARPU_EXAMPLES =
  113. TESTS = $(STARPU_EXAMPLES)
  114. TESTS += scheduler/schedulers.sh
  115. if STARPU_HAVE_WINDOWS
  116. check_PROGRAMS = $(STARPU_EXAMPLES)
  117. else
  118. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  119. endif
  120. if !STARPU_HAVE_WINDOWS
  121. ## test loader program
  122. LOADER = loader
  123. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  124. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  125. loader_SOURCES = ../tests/loader.c
  126. if STARPU_HAVE_AM111
  127. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  128. LOG_COMPILER = $(LOADER_BIN)
  129. else
  130. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  131. endif
  132. endif
  133. examplebin_PROGRAMS += \
  134. basic_examples/hello_world \
  135. basic_examples/vector_scal \
  136. basic_examples/mult \
  137. basic_examples/block \
  138. basic_examples/variable \
  139. basic_examples/multiformat \
  140. cpp/incrementer_cpp \
  141. filters/custom_mf/custom_mf_filter \
  142. filters/fvector \
  143. filters/fblock \
  144. filters/fmatrix \
  145. filters/shadow \
  146. filters/shadow2d \
  147. filters/shadow3d \
  148. tag_example/tag_example \
  149. tag_example/tag_example2 \
  150. tag_example/tag_example3 \
  151. tag_example/tag_example4 \
  152. tag_example/tag_restartable \
  153. spmd/vector_scal_spmd \
  154. spmv/spmv \
  155. callback/callback \
  156. incrementer/incrementer \
  157. binary/binary \
  158. interface/complex \
  159. matvecmult/matvecmult \
  160. profiling/profiling \
  161. scheduler/dummy_sched \
  162. sched_ctx/sched_ctx \
  163. reductions/dot_product \
  164. reductions/minmax_reduction \
  165. ppm_downscaler/ppm_downscaler \
  166. ppm_downscaler/yuv_downscaler
  167. if STARPU_HAVE_F77_H
  168. examplebin_PROGRAMS += \
  169. basic_examples/vector_scal_fortran
  170. endif
  171. if !NO_BLAS_LIB
  172. examplebin_PROGRAMS += \
  173. axpy/axpy \
  174. mult/sgemm \
  175. mult/dgemm \
  176. cholesky/cholesky_tag \
  177. cholesky/cholesky_tile_tag \
  178. cholesky/cholesky_grain_tag \
  179. cholesky/cholesky_implicit \
  180. lu/lu_example_float \
  181. lu/lu_example_double \
  182. lu/lu_implicit_example_float \
  183. lu/lu_implicit_example_double \
  184. heat/heat \
  185. cg/cg \
  186. pipeline/pipeline
  187. endif
  188. if MKL_BLAS_LIB
  189. examplebin_PROGRAMS += \
  190. lu/lu_example_complex_float \
  191. lu/lu_example_complex_double \
  192. lu/lu_implicit_example_complex_float \
  193. lu/lu_implicit_example_complex_double
  194. endif
  195. if ATLAS_BLAS_LIB
  196. examplebin_PROGRAMS += \
  197. spmv/dw_block_spmv
  198. endif
  199. STARPU_EXAMPLES += \
  200. basic_examples/hello_world \
  201. basic_examples/vector_scal \
  202. basic_examples/mult \
  203. basic_examples/block \
  204. basic_examples/variable \
  205. basic_examples/multiformat \
  206. cpp/incrementer_cpp \
  207. filters/fvector \
  208. filters/fblock \
  209. filters/fmatrix \
  210. tag_example/tag_example \
  211. tag_example/tag_example2 \
  212. tag_example/tag_example3 \
  213. tag_example/tag_example4 \
  214. tag_example/tag_restartable \
  215. spmd/vector_scal_spmd \
  216. spmv/spmv \
  217. callback/callback \
  218. incrementer/incrementer \
  219. binary/binary \
  220. interface/complex \
  221. matvecmult/matvecmult \
  222. profiling/profiling \
  223. scheduler/dummy_sched \
  224. sched_ctx/sched_ctx \
  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. pipeline/pipeline
  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. 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. sched_ctx_utils/sched_ctx_utils.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. cg/cg_dot_kernel.o: cg/cg_dot_kernel.cu
  549. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  550. endif
  551. cg_cg_LDADD = \
  552. $(STARPU_BLAS_LDFLAGS)
  553. endif
  554. ################
  555. # SPMD example #
  556. ################
  557. spmd_vector_scal_spmd_SOURCES = \
  558. spmd/vector_scal_spmd.c
  559. ################
  560. # SpMV example #
  561. ################
  562. spmv_spmv_SOURCES = \
  563. spmv/spmv.c \
  564. spmv/spmv_kernels.c
  565. if STARPU_USE_CUDA
  566. spmv_spmv_SOURCES += \
  567. spmv/spmv_cuda.cu
  568. endif
  569. if ATLAS_BLAS_LIB
  570. spmv_dw_block_spmv_SOURCES = \
  571. spmv/dw_block_spmv.c \
  572. spmv/dw_block_spmv_kernels.c \
  573. spmv/matrix_market/mm_to_bcsr.c \
  574. spmv/matrix_market/mmio.c
  575. spmv_dw_block_spmv_LDADD = \
  576. $(STARPU_BLAS_LDFLAGS)
  577. endif
  578. ###########################
  579. # C++ Incrementer example #
  580. ###########################
  581. cpp_incrementer_cpp_SOURCES = \
  582. cpp/incrementer_cpp.cpp
  583. if STARPU_USE_CUDA
  584. cpp_incrementer_cpp_SOURCES += \
  585. incrementer/incrementer_kernels.cu
  586. endif
  587. if STARPU_USE_OPENCL
  588. cpp_incrementer_cpp_SOURCES += \
  589. incrementer/incrementer_kernels_opencl.c
  590. endif
  591. #######################
  592. # Incrementer example #
  593. #######################
  594. incrementer_incrementer_SOURCES = \
  595. incrementer/incrementer.c
  596. if STARPU_USE_CUDA
  597. incrementer_incrementer_SOURCES += \
  598. incrementer/incrementer_kernels.cu
  599. endif
  600. if STARPU_USE_OPENCL
  601. incrementer_incrementer_SOURCES += \
  602. incrementer/incrementer_kernels_opencl.c
  603. nobase_STARPU_OPENCL_DATA_DATA += \
  604. incrementer/incrementer_kernels_opencl_kernel.cl
  605. endif
  606. ##################
  607. # Binary example #
  608. ##################
  609. binary_binary_SOURCES = \
  610. binary/binary.c
  611. if STARPU_USE_OPENCL
  612. binary_binary_SOURCES += \
  613. incrementer/incrementer_kernels_opencl.c
  614. endif
  615. #####################
  616. # interface example #
  617. #####################
  618. interface_complex_SOURCES = \
  619. interface/complex.c \
  620. interface/complex_interface.c
  621. if STARPU_USE_CUDA
  622. interface_complex_SOURCES += \
  623. interface/complex_kernels.cu
  624. interface/complex_kernels.o: interface/complex_kernels.cu
  625. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  626. endif
  627. if STARPU_USE_OPENCL
  628. interface_complex_SOURCES +=\
  629. interface/complex_kernels_opencl.c
  630. nobase_STARPU_OPENCL_DATA_DATA += \
  631. interface/complex_kernels.cl
  632. endif
  633. ######################
  634. # matVecMult example #
  635. ######################
  636. if STARPU_USE_OPENCL
  637. nobase_STARPU_OPENCL_DATA_DATA += \
  638. matvecmult/matvecmult_kernel.cl
  639. endif
  640. #######################
  641. # dot_product example #
  642. #######################
  643. reductions_dot_product_SOURCES = \
  644. reductions/dot_product.c
  645. if STARPU_USE_CUDA
  646. reductions_dot_product_SOURCES += \
  647. reductions/dot_product_kernels.cu
  648. reductions/dot_product_kernels.o: reductions/dot_product_kernels.cu
  649. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  650. endif
  651. if STARPU_USE_OPENCL
  652. nobase_STARPU_OPENCL_DATA_DATA += \
  653. reductions/dot_product_opencl_kernels.cl
  654. endif
  655. ##################
  656. # Mandelbrot Set #
  657. ##################
  658. ################
  659. # Top Examples #
  660. ################
  661. examplebin_PROGRAMS += \
  662. top/hello_world_top
  663. top_hello_world_top_SOURCES = \
  664. top/hello_world_top.c
  665. ######
  666. # Pi #
  667. ######
  668. check_PROGRAMS += \
  669. pi/pi \
  670. pi/pi_redux
  671. examplebin_PROGRAMS += \
  672. pi/pi \
  673. pi/pi_redux
  674. pi_pi_SOURCES = \
  675. pi/pi.c \
  676. pi/SobolQRNG/sobol_gold.c \
  677. pi/SobolQRNG/sobol_primitives.c
  678. if STARPU_USE_CUDA
  679. pi_pi_SOURCES += \
  680. pi/pi_kernel.cu \
  681. pi/SobolQRNG/sobol_gpu.cu
  682. endif
  683. pi_pi_redux_SOURCES = \
  684. pi/pi_redux.c
  685. if STARPU_USE_CUDA
  686. pi_pi_redux_SOURCES += \
  687. pi/pi_redux_kernel.cu
  688. pi_pi_redux_LDADD = \
  689. $(STARPU_CURAND_LDFLAGS)
  690. endif
  691. ###########################
  692. # OpenGL interoperability #
  693. ###########################
  694. if HAVE_OPENGL
  695. examplebin_PROGRAMS += \
  696. gl_interop/gl_interop \
  697. gl_interop/gl_interop_idle
  698. gl_interop_gl_interop_SOURCES = \
  699. gl_interop/gl_interop.c
  700. gl_interop_gl_interop_LDADD = \
  701. $(STARPU_OPENGL_RENDER_LDFLAGS)
  702. gl_interop_gl_interop_idle_SOURCES = \
  703. gl_interop/gl_interop_idle.c
  704. gl_interop_gl_interop_idle_LDADD = \
  705. $(STARPU_OPENGL_RENDER_LDFLAGS)
  706. endif
  707. ####################
  708. # pipeline example #
  709. ####################
  710. if !NO_BLAS_LIB
  711. pipeline_pipeline_SOURCES = \
  712. pipeline/pipeline.c \
  713. common/blas.c
  714. pipeline_pipeline_LDADD = \
  715. $(STARPU_BLAS_LDFLAGS)
  716. endif
  717. showcheck:
  718. -cat $(TEST_LOGS) /dev/null
  719. for i in $(SUBDIRS) ; do \
  720. make -C $$i showcheck ; \
  721. done