Makefile.am 21 KB

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