Makefile.am 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2013 Université de Bordeaux
  4. # Copyright (C) 2010, 2011, 2012, 2013, 2014 Centre National de la Recherche Scientifique
  5. # Copyright (C) 2011 Télécom-SudParis
  6. # Copyright (C) 2011-2012 INRIA
  7. #
  8. # StarPU is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Lesser General Public License as published by
  10. # the Free Software Foundation; either version 2.1 of the License, or (at
  11. # your option) any later version.
  12. #
  13. # StarPU is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. #
  17. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  18. AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
  19. AM_CXXFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
  20. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(MAGMA_LIBS) $(HWLOC_LIBS) @LIBS@
  21. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  22. AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
  23. SUBDIRS = stencil
  24. BUILT_SOURCES =
  25. if STARPU_USE_OPENCL
  26. nobase_STARPU_OPENCL_DATA_DATA =
  27. endif
  28. EXTRA_DIST = \
  29. axpy/axpy.h \
  30. axpy/axpy_opencl_kernel.cl \
  31. basic_examples/vector_scal_opencl_kernel.cl \
  32. basic_examples/multiformat_types.h \
  33. basic_examples/multiformat_opencl_kernel.cl \
  34. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl \
  35. common/blas_model.c \
  36. spmd/vector_scal_spmd.c \
  37. spmv/spmv_cuda.cu \
  38. spmv/spmv_opencl.cl \
  39. spmv/matrix_market/examples/fidapm05.mtx \
  40. mult/xgemm.c \
  41. lu/xlu.c \
  42. lu/xlu_pivot.c \
  43. lu/xlu_implicit.c \
  44. lu/xlu_implicit_pivot.c \
  45. lu/xlu_kernels.c \
  46. lu/lu_example.c \
  47. incrementer/incrementer_kernels_opencl_kernel.cl \
  48. basic_examples/variable_kernels_opencl_kernel.cl \
  49. matvecmult/matvecmult_kernel.cl \
  50. basic_examples/block_opencl_kernel.cl \
  51. filters/fblock_opencl_kernel.cl \
  52. filters/custom_mf/conversion_opencl.cl \
  53. filters/custom_mf/custom_opencl.cl \
  54. filters/custom_mf/custom_types.h \
  55. interface/complex_kernels.cl \
  56. reductions/dot_product.h \
  57. reductions/dot_product_opencl_kernels.cl \
  58. scheduler/schedulers.sh \
  59. 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. #############################
  346. # Custom multiformat filter #
  347. #############################
  348. #TODO: see why the application is failing
  349. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  350. examplebin_PROGRAMS += \
  351. filters/custom_mf/custom_mf_filter
  352. filters_custom_mf_custom_mf_filter_SOURCES=\
  353. filters/custom_mf/custom_mf_filter.c \
  354. filters/custom_mf/custom_interface.c \
  355. filters/custom_mf/custom_conversion_codelets.c
  356. if STARPU_USE_CUDA
  357. filters_custom_mf_custom_mf_filter_SOURCES += \
  358. filters/custom_mf/conversion.cu \
  359. filters/custom_mf/cuda.cu
  360. endif
  361. if STARPU_USE_OPENCL
  362. filters_custom_mf_custom_mf_filter_SOURCES += \
  363. filters/custom_mf/conversion_opencl.c \
  364. filters/custom_mf/custom_opencl.c
  365. nobase_STARPU_OPENCL_DATA_DATA += \
  366. filters/custom_mf/conversion_opencl.cl \
  367. filters/custom_mf/custom_opencl.cl
  368. endif
  369. ################
  370. # AXPY example #
  371. ################
  372. if !NO_BLAS_LIB
  373. axpy_axpy_SOURCES = \
  374. axpy/axpy.c \
  375. common/blas.c
  376. if STARPU_USE_OPENCL
  377. axpy_axpy_SOURCES += \
  378. axpy/axpy_opencl.c
  379. nobase_STARPU_OPENCL_DATA_DATA += \
  380. axpy/axpy_opencl_kernel.cl
  381. endif
  382. axpy_axpy_LDADD = \
  383. $(STARPU_BLAS_LDFLAGS)
  384. endif
  385. ################
  386. # Mult example #
  387. ################
  388. if !NO_BLAS_LIB
  389. mult_sgemm_SOURCES = \
  390. mult/sgemm.c \
  391. common/blas.c
  392. mult_sgemm_LDADD = \
  393. $(STARPU_BLAS_LDFLAGS)
  394. mult_dgemm_SOURCES = \
  395. mult/dgemm.c \
  396. common/blas.c
  397. mult_dgemm_LDADD = \
  398. $(STARPU_BLAS_LDFLAGS)
  399. endif
  400. ####################
  401. # Cholesky example #
  402. ####################
  403. if !NO_BLAS_LIB
  404. cholesky_cholesky_tag_SOURCES = \
  405. cholesky/cholesky_tag.c \
  406. cholesky/cholesky_models.c \
  407. cholesky/cholesky_kernels.c \
  408. common/blas.c
  409. cholesky_cholesky_tag_LDADD = \
  410. $(STARPU_BLAS_LDFLAGS)
  411. cholesky_cholesky_tile_tag_SOURCES = \
  412. cholesky/cholesky_tile_tag.c \
  413. cholesky/cholesky_models.c \
  414. cholesky/cholesky_kernels.c \
  415. common/blas.c
  416. cholesky_cholesky_tile_tag_LDADD = \
  417. $(STARPU_BLAS_LDFLAGS)
  418. cholesky_cholesky_grain_tag_SOURCES = \
  419. cholesky/cholesky_grain_tag.c \
  420. cholesky/cholesky_models.c \
  421. cholesky/cholesky_kernels.c \
  422. common/blas.c
  423. cholesky_cholesky_grain_tag_LDADD = \
  424. $(STARPU_BLAS_LDFLAGS)
  425. cholesky_cholesky_implicit_SOURCES = \
  426. cholesky/cholesky_implicit.c \
  427. cholesky/cholesky_models.c \
  428. cholesky/cholesky_kernels.c \
  429. sched_ctx_utils/sched_ctx_utils.c \
  430. common/blas.c
  431. cholesky_cholesky_implicit_LDADD = \
  432. $(STARPU_BLAS_LDFLAGS)
  433. endif
  434. ##############
  435. # LU example #
  436. ##############
  437. if !NO_BLAS_LIB
  438. lu_lu_example_float_SOURCES = \
  439. lu/lu_example_float.c \
  440. lu/slu.c \
  441. lu/slu_pivot.c \
  442. lu/slu_kernels.c \
  443. common/blas.c
  444. lu_lu_example_float_LDADD = \
  445. $(STARPU_BLAS_LDFLAGS)
  446. lu_lu_example_double_SOURCES = \
  447. lu/lu_example_double.c \
  448. lu/dlu.c \
  449. lu/dlu_pivot.c \
  450. lu/dlu_kernels.c \
  451. common/blas.c
  452. lu_lu_example_double_LDADD = \
  453. $(STARPU_BLAS_LDFLAGS)
  454. lu_lu_implicit_example_float_SOURCES = \
  455. lu/lu_example_float.c \
  456. lu/slu_implicit.c \
  457. lu/slu_implicit_pivot.c \
  458. lu/slu_kernels.c \
  459. common/blas.c
  460. lu_lu_implicit_example_float_LDADD = \
  461. $(STARPU_BLAS_LDFLAGS)
  462. lu_lu_implicit_example_double_SOURCES = \
  463. lu/lu_example_double.c \
  464. lu/dlu_implicit.c \
  465. lu/dlu_implicit_pivot.c \
  466. lu/dlu_kernels.c \
  467. common/blas.c
  468. lu_lu_implicit_example_double_LDADD = \
  469. $(STARPU_BLAS_LDFLAGS)
  470. if MKL_BLAS_LIB
  471. lu_lu_example_complex_float_SOURCES = \
  472. lu/lu_example_complex_float.c \
  473. lu/clu.c \
  474. lu/clu_pivot.c \
  475. lu/clu_kernels.c \
  476. lu/blas_complex.c \
  477. common/blas.c
  478. lu_lu_example_complex_float_LDADD = \
  479. $(STARPU_BLAS_LDFLAGS)
  480. lu_lu_implicit_example_complex_float_SOURCES = \
  481. lu/lu_example_complex_float.c \
  482. lu/clu_implicit.c \
  483. lu/clu_implicit_pivot.c \
  484. lu/clu_kernels.c \
  485. lu/blas_complex.c \
  486. common/blas.c
  487. lu_lu_implicit_example_complex_float_LDADD = \
  488. $(STARPU_BLAS_LDFLAGS)
  489. lu_lu_example_complex_double_SOURCES = \
  490. lu/lu_example_complex_double.c \
  491. lu/zlu.c \
  492. lu/zlu_pivot.c \
  493. lu/zlu_kernels.c \
  494. lu/blas_complex.c \
  495. common/blas.c
  496. lu_lu_example_complex_double_LDADD = \
  497. $(STARPU_BLAS_LDFLAGS)
  498. lu_lu_implicit_example_complex_double_SOURCES = \
  499. lu/lu_example_complex_double.c \
  500. lu/zlu_implicit.c \
  501. lu/zlu_implicit_pivot.c \
  502. lu/zlu_kernels.c \
  503. lu/blas_complex.c \
  504. common/blas.c
  505. lu_lu_implicit_example_complex_double_LDADD = \
  506. $(STARPU_BLAS_LDFLAGS)
  507. endif
  508. endif
  509. ################
  510. # Heat example #
  511. ################
  512. if !NO_BLAS_LIB
  513. heat_heat_SOURCES = \
  514. heat/heat.c \
  515. heat/dw_factolu.c \
  516. heat/dw_factolu_tag.c \
  517. heat/dw_factolu_grain.c \
  518. heat/dw_sparse_cg.c \
  519. heat/heat_display.c \
  520. heat/lu_kernels_model.c \
  521. heat/dw_sparse_cg_kernels.c \
  522. heat/dw_factolu_kernels.c \
  523. common/blas.c
  524. heat_heat_LDADD = \
  525. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  526. $(STARPU_BLAS_LDFLAGS)
  527. endif
  528. ##############
  529. # CG example #
  530. ##############
  531. if !NO_BLAS_LIB
  532. cg_cg_SOURCES = \
  533. cg/cg.c \
  534. cg/cg_kernels.c \
  535. common/blas.c
  536. if STARPU_USE_CUDA
  537. cg_cg_SOURCES += \
  538. cg/cg_dot_kernel.cu
  539. cg/cg_dot_kernel.o: cg/cg_dot_kernel.cu
  540. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  541. endif
  542. cg_cg_LDADD = \
  543. $(STARPU_BLAS_LDFLAGS)
  544. endif
  545. ################
  546. # SPMD example #
  547. ################
  548. spmd_vector_scal_spmd_SOURCES = \
  549. spmd/vector_scal_spmd.c
  550. ################
  551. # SpMV example #
  552. ################
  553. spmv_spmv_SOURCES = \
  554. spmv/spmv.c \
  555. spmv/spmv_kernels.c
  556. if STARPU_USE_CUDA
  557. spmv_spmv_SOURCES += \
  558. spmv/spmv_cuda.cu
  559. endif
  560. if ATLAS_BLAS_LIB
  561. spmv_dw_block_spmv_SOURCES = \
  562. spmv/dw_block_spmv.c \
  563. spmv/dw_block_spmv_kernels.c \
  564. spmv/matrix_market/mm_to_bcsr.c \
  565. spmv/matrix_market/mmio.c
  566. spmv_dw_block_spmv_LDADD = \
  567. $(STARPU_BLAS_LDFLAGS)
  568. endif
  569. ###########################
  570. # C++ Incrementer example #
  571. ###########################
  572. cpp_incrementer_cpp_SOURCES = \
  573. cpp/incrementer_cpp.cpp
  574. if STARPU_USE_CUDA
  575. cpp_incrementer_cpp_SOURCES += \
  576. incrementer/incrementer_kernels.cu
  577. endif
  578. if STARPU_USE_OPENCL
  579. cpp_incrementer_cpp_SOURCES += \
  580. incrementer/incrementer_kernels_opencl.c
  581. endif
  582. #######################
  583. # Incrementer example #
  584. #######################
  585. incrementer_incrementer_SOURCES = \
  586. incrementer/incrementer.c
  587. if STARPU_USE_CUDA
  588. incrementer_incrementer_SOURCES += \
  589. incrementer/incrementer_kernels.cu
  590. endif
  591. if STARPU_USE_OPENCL
  592. incrementer_incrementer_SOURCES += \
  593. incrementer/incrementer_kernels_opencl.c
  594. nobase_STARPU_OPENCL_DATA_DATA += \
  595. incrementer/incrementer_kernels_opencl_kernel.cl
  596. endif
  597. ##################
  598. # Binary example #
  599. ##################
  600. binary_binary_SOURCES = \
  601. binary/binary.c
  602. if STARPU_USE_OPENCL
  603. binary_binary_SOURCES += \
  604. incrementer/incrementer_kernels_opencl.c
  605. endif
  606. #####################
  607. # interface example #
  608. #####################
  609. interface_complex_SOURCES = \
  610. interface/complex.c \
  611. interface/complex_interface.c
  612. if STARPU_USE_CUDA
  613. interface_complex_SOURCES += \
  614. interface/complex_kernels.cu
  615. interface/complex_kernels.o: interface/complex_kernels.cu
  616. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  617. endif
  618. if STARPU_USE_OPENCL
  619. interface_complex_SOURCES +=\
  620. interface/complex_kernels_opencl.c
  621. nobase_STARPU_OPENCL_DATA_DATA += \
  622. interface/complex_kernels.cl
  623. endif
  624. ######################
  625. # matVecMult example #
  626. ######################
  627. if STARPU_USE_OPENCL
  628. nobase_STARPU_OPENCL_DATA_DATA += \
  629. matvecmult/matvecmult_kernel.cl
  630. endif
  631. #######################
  632. # dot_product example #
  633. #######################
  634. reductions_dot_product_SOURCES = \
  635. reductions/dot_product.c
  636. if STARPU_USE_CUDA
  637. reductions_dot_product_SOURCES += \
  638. reductions/dot_product_kernels.cu
  639. reductions/dot_product_kernels.o: reductions/dot_product_kernels.cu
  640. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  641. endif
  642. if STARPU_USE_OPENCL
  643. nobase_STARPU_OPENCL_DATA_DATA += \
  644. reductions/dot_product_opencl_kernels.cl
  645. endif
  646. ##################
  647. # Mandelbrot Set #
  648. ##################
  649. examplebin_PROGRAMS += \
  650. mandelbrot/mandelbrot
  651. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  652. if HAVE_X11
  653. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  654. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11
  655. endif
  656. ################
  657. # Top Examples #
  658. ################
  659. examplebin_PROGRAMS += \
  660. top/hello_world_top
  661. top_hello_world_top_SOURCES = \
  662. top/hello_world_top.c
  663. ######
  664. # Pi #
  665. ######
  666. if !STARPU_HAVE_WINDOWS
  667. examplebin_PROGRAMS += \
  668. pi/pi \
  669. pi/pi_redux
  670. pi_pi_SOURCES = \
  671. pi/pi.c \
  672. pi/SobolQRNG/sobol_gold.c \
  673. pi/SobolQRNG/sobol_primitives.c
  674. if STARPU_USE_CUDA
  675. pi_pi_SOURCES += \
  676. pi/pi_kernel.cu \
  677. pi/SobolQRNG/sobol_gpu.cu
  678. endif
  679. pi_pi_redux_SOURCES = \
  680. pi/pi_redux.c
  681. if STARPU_USE_CUDA
  682. pi_pi_redux_SOURCES += \
  683. pi/pi_redux_kernel.cu
  684. pi_pi_redux_LDADD = \
  685. $(STARPU_CURAND_LDFLAGS)
  686. endif
  687. endif
  688. ###########################
  689. # OpenGL interoperability #
  690. ###########################
  691. if HAVE_OPENGL
  692. examplebin_PROGRAMS += \
  693. gl_interop/gl_interop \
  694. gl_interop/gl_interop_idle
  695. gl_interop_gl_interop_SOURCES = \
  696. gl_interop/gl_interop.c
  697. gl_interop_gl_interop_LDADD = \
  698. $(STARPU_OPENGL_RENDER_LDFLAGS)
  699. gl_interop_gl_interop_idle_SOURCES = \
  700. gl_interop/gl_interop_idle.c
  701. gl_interop_gl_interop_idle_LDADD = \
  702. $(STARPU_OPENGL_RENDER_LDFLAGS)
  703. endif
  704. ####################
  705. # pipeline example #
  706. ####################
  707. if !NO_BLAS_LIB
  708. pipeline_pipeline_SOURCES = \
  709. pipeline/pipeline.c \
  710. common/blas.c
  711. pipeline_pipeline_LDADD = \
  712. $(STARPU_BLAS_LDFLAGS)
  713. endif
  714. ##################
  715. # openmp example #
  716. ##################
  717. if !STARPU_HAVE_WINDOWS
  718. openmp_vector_scal_omp_CFLAGS = \
  719. $(AM_CFLAGS) -fopenmp
  720. sched_ctx_parallel_code_CFLAGS = \
  721. $(AM_CFLAGS) -fopenmp
  722. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  723. $(AM_CFLAGS) -fopenmp
  724. sched_ctx_nested_sched_ctxs_CFLAGS = \
  725. $(AM_CFLAGS) -fopenmp
  726. endif
  727. showcheck:
  728. -cat $(TEST_LOGS) /dev/null
  729. for i in $(SUBDIRS) ; do \
  730. make -C $$i showcheck ; \
  731. done