Makefile.am 23 KB

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