Makefile.am 20 KB

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