Makefile.am 20 KB

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