Makefile.am 20 KB

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