Makefile.am 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892
  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_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. 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)
  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. interface/complex_codelet.h \
  117. pi/pi.h \
  118. pi/SobolQRNG/sobol.h \
  119. pi/SobolQRNG/sobol_gold.h \
  120. pi/SobolQRNG/sobol_gpu.h \
  121. pi/SobolQRNG/sobol_primitives.h \
  122. reductions/dot_product.h \
  123. basic_examples/vector_scal_cpu_template.h
  124. #####################################
  125. # What to install and what to check #
  126. #####################################
  127. STARPU_EXAMPLES =
  128. TESTS = $(STARPU_EXAMPLES)
  129. TESTS += scheduler/schedulers.sh
  130. if STARPU_HAVE_WINDOWS
  131. check_PROGRAMS = $(STARPU_EXAMPLES)
  132. else
  133. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  134. endif
  135. if !STARPU_HAVE_WINDOWS
  136. ## test loader program
  137. LOADER = loader
  138. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  139. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  140. loader_SOURCES = ../tests/loader.c
  141. if STARPU_HAVE_AM111
  142. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  143. LOG_COMPILER = $(LOADER_BIN)
  144. else
  145. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  146. endif
  147. endif
  148. examplebin_PROGRAMS += \
  149. basic_examples/hello_world \
  150. basic_examples/vector_scal \
  151. basic_examples/mult \
  152. basic_examples/block \
  153. basic_examples/variable \
  154. basic_examples/multiformat \
  155. cpp/incrementer_cpp \
  156. filters/custom_mf/custom_mf_filter \
  157. filters/fvector \
  158. filters/fblock \
  159. filters/fmatrix \
  160. filters/shadow \
  161. filters/shadow2d \
  162. filters/shadow3d \
  163. tag_example/tag_example \
  164. tag_example/tag_example2 \
  165. tag_example/tag_example3 \
  166. tag_example/tag_example4 \
  167. tag_example/tag_restartable \
  168. spmd/vector_scal_spmd \
  169. spmv/spmv \
  170. callback/callback \
  171. incrementer/incrementer \
  172. binary/binary \
  173. interface/complex \
  174. matvecmult/matvecmult \
  175. profiling/profiling \
  176. scheduler/dummy_sched \
  177. reductions/dot_product \
  178. reductions/minmax_reduction \
  179. ppm_downscaler/ppm_downscaler \
  180. ppm_downscaler/yuv_downscaler
  181. if STARPU_HAVE_F77_H
  182. examplebin_PROGRAMS += \
  183. basic_examples/vector_scal_fortran
  184. endif
  185. if !NO_BLAS_LIB
  186. examplebin_PROGRAMS += \
  187. axpy/axpy \
  188. mult/sgemm \
  189. mult/dgemm \
  190. cholesky/cholesky_tag \
  191. cholesky/cholesky_tile_tag \
  192. cholesky/cholesky_grain_tag \
  193. cholesky/cholesky_implicit \
  194. lu/lu_example_float \
  195. lu/lu_example_double \
  196. lu/lu_implicit_example_float \
  197. lu/lu_implicit_example_double \
  198. heat/heat \
  199. cg/cg \
  200. pipeline/pipeline
  201. endif
  202. if MKL_BLAS_LIB
  203. examplebin_PROGRAMS += \
  204. lu/lu_example_complex_float \
  205. lu/lu_example_complex_double \
  206. lu/lu_implicit_example_complex_float \
  207. lu/lu_implicit_example_complex_double
  208. endif
  209. if ATLAS_BLAS_LIB
  210. examplebin_PROGRAMS += \
  211. spmv/dw_block_spmv
  212. endif
  213. STARPU_EXAMPLES += \
  214. basic_examples/hello_world \
  215. basic_examples/vector_scal \
  216. basic_examples/mult \
  217. basic_examples/block \
  218. basic_examples/variable \
  219. basic_examples/multiformat \
  220. cpp/incrementer_cpp \
  221. filters/fvector \
  222. filters/fblock \
  223. filters/fmatrix \
  224. tag_example/tag_example \
  225. tag_example/tag_example2 \
  226. tag_example/tag_example3 \
  227. tag_example/tag_example4 \
  228. tag_example/tag_restartable \
  229. spmd/vector_scal_spmd \
  230. spmv/spmv \
  231. callback/callback \
  232. incrementer/incrementer \
  233. binary/binary \
  234. interface/complex \
  235. matvecmult/matvecmult \
  236. profiling/profiling \
  237. scheduler/dummy_sched \
  238. reductions/dot_product \
  239. reductions/minmax_reduction
  240. if STARPU_HAVE_F77_H
  241. STARPU_EXAMPLES += \
  242. basic_examples/vector_scal_fortran
  243. endif
  244. if !NO_BLAS_LIB
  245. STARPU_EXAMPLES += \
  246. axpy/axpy \
  247. mult/sgemm \
  248. mult/dgemm \
  249. cholesky/cholesky_tag \
  250. cholesky/cholesky_tile_tag \
  251. cholesky/cholesky_grain_tag \
  252. cholesky/cholesky_implicit \
  253. lu/lu_example_float \
  254. lu/lu_example_double \
  255. lu/lu_implicit_example_float \
  256. lu/lu_implicit_example_double \
  257. heat/heat \
  258. cg/cg \
  259. pipeline/pipeline
  260. endif
  261. if MKL_BLAS_LIB
  262. STARPU_EXAMPLES += \
  263. lu/lu_example_complex_float \
  264. lu/lu_example_complex_double \
  265. lu/lu_implicit_example_complex_float \
  266. lu/lu_implicit_example_complex_double
  267. endif
  268. if ATLAS_BLAS_LIB
  269. STARPU_EXAMPLES += \
  270. spmv/dw_block_spmv
  271. endif
  272. ##################
  273. # Basic examples #
  274. ##################
  275. basic_examples_vector_scal_SOURCES = \
  276. basic_examples/vector_scal.c \
  277. basic_examples/vector_scal_cpu.c
  278. if STARPU_HAVE_ICC
  279. basic_examples_vector_scal_SOURCES += \
  280. basic_examples/vector_scal_cpu_icc.icc
  281. endif
  282. if STARPU_USE_CUDA
  283. basic_examples_vector_scal_SOURCES += \
  284. basic_examples/vector_scal_cuda.cu
  285. endif
  286. if STARPU_USE_OPENCL
  287. basic_examples_vector_scal_SOURCES += \
  288. basic_examples/vector_scal_opencl.c
  289. nobase_STARPU_OPENCL_DATA_DATA += \
  290. basic_examples/vector_scal_opencl_kernel.cl
  291. endif
  292. if STARPU_HAVE_F77_H
  293. basic_examples_vector_scal_fortran_SOURCES = \
  294. basic_examples/vector_scal_fortran.F \
  295. basic_examples/vector_scal_c.c \
  296. basic_examples/vector_scal_cpu.c
  297. if STARPU_USE_CUDA
  298. basic_examples_vector_scal_fortran_SOURCES += \
  299. basic_examples/vector_scal_cuda.cu
  300. basic_examples_vector_scal_fortran_LDADD = \
  301. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  302. endif
  303. endif
  304. #######################
  305. # Multiformat example #
  306. #######################
  307. basic_examples_multiformat_SOURCES = \
  308. basic_examples/multiformat.c \
  309. basic_examples/multiformat_conversion_codelets.c
  310. if STARPU_USE_CUDA
  311. basic_examples_multiformat_SOURCES += \
  312. basic_examples/multiformat_cuda.cu \
  313. basic_examples/multiformat_conversion_codelets_cuda.cu
  314. endif
  315. if STARPU_USE_OPENCL
  316. basic_examples_multiformat_SOURCES += \
  317. basic_examples/multiformat_opencl.c \
  318. basic_examples/multiformat_conversion_codelets_opencl.c
  319. nobase_STARPU_OPENCL_DATA_DATA += \
  320. basic_examples/multiformat_opencl_kernel.cl \
  321. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  322. endif
  323. #################
  324. # block example #
  325. #################
  326. basic_examples_block_SOURCES = \
  327. basic_examples/block.c \
  328. basic_examples/block_cpu.c
  329. if STARPU_USE_CUDA
  330. basic_examples_block_SOURCES += \
  331. basic_examples/block_cuda.cu
  332. endif
  333. if STARPU_USE_OPENCL
  334. basic_examples_block_SOURCES += \
  335. basic_examples/block_opencl.c
  336. nobase_STARPU_OPENCL_DATA_DATA += \
  337. basic_examples/block_opencl_kernel.cl
  338. endif
  339. ####################
  340. # Variable example #
  341. ####################
  342. basic_examples_variable_SOURCES = \
  343. basic_examples/variable.c \
  344. basic_examples/variable_kernels_cpu.c
  345. if STARPU_USE_CUDA
  346. basic_examples_variable_SOURCES += \
  347. basic_examples/variable_kernels.cu
  348. endif
  349. if STARPU_USE_OPENCL
  350. basic_examples_variable_SOURCES += \
  351. basic_examples/variable_kernels_opencl.c
  352. nobase_STARPU_OPENCL_DATA_DATA += \
  353. basic_examples/variable_kernels_opencl_kernel.cl
  354. endif
  355. ###########
  356. # Filters #
  357. ###########
  358. filters_fblock_SOURCES = \
  359. filters/fblock.c \
  360. filters/fblock_cpu.c
  361. if STARPU_USE_CUDA
  362. filters_fblock_SOURCES += \
  363. filters/fblock_cuda.cu
  364. endif
  365. if STARPU_USE_OPENCL
  366. filters_fblock_SOURCES += \
  367. filters/fblock_opencl.c
  368. nobase_STARPU_OPENCL_DATA_DATA += \
  369. filters/fblock_opencl_kernel.cl
  370. endif
  371. #############################
  372. # Custom multiformat filter #
  373. #############################
  374. filters_custom_mf_custom_mf_filter_SOURCES=\
  375. filters/custom_mf/custom_mf_filter.c \
  376. filters/custom_mf/custom_interface.c \
  377. filters/custom_mf/custom_conversion_codelets.c
  378. if STARPU_USE_CUDA
  379. filters_custom_mf_custom_mf_filter_SOURCES += \
  380. filters/custom_mf/conversion.cu \
  381. filters/custom_mf/cuda.cu
  382. endif
  383. if STARPU_USE_OPENCL
  384. filters_custom_mf_custom_mf_filter_SOURCES += \
  385. filters/custom_mf/conversion_opencl.c \
  386. filters/custom_mf/custom_opencl.c
  387. nobase_STARPU_OPENCL_DATA_DATA += \
  388. filters/custom_mf/conversion_opencl.cl \
  389. filters/custom_mf/custom_opencl.cl
  390. endif
  391. ################
  392. # AXPY example #
  393. ################
  394. if !NO_BLAS_LIB
  395. axpy_axpy_SOURCES = \
  396. axpy/axpy.c \
  397. common/blas.c
  398. if STARPU_USE_OPENCL
  399. axpy_axpy_SOURCES += \
  400. axpy/axpy_opencl.c
  401. nobase_STARPU_OPENCL_DATA_DATA += \
  402. axpy/axpy_opencl_kernel.cl
  403. endif
  404. axpy_axpy_LDADD = \
  405. $(STARPU_BLAS_LDFLAGS)
  406. endif
  407. ################
  408. # Mult example #
  409. ################
  410. if !NO_BLAS_LIB
  411. mult_sgemm_SOURCES = \
  412. mult/sgemm.c \
  413. common/blas.c
  414. mult_sgemm_LDADD = \
  415. $(STARPU_BLAS_LDFLAGS)
  416. mult_dgemm_SOURCES = \
  417. mult/dgemm.c \
  418. common/blas.c
  419. mult_dgemm_LDADD = \
  420. $(STARPU_BLAS_LDFLAGS)
  421. endif
  422. ####################
  423. # Cholesky example #
  424. ####################
  425. if !NO_BLAS_LIB
  426. cholesky_cholesky_tag_SOURCES = \
  427. cholesky/cholesky_tag.c \
  428. cholesky/cholesky_models.c \
  429. cholesky/cholesky_kernels.c \
  430. common/blas.c
  431. cholesky_cholesky_tag_LDADD = \
  432. $(STARPU_BLAS_LDFLAGS)
  433. cholesky_cholesky_tile_tag_SOURCES = \
  434. cholesky/cholesky_tile_tag.c \
  435. cholesky/cholesky_models.c \
  436. cholesky/cholesky_kernels.c \
  437. common/blas.c
  438. cholesky_cholesky_tile_tag_LDADD = \
  439. $(STARPU_BLAS_LDFLAGS)
  440. cholesky_cholesky_grain_tag_SOURCES = \
  441. cholesky/cholesky_grain_tag.c \
  442. cholesky/cholesky_models.c \
  443. cholesky/cholesky_kernels.c \
  444. common/blas.c
  445. cholesky_cholesky_grain_tag_LDADD = \
  446. $(STARPU_BLAS_LDFLAGS)
  447. cholesky_cholesky_implicit_SOURCES = \
  448. cholesky/cholesky_implicit.c \
  449. cholesky/cholesky_models.c \
  450. cholesky/cholesky_kernels.c \
  451. common/blas.c
  452. cholesky_cholesky_implicit_LDADD = \
  453. $(STARPU_BLAS_LDFLAGS)
  454. endif
  455. ##############
  456. # LU example #
  457. ##############
  458. if !NO_BLAS_LIB
  459. lu_lu_example_float_SOURCES = \
  460. lu/lu_example_float.c \
  461. lu/slu.c \
  462. lu/slu_pivot.c \
  463. lu/slu_kernels.c \
  464. common/blas.c
  465. lu_lu_example_float_LDADD = \
  466. $(STARPU_BLAS_LDFLAGS)
  467. lu_lu_example_double_SOURCES = \
  468. lu/lu_example_double.c \
  469. lu/dlu.c \
  470. lu/dlu_pivot.c \
  471. lu/dlu_kernels.c \
  472. common/blas.c
  473. lu_lu_example_double_LDADD = \
  474. $(STARPU_BLAS_LDFLAGS)
  475. lu_lu_implicit_example_float_SOURCES = \
  476. lu/lu_example_float.c \
  477. lu/slu_implicit.c \
  478. lu/slu_implicit_pivot.c \
  479. lu/slu_kernels.c \
  480. common/blas.c
  481. lu_lu_implicit_example_float_LDADD = \
  482. $(STARPU_BLAS_LDFLAGS)
  483. lu_lu_implicit_example_double_SOURCES = \
  484. lu/lu_example_double.c \
  485. lu/dlu_implicit.c \
  486. lu/dlu_implicit_pivot.c \
  487. lu/dlu_kernels.c \
  488. common/blas.c
  489. lu_lu_implicit_example_double_LDADD = \
  490. $(STARPU_BLAS_LDFLAGS)
  491. if MKL_BLAS_LIB
  492. lu_lu_example_complex_float_SOURCES = \
  493. lu/lu_example_complex_float.c \
  494. lu/clu.c \
  495. lu/clu_pivot.c \
  496. lu/clu_kernels.c \
  497. lu/blas_complex.c \
  498. common/blas.c
  499. lu_lu_example_complex_float_LDADD = \
  500. $(STARPU_BLAS_LDFLAGS)
  501. lu_lu_implicit_example_complex_float_SOURCES = \
  502. lu/lu_example_complex_float.c \
  503. lu/clu_implicit.c \
  504. lu/clu_implicit_pivot.c \
  505. lu/clu_kernels.c \
  506. lu/blas_complex.c \
  507. common/blas.c
  508. lu_lu_implicit_example_complex_float_LDADD = \
  509. $(STARPU_BLAS_LDFLAGS)
  510. lu_lu_example_complex_double_SOURCES = \
  511. lu/lu_example_complex_double.c \
  512. lu/zlu.c \
  513. lu/zlu_pivot.c \
  514. lu/zlu_kernels.c \
  515. lu/blas_complex.c \
  516. common/blas.c
  517. lu_lu_example_complex_double_LDADD = \
  518. $(STARPU_BLAS_LDFLAGS)
  519. lu_lu_implicit_example_complex_double_SOURCES = \
  520. lu/lu_example_complex_double.c \
  521. lu/zlu_implicit.c \
  522. lu/zlu_implicit_pivot.c \
  523. lu/zlu_kernels.c \
  524. lu/blas_complex.c \
  525. common/blas.c
  526. lu_lu_implicit_example_complex_double_LDADD = \
  527. $(STARPU_BLAS_LDFLAGS)
  528. endif
  529. endif
  530. ################
  531. # Heat example #
  532. ################
  533. if !NO_BLAS_LIB
  534. heat_heat_SOURCES = \
  535. heat/heat.c \
  536. heat/dw_factolu.c \
  537. heat/dw_factolu_tag.c \
  538. heat/dw_factolu_grain.c \
  539. heat/dw_sparse_cg.c \
  540. heat/heat_display.c \
  541. heat/lu_kernels_model.c \
  542. heat/dw_sparse_cg_kernels.c \
  543. heat/dw_factolu_kernels.c \
  544. common/blas.c
  545. heat_heat_LDADD = \
  546. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  547. $(STARPU_BLAS_LDFLAGS)
  548. endif
  549. ##############
  550. # CG example #
  551. ##############
  552. if !NO_BLAS_LIB
  553. cg_cg_SOURCES = \
  554. cg/cg.c \
  555. cg/cg_kernels.c \
  556. common/blas.c
  557. if STARPU_USE_CUDA
  558. cg_cg_SOURCES += \
  559. cg/cg_dot_kernel.cu
  560. cg/cg_dot_kernel.o: cg/cg_dot_kernel.cu
  561. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  562. endif
  563. cg_cg_LDADD = \
  564. $(STARPU_BLAS_LDFLAGS)
  565. endif
  566. ################
  567. # SPMD example #
  568. ################
  569. spmd_vector_scal_spmd_SOURCES = \
  570. spmd/vector_scal_spmd.c
  571. ################
  572. # SpMV example #
  573. ################
  574. spmv_spmv_SOURCES = \
  575. spmv/spmv.c \
  576. spmv/spmv_kernels.c
  577. if STARPU_USE_CUDA
  578. spmv_spmv_SOURCES += \
  579. spmv/spmv_cuda.cu
  580. endif
  581. if ATLAS_BLAS_LIB
  582. spmv_dw_block_spmv_SOURCES = \
  583. spmv/dw_block_spmv.c \
  584. spmv/dw_block_spmv_kernels.c \
  585. spmv/matrix_market/mm_to_bcsr.c \
  586. spmv/matrix_market/mmio.c
  587. spmv_dw_block_spmv_LDADD = \
  588. $(STARPU_BLAS_LDFLAGS)
  589. endif
  590. ###########################
  591. # C++ Incrementer example #
  592. ###########################
  593. cpp_incrementer_cpp_SOURCES = \
  594. cpp/incrementer_cpp.cpp
  595. if STARPU_USE_CUDA
  596. cpp_incrementer_cpp_SOURCES += \
  597. incrementer/incrementer_kernels.cu
  598. endif
  599. if STARPU_USE_OPENCL
  600. cpp_incrementer_cpp_SOURCES += \
  601. incrementer/incrementer_kernels_opencl.c
  602. endif
  603. #######################
  604. # Incrementer example #
  605. #######################
  606. incrementer_incrementer_SOURCES = \
  607. incrementer/incrementer.c
  608. if STARPU_USE_CUDA
  609. incrementer_incrementer_SOURCES += \
  610. incrementer/incrementer_kernels.cu
  611. endif
  612. if STARPU_USE_OPENCL
  613. incrementer_incrementer_SOURCES += \
  614. incrementer/incrementer_kernels_opencl.c
  615. nobase_STARPU_OPENCL_DATA_DATA += \
  616. incrementer/incrementer_kernels_opencl_kernel.cl
  617. endif
  618. ##################
  619. # Binary example #
  620. ##################
  621. binary_binary_SOURCES = \
  622. binary/binary.c
  623. if STARPU_USE_OPENCL
  624. binary_binary_SOURCES += \
  625. incrementer/incrementer_kernels_opencl.c
  626. endif
  627. #####################
  628. # interface example #
  629. #####################
  630. interface_complex_SOURCES = \
  631. interface/complex.c \
  632. interface/complex_interface.c
  633. if STARPU_USE_CUDA
  634. interface_complex_SOURCES += \
  635. interface/complex_kernels.cu
  636. endif
  637. if STARPU_USE_OPENCL
  638. interface_complex_SOURCES +=\
  639. interface/complex_kernels_opencl.c
  640. nobase_STARPU_OPENCL_DATA_DATA += \
  641. interface/complex_kernels.cl
  642. endif
  643. ######################
  644. # matVecMult example #
  645. ######################
  646. if STARPU_USE_OPENCL
  647. nobase_STARPU_OPENCL_DATA_DATA += \
  648. matvecmult/matvecmult_kernel.cl
  649. endif
  650. #######################
  651. # dot_product example #
  652. #######################
  653. reductions_dot_product_SOURCES = \
  654. reductions/dot_product.c
  655. if STARPU_USE_CUDA
  656. reductions_dot_product_SOURCES += \
  657. reductions/dot_product_kernels.cu
  658. reductions/dot_product_kernels.o: reductions/dot_product_kernels.cu
  659. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  660. endif
  661. if STARPU_USE_OPENCL
  662. nobase_STARPU_OPENCL_DATA_DATA += \
  663. reductions/dot_product_opencl_kernels.cl
  664. endif
  665. ##################
  666. # Mandelbrot Set #
  667. ##################
  668. ################
  669. # Top Examples #
  670. ################
  671. examplebin_PROGRAMS += \
  672. top/hello_world_top
  673. top_hello_world_top_SOURCES = \
  674. top/hello_world_top.c
  675. ######
  676. # Pi #
  677. ######
  678. check_PROGRAMS += \
  679. pi/pi \
  680. pi/pi_redux
  681. examplebin_PROGRAMS += \
  682. pi/pi \
  683. pi/pi_redux
  684. pi_pi_SOURCES = \
  685. pi/pi.c \
  686. pi/SobolQRNG/sobol_gold.c \
  687. pi/SobolQRNG/sobol_primitives.c
  688. if STARPU_USE_CUDA
  689. pi_pi_SOURCES += \
  690. pi/pi_kernel.cu \
  691. pi/SobolQRNG/sobol_gpu.cu
  692. endif
  693. pi_pi_redux_SOURCES = \
  694. pi/pi_redux.c
  695. if STARPU_USE_CUDA
  696. pi_pi_redux_SOURCES += \
  697. pi/pi_redux_kernel.cu
  698. pi_pi_redux_LDADD = \
  699. $(STARPU_CURAND_LDFLAGS)
  700. endif
  701. ###########################
  702. # OpenGL interoperability #
  703. ###########################
  704. if HAVE_OPENGL
  705. examplebin_PROGRAMS += \
  706. gl_interop/gl_interop \
  707. gl_interop/gl_interop_idle
  708. gl_interop_gl_interop_SOURCES = \
  709. gl_interop/gl_interop.c
  710. gl_interop_gl_interop_LDADD = \
  711. $(STARPU_OPENGL_RENDER_LDFLAGS)
  712. gl_interop_gl_interop_idle_SOURCES = \
  713. gl_interop/gl_interop_idle.c
  714. gl_interop_gl_interop_idle_LDADD = \
  715. $(STARPU_OPENGL_RENDER_LDFLAGS)
  716. endif
  717. ####################
  718. # pipeline example #
  719. ####################
  720. if !NO_BLAS_LIB
  721. pipeline_pipeline_SOURCES = \
  722. pipeline/pipeline.c \
  723. common/blas.c
  724. pipeline_pipeline_LDADD = \
  725. $(STARPU_BLAS_LDFLAGS)
  726. endif
  727. showcheck:
  728. -cat $(TEST_LOGS) /dev/null
  729. for i in $(SUBDIRS) ; do \
  730. make -C $$i showcheck ; \
  731. done