Makefile.am 22 KB

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