Makefile.am 21 KB

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