Makefile.am 20 KB

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