Makefile.am 21 KB

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