Makefile.am 21 KB

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