Makefile.am 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  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-2016 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. if STARPU_SIMGRID
  156. STARPU_EXAMPLES += \
  157. sched_ctx/prio \
  158. worker_collections/worker_list_example
  159. else
  160. STARPU_EXAMPLES += \
  161. basic_examples/hello_world \
  162. basic_examples/vector_scal \
  163. basic_examples/mult \
  164. basic_examples/block \
  165. basic_examples/variable \
  166. basic_examples/multiformat \
  167. basic_examples/dynamic_handles \
  168. cpp/incrementer_cpp \
  169. filters/fvector \
  170. filters/fblock \
  171. filters/fmatrix \
  172. filters/fmultiple_manual \
  173. filters/fmultiple_submit \
  174. filters/fmultiple_submit_readonly \
  175. tag_example/tag_example \
  176. tag_example/tag_example2 \
  177. tag_example/tag_example3 \
  178. tag_example/tag_example4 \
  179. tag_example/tag_restartable \
  180. spmd/vector_scal_spmd \
  181. spmv/spmv \
  182. callback/callback \
  183. callback/prologue \
  184. incrementer/incrementer \
  185. binary/binary \
  186. interface/complex \
  187. matvecmult/matvecmult \
  188. profiling/profiling \
  189. scheduler/dummy_sched \
  190. scheduler/heteroprio_test \
  191. sched_ctx/sched_ctx \
  192. sched_ctx/dummy_sched_with_ctx \
  193. worker_collections/worker_tree_example \
  194. reductions/dot_product \
  195. reductions/minmax_reduction
  196. endif
  197. if !STARPU_SIMGRID
  198. STARPU_EXAMPLES += \
  199. scheduler/dummy_sched
  200. if STARPU_HAVE_F77_H
  201. STARPU_EXAMPLES += \
  202. basic_examples/vector_scal_fortran \
  203. fortran/hello
  204. endif
  205. if STARPU_HAVE_FC
  206. if !STARPU_SANITIZE
  207. STARPU_EXAMPLES += \
  208. fortran90/f90_example \
  209. native_fortran/nf_vector \
  210. native_fortran/nf_matrix \
  211. native_fortran/nf_example
  212. endif
  213. endif
  214. endif
  215. if !NO_BLAS_LIB
  216. if STARPU_SIMGRID
  217. STARPU_EXAMPLES += \
  218. mult/sgemm \
  219. mult/dgemm \
  220. cholesky/cholesky_tag \
  221. cholesky/cholesky_tile_tag \
  222. cholesky/cholesky_implicit
  223. else
  224. STARPU_EXAMPLES += \
  225. axpy/axpy \
  226. cholesky/cholesky_grain_tag \
  227. lu/lu_example_float \
  228. lu/lu_example_double \
  229. lu/lu_implicit_example_float \
  230. lu/lu_implicit_example_double \
  231. heat/heat \
  232. cg/cg \
  233. pipeline/pipeline
  234. endif
  235. endif
  236. if !STARPU_SIMGRID
  237. if MKL_BLAS_LIB
  238. STARPU_EXAMPLES += \
  239. lu/lu_example_complex_float \
  240. lu/lu_example_complex_double \
  241. lu/lu_implicit_example_complex_float \
  242. lu/lu_implicit_example_complex_double
  243. endif
  244. if ATLAS_BLAS_LIB
  245. STARPU_EXAMPLES += \
  246. spmv/dw_block_spmv
  247. endif
  248. if !STARPU_SIMGRID
  249. if STARPU_HAVE_F77_H
  250. STARPU_EXAMPLES += \
  251. basic_examples/vector_scal_fortran \
  252. fortran/hello
  253. endif
  254. endif
  255. if STARPU_HAVE_OPENMP
  256. STARPU_EXAMPLES += \
  257. openmp/vector_scal_omp \
  258. sched_ctx/sched_ctx_without_sched_policy\
  259. sched_ctx/nested_sched_ctxs \
  260. sched_ctx/sched_ctx_without_sched_policy_awake\
  261. sched_ctx/parallel_tasks_reuse_handle
  262. if STARPU_LONG_CHECK
  263. STARPU_EXAMPLES += \
  264. sched_ctx/parallel_code
  265. endif
  266. if STARPU_HAVE_HWLOC
  267. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  268. STARPU_EXAMPLES += \
  269. sched_ctx/parallel_tasks_with_cluster_api
  270. endif
  271. endif
  272. endif
  273. endif !STARPU_SIMGRID
  274. ##################
  275. # Basic examples #
  276. ##################
  277. basic_examples_vector_scal_SOURCES = \
  278. basic_examples/vector_scal.c \
  279. basic_examples/vector_scal_cpu.c
  280. if STARPU_HAVE_ICC
  281. if STARPU_CROSS_COMPILING
  282. else
  283. basic_examples_vector_scal_SOURCES += \
  284. basic_examples/vector_scal_cpu_icc.icc
  285. endif
  286. endif
  287. if STARPU_USE_CUDA
  288. basic_examples_vector_scal_SOURCES += \
  289. basic_examples/vector_scal_cuda.cu
  290. endif
  291. if STARPU_USE_OPENCL
  292. basic_examples_vector_scal_SOURCES += \
  293. basic_examples/vector_scal_opencl.c
  294. nobase_STARPU_OPENCL_DATA_DATA += \
  295. basic_examples/vector_scal_opencl_kernel.cl
  296. endif
  297. if STARPU_HAVE_F77_H
  298. basic_examples_vector_scal_fortran_SOURCES = \
  299. basic_examples/vector_scal_fortran.F \
  300. basic_examples/vector_scal_c.c \
  301. basic_examples/vector_scal_cpu.c
  302. if STARPU_USE_CUDA
  303. basic_examples_vector_scal_fortran_SOURCES += \
  304. basic_examples/vector_scal_cuda.cu
  305. basic_examples_vector_scal_fortran_LDADD = \
  306. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  307. endif
  308. fortran_hello_SOURCES = \
  309. fortran/hello_c.c \
  310. fortran/hello.F \
  311. fortran/StarPU_fortran.h
  312. endif
  313. if STARPU_HAVE_FC
  314. fortran90_f90_example_SOURCES = \
  315. fortran90/mod_types.f90 \
  316. $(top_srcdir)/include/starpu_mod.f90 \
  317. fortran90/mod_interface.f90 \
  318. fortran90/mod_compute.f90 \
  319. fortran90/marshalling.c \
  320. fortran90/f90_example.f90
  321. native_fortran_nf_vector_SOURCES = \
  322. native_fortran/nf_codelets.f90 \
  323. $(top_srcdir)/include/fstarpu_mod.f90 \
  324. native_fortran/nf_vector.f90
  325. native_fortran_nf_matrix_SOURCES = \
  326. native_fortran/nf_codelets.f90 \
  327. $(top_srcdir)/include/fstarpu_mod.f90 \
  328. native_fortran/nf_matrix.f90
  329. native_fortran_nf_example_SOURCES = \
  330. native_fortran/nf_types.f90 \
  331. native_fortran/nf_compute.f90 \
  332. $(top_srcdir)/include/fstarpu_mod.f90 \
  333. native_fortran/nf_example.f90
  334. endif
  335. #######################
  336. # Multiformat example #
  337. #######################
  338. basic_examples_multiformat_SOURCES = \
  339. basic_examples/multiformat.c \
  340. basic_examples/multiformat_conversion_codelets.c
  341. if STARPU_USE_CUDA
  342. basic_examples_multiformat_SOURCES += \
  343. basic_examples/multiformat_cuda.cu \
  344. basic_examples/multiformat_conversion_codelets_cuda.cu
  345. endif
  346. if STARPU_USE_OPENCL
  347. basic_examples_multiformat_SOURCES += \
  348. basic_examples/multiformat_opencl.c \
  349. basic_examples/multiformat_conversion_codelets_opencl.c
  350. nobase_STARPU_OPENCL_DATA_DATA += \
  351. basic_examples/multiformat_opencl_kernel.cl \
  352. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  353. endif
  354. #################
  355. # block example #
  356. #################
  357. basic_examples_block_SOURCES = \
  358. basic_examples/block.c \
  359. basic_examples/block_cpu.c
  360. if STARPU_USE_CUDA
  361. basic_examples_block_SOURCES += \
  362. basic_examples/block_cuda.cu
  363. endif
  364. if STARPU_USE_OPENCL
  365. basic_examples_block_SOURCES += \
  366. basic_examples/block_opencl.c
  367. nobase_STARPU_OPENCL_DATA_DATA += \
  368. basic_examples/block_opencl_kernel.cl
  369. endif
  370. ####################
  371. # Variable example #
  372. ####################
  373. basic_examples_variable_SOURCES = \
  374. basic_examples/variable.c \
  375. basic_examples/variable_kernels_cpu.c
  376. if STARPU_USE_CUDA
  377. basic_examples_variable_SOURCES += \
  378. basic_examples/variable_kernels.cu
  379. endif
  380. if STARPU_USE_OPENCL
  381. basic_examples_variable_SOURCES += \
  382. basic_examples/variable_kernels_opencl.c
  383. nobase_STARPU_OPENCL_DATA_DATA += \
  384. basic_examples/variable_kernels_opencl_kernel.cl
  385. endif
  386. ###########
  387. # Filters #
  388. ###########
  389. filters_fblock_SOURCES = \
  390. filters/fblock.c \
  391. filters/fblock_cpu.c
  392. if STARPU_USE_CUDA
  393. filters_fblock_SOURCES += \
  394. filters/fblock_cuda.cu
  395. endif
  396. if STARPU_USE_OPENCL
  397. filters_fblock_SOURCES += \
  398. filters/fblock_opencl.c
  399. nobase_STARPU_OPENCL_DATA_DATA += \
  400. filters/fblock_opencl_kernel.cl
  401. endif
  402. filters_fmultiple_manual_SOURCES = \
  403. filters/fmultiple_manual.c
  404. if STARPU_USE_CUDA
  405. filters_fmultiple_manual_SOURCES += \
  406. filters/fmultiple_cuda.cu
  407. endif
  408. filters_fmultiple_submit_SOURCES = \
  409. filters/fmultiple_submit.c
  410. if STARPU_USE_CUDA
  411. filters_fmultiple_submit_SOURCES += \
  412. filters/fmultiple_cuda.cu
  413. endif
  414. filters_fmultiple_submit_readonly_SOURCES = \
  415. filters/fmultiple_submit_readonly.c
  416. if STARPU_USE_CUDA
  417. filters_fmultiple_submit_readonly_SOURCES += \
  418. filters/fmultiple_cuda.cu
  419. endif
  420. examplebin_PROGRAMS += \
  421. filters/shadow \
  422. filters/shadow2d \
  423. filters/shadow3d
  424. #############################
  425. # Custom multiformat filter #
  426. #############################
  427. #TODO: see why the application is failing
  428. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  429. examplebin_PROGRAMS += \
  430. filters/custom_mf/custom_mf_filter
  431. filters_custom_mf_custom_mf_filter_SOURCES=\
  432. filters/custom_mf/custom_mf_filter.c \
  433. filters/custom_mf/custom_interface.c \
  434. filters/custom_mf/custom_conversion_codelets.c
  435. if STARPU_USE_CUDA
  436. filters_custom_mf_custom_mf_filter_SOURCES += \
  437. filters/custom_mf/conversion.cu \
  438. filters/custom_mf/cuda.cu
  439. endif
  440. if STARPU_USE_OPENCL
  441. filters_custom_mf_custom_mf_filter_SOURCES += \
  442. filters/custom_mf/conversion_opencl.c \
  443. filters/custom_mf/custom_opencl.c
  444. nobase_STARPU_OPENCL_DATA_DATA += \
  445. filters/custom_mf/conversion_opencl.cl \
  446. filters/custom_mf/custom_opencl.cl
  447. endif
  448. ################
  449. # AXPY example #
  450. ################
  451. if !NO_BLAS_LIB
  452. axpy_axpy_SOURCES = \
  453. axpy/axpy.c \
  454. common/blas.c
  455. if STARPU_USE_OPENCL
  456. axpy_axpy_SOURCES += \
  457. axpy/axpy_opencl.c
  458. nobase_STARPU_OPENCL_DATA_DATA += \
  459. axpy/axpy_opencl_kernel.cl
  460. endif
  461. axpy_axpy_LDADD = \
  462. $(STARPU_BLAS_LDFLAGS)
  463. endif
  464. ################
  465. # Mult example #
  466. ################
  467. if !NO_BLAS_LIB
  468. mult_sgemm_SOURCES = \
  469. mult/sgemm.c \
  470. common/blas.c
  471. mult_sgemm_LDADD = \
  472. $(STARPU_BLAS_LDFLAGS)
  473. mult_dgemm_SOURCES = \
  474. mult/dgemm.c \
  475. common/blas.c
  476. mult_dgemm_LDADD = \
  477. $(STARPU_BLAS_LDFLAGS)
  478. endif
  479. ####################
  480. # Cholesky example #
  481. ####################
  482. if !NO_BLAS_LIB
  483. cholesky_cholesky_tag_SOURCES = \
  484. cholesky/cholesky_tag.c \
  485. cholesky/cholesky_models.c \
  486. cholesky/cholesky_kernels.c \
  487. common/blas.c
  488. cholesky_cholesky_tag_LDADD = \
  489. $(STARPU_BLAS_LDFLAGS)
  490. cholesky_cholesky_tile_tag_SOURCES = \
  491. cholesky/cholesky_tile_tag.c \
  492. cholesky/cholesky_models.c \
  493. cholesky/cholesky_kernels.c \
  494. common/blas.c
  495. cholesky_cholesky_tile_tag_LDADD = \
  496. $(STARPU_BLAS_LDFLAGS)
  497. cholesky_cholesky_grain_tag_SOURCES = \
  498. cholesky/cholesky_grain_tag.c \
  499. cholesky/cholesky_models.c \
  500. cholesky/cholesky_kernels.c \
  501. common/blas.c
  502. cholesky_cholesky_grain_tag_LDADD = \
  503. $(STARPU_BLAS_LDFLAGS)
  504. cholesky_cholesky_implicit_SOURCES = \
  505. cholesky/cholesky_implicit.c \
  506. cholesky/cholesky_models.c \
  507. cholesky/cholesky_kernels.c \
  508. sched_ctx_utils/sched_ctx_utils.c \
  509. common/blas.c
  510. cholesky_cholesky_implicit_LDADD = \
  511. $(STARPU_BLAS_LDFLAGS)
  512. endif
  513. ##############
  514. # LU example #
  515. ##############
  516. if !NO_BLAS_LIB
  517. lu_lu_example_float_SOURCES = \
  518. lu/lu_example_float.c \
  519. lu/slu.c \
  520. lu/slu_pivot.c \
  521. lu/slu_kernels.c \
  522. common/blas.c
  523. lu_lu_example_float_LDADD = \
  524. $(STARPU_BLAS_LDFLAGS)
  525. lu_lu_example_double_SOURCES = \
  526. lu/lu_example_double.c \
  527. lu/dlu.c \
  528. lu/dlu_pivot.c \
  529. lu/dlu_kernels.c \
  530. common/blas.c
  531. lu_lu_example_double_LDADD = \
  532. $(STARPU_BLAS_LDFLAGS)
  533. lu_lu_implicit_example_float_SOURCES = \
  534. lu/lu_example_float.c \
  535. lu/slu_implicit.c \
  536. lu/slu_implicit_pivot.c \
  537. lu/slu_kernels.c \
  538. common/blas.c
  539. lu_lu_implicit_example_float_LDADD = \
  540. $(STARPU_BLAS_LDFLAGS)
  541. lu_lu_implicit_example_double_SOURCES = \
  542. lu/lu_example_double.c \
  543. lu/dlu_implicit.c \
  544. lu/dlu_implicit_pivot.c \
  545. lu/dlu_kernels.c \
  546. common/blas.c
  547. lu_lu_implicit_example_double_LDADD = \
  548. $(STARPU_BLAS_LDFLAGS)
  549. if MKL_BLAS_LIB
  550. lu_lu_example_complex_float_SOURCES = \
  551. lu/lu_example_complex_float.c \
  552. lu/clu.c \
  553. lu/clu_pivot.c \
  554. lu/clu_kernels.c \
  555. lu/blas_complex.c \
  556. common/blas.c
  557. lu_lu_example_complex_float_LDADD = \
  558. $(STARPU_BLAS_LDFLAGS)
  559. lu_lu_implicit_example_complex_float_SOURCES = \
  560. lu/lu_example_complex_float.c \
  561. lu/clu_implicit.c \
  562. lu/clu_implicit_pivot.c \
  563. lu/clu_kernels.c \
  564. lu/blas_complex.c \
  565. common/blas.c
  566. lu_lu_implicit_example_complex_float_LDADD = \
  567. $(STARPU_BLAS_LDFLAGS)
  568. lu_lu_example_complex_double_SOURCES = \
  569. lu/lu_example_complex_double.c \
  570. lu/zlu.c \
  571. lu/zlu_pivot.c \
  572. lu/zlu_kernels.c \
  573. lu/blas_complex.c \
  574. common/blas.c
  575. lu_lu_example_complex_double_LDADD = \
  576. $(STARPU_BLAS_LDFLAGS)
  577. lu_lu_implicit_example_complex_double_SOURCES = \
  578. lu/lu_example_complex_double.c \
  579. lu/zlu_implicit.c \
  580. lu/zlu_implicit_pivot.c \
  581. lu/zlu_kernels.c \
  582. lu/blas_complex.c \
  583. common/blas.c
  584. lu_lu_implicit_example_complex_double_LDADD = \
  585. $(STARPU_BLAS_LDFLAGS)
  586. endif
  587. endif
  588. ################
  589. # Heat example #
  590. ################
  591. if !NO_BLAS_LIB
  592. heat_heat_SOURCES = \
  593. heat/heat.c \
  594. heat/dw_factolu.c \
  595. heat/dw_factolu_tag.c \
  596. heat/dw_factolu_grain.c \
  597. heat/dw_sparse_cg.c \
  598. heat/heat_display.c \
  599. heat/lu_kernels_model.c \
  600. heat/dw_sparse_cg_kernels.c \
  601. heat/dw_factolu_kernels.c \
  602. common/blas.c
  603. heat_heat_LDADD = \
  604. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  605. $(STARPU_BLAS_LDFLAGS)
  606. endif
  607. ##############
  608. # CG example #
  609. ##############
  610. if !NO_BLAS_LIB
  611. cg_cg_SOURCES = \
  612. cg/cg.c \
  613. cg/cg_kernels.c \
  614. common/blas.c
  615. if STARPU_USE_CUDA
  616. cg_cg_SOURCES += \
  617. cg/cg_dot_kernel.cu
  618. endif
  619. cg_cg_LDADD = \
  620. $(STARPU_BLAS_LDFLAGS)
  621. endif
  622. ################
  623. # SPMD example #
  624. ################
  625. spmd_vector_scal_spmd_SOURCES = \
  626. spmd/vector_scal_spmd.c
  627. ################
  628. # SpMV example #
  629. ################
  630. spmv_spmv_SOURCES = \
  631. spmv/spmv.c \
  632. spmv/spmv_kernels.c
  633. if STARPU_USE_CUDA
  634. spmv_spmv_SOURCES += \
  635. spmv/spmv_cuda.cu
  636. endif
  637. if ATLAS_BLAS_LIB
  638. spmv_dw_block_spmv_SOURCES = \
  639. spmv/dw_block_spmv.c \
  640. spmv/dw_block_spmv_kernels.c \
  641. spmv/matrix_market/mm_to_bcsr.c \
  642. spmv/matrix_market/mmio.c
  643. spmv_dw_block_spmv_LDADD = \
  644. $(STARPU_BLAS_LDFLAGS)
  645. endif
  646. ###########################
  647. # C++ Incrementer example #
  648. ###########################
  649. cpp_incrementer_cpp_SOURCES = \
  650. cpp/incrementer_cpp.cpp
  651. if STARPU_USE_CUDA
  652. cpp_incrementer_cpp_SOURCES += \
  653. incrementer/incrementer_kernels.cu
  654. endif
  655. if STARPU_USE_OPENCL
  656. cpp_incrementer_cpp_SOURCES += \
  657. incrementer/incrementer_kernels_opencl.c
  658. endif
  659. #######################
  660. # Incrementer example #
  661. #######################
  662. incrementer_incrementer_SOURCES = \
  663. incrementer/incrementer.c
  664. if STARPU_USE_CUDA
  665. incrementer_incrementer_SOURCES += \
  666. incrementer/incrementer_kernels.cu
  667. endif
  668. if STARPU_USE_OPENCL
  669. incrementer_incrementer_SOURCES += \
  670. incrementer/incrementer_kernels_opencl.c
  671. nobase_STARPU_OPENCL_DATA_DATA += \
  672. incrementer/incrementer_kernels_opencl_kernel.cl
  673. endif
  674. ##################
  675. # Binary example #
  676. ##################
  677. binary_binary_SOURCES = \
  678. binary/binary.c
  679. if STARPU_USE_OPENCL
  680. binary_binary_SOURCES += \
  681. incrementer/incrementer_kernels_opencl.c
  682. endif
  683. #####################
  684. # interface example #
  685. #####################
  686. interface_complex_SOURCES = \
  687. interface/complex.c \
  688. interface/complex_interface.c
  689. if STARPU_USE_CUDA
  690. interface_complex_SOURCES += \
  691. interface/complex_kernels.cu
  692. endif
  693. if STARPU_USE_OPENCL
  694. interface_complex_SOURCES +=\
  695. interface/complex_kernels_opencl.c
  696. nobase_STARPU_OPENCL_DATA_DATA += \
  697. interface/complex_kernels.cl
  698. endif
  699. ######################
  700. # matVecMult example #
  701. ######################
  702. if STARPU_USE_OPENCL
  703. nobase_STARPU_OPENCL_DATA_DATA += \
  704. matvecmult/matvecmult_kernel.cl
  705. endif
  706. #######################
  707. # dot_product example #
  708. #######################
  709. reductions_dot_product_SOURCES = \
  710. reductions/dot_product.c
  711. if STARPU_USE_CUDA
  712. reductions_dot_product_SOURCES += \
  713. reductions/dot_product_kernels.cu
  714. endif
  715. if STARPU_USE_OPENCL
  716. nobase_STARPU_OPENCL_DATA_DATA += \
  717. reductions/dot_product_opencl_kernels.cl
  718. endif
  719. ##################
  720. # Mandelbrot Set #
  721. ##################
  722. examplebin_PROGRAMS += \
  723. mandelbrot/mandelbrot
  724. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  725. if HAVE_X11
  726. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  727. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
  728. endif
  729. ####################
  730. # Image downscaler #
  731. ####################
  732. examplebin_PROGRAMS += \
  733. ppm_downscaler/ppm_downscaler \
  734. ppm_downscaler/yuv_downscaler
  735. ################
  736. # Top Examples #
  737. ################
  738. examplebin_PROGRAMS += \
  739. top/hello_world_top
  740. top_hello_world_top_SOURCES = \
  741. top/hello_world_top.c
  742. ######
  743. # Pi #
  744. ######
  745. if !STARPU_HAVE_WINDOWS
  746. examplebin_PROGRAMS += \
  747. pi/pi \
  748. pi/pi_redux
  749. pi_pi_SOURCES = \
  750. pi/pi.c \
  751. pi/SobolQRNG/sobol_gold.c \
  752. pi/SobolQRNG/sobol_primitives.c
  753. if STARPU_USE_CUDA
  754. pi_pi_SOURCES += \
  755. pi/pi_kernel.cu \
  756. pi/SobolQRNG/sobol_gpu.cu
  757. endif
  758. pi_pi_redux_SOURCES = \
  759. pi/pi_redux.c
  760. if STARPU_USE_CUDA
  761. pi_pi_redux_SOURCES += \
  762. pi/pi_redux_kernel.cu
  763. pi_pi_redux_LDADD = \
  764. $(STARPU_CURAND_LDFLAGS)
  765. endif
  766. endif
  767. ###########################
  768. # OpenGL interoperability #
  769. ###########################
  770. if HAVE_OPENGL
  771. examplebin_PROGRAMS += \
  772. gl_interop/gl_interop \
  773. gl_interop/gl_interop_idle
  774. gl_interop_gl_interop_SOURCES = \
  775. gl_interop/gl_interop.c
  776. gl_interop_gl_interop_LDADD = \
  777. $(STARPU_OPENGL_RENDER_LDFLAGS)
  778. gl_interop_gl_interop_idle_SOURCES = \
  779. gl_interop/gl_interop_idle.c
  780. gl_interop_gl_interop_idle_LDADD = \
  781. $(STARPU_OPENGL_RENDER_LDFLAGS)
  782. endif
  783. ####################
  784. # pipeline example #
  785. ####################
  786. if !NO_BLAS_LIB
  787. pipeline_pipeline_SOURCES = \
  788. pipeline/pipeline.c \
  789. common/blas.c
  790. pipeline_pipeline_LDADD = \
  791. $(STARPU_BLAS_LDFLAGS)
  792. endif
  793. ##################
  794. # openmp example #
  795. ##################
  796. if STARPU_HAVE_OPENMP
  797. openmp_vector_scal_omp_CFLAGS = \
  798. $(AM_CFLAGS) -fopenmp
  799. sched_ctx_parallel_code_CFLAGS = \
  800. $(AM_CFLAGS) -fopenmp
  801. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  802. $(AM_CFLAGS) -fopenmp
  803. sched_ctx_nested_sched_ctxs_CFLAGS = \
  804. $(AM_CFLAGS) -fopenmp
  805. sched_ctx_parallel_tasks_reuse_handle_CFLAGS = \
  806. $(AM_CFLAGS) -fopenmp
  807. endif
  808. if STARPU_HAVE_FC
  809. # Fortran90 example
  810. # - list explicit dependences to control proper module files generation
  811. # - the overriding rule fully disables the corresponing default rule, thus
  812. # the default rule body must be copied entirely
  813. mod_types.mod: mod_types.o
  814. mod_compute.mod: mod_compute.o
  815. mod_interface.mod: mod_interface.o
  816. starpu_mod.mod: starpu_mod.o
  817. starpu_mod.o: $(top_srcdir)/include/starpu_mod.f90
  818. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/starpu_mod.f90
  819. mod_compute.o: $(top_srcdir)/examples/fortran90/mod_compute.f90 mod_types.mod mod_interface.mod starpu_mod.mod
  820. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/mod_compute.f90' || echo '$(srcdir)/'`fortran90/mod_compute.f90
  821. 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
  822. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/f90_example.f90' || echo '$(srcdir)/'`fortran90/f90_example.f90
  823. # Native Fortran example
  824. # - list explicit dependences to control proper module files generation
  825. # - the overriding rule fully disables the corresponing default rule, thus
  826. # the default rule body must be copied entirely
  827. nf_types.mod: nf_types.o
  828. nf_compute.mod: nf_compute.o
  829. fstarpu_mod.mod: fstarpu_mod.o
  830. nf_codelets.mod: nf_codelets.o
  831. fstarpu_mod.o: $(top_srcdir)/include/fstarpu_mod.f90
  832. $(AM_V_FC)$(FC) $(native_fortran_nf_vector_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/fstarpu_mod.f90
  833. nf_codelets.o: $(top_srcdir)/examples/native_fortran/nf_codelets.f90 fstarpu_mod.mod
  834. $(AM_V_FC)$(FC) $(native_fortran_nf_vector_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_codelets.f90' || echo '$(srcdir)/'`native_fortran/nf_codelets.f90
  835. nf_vector.o: $(top_srcdir)/examples/native_fortran/nf_vector.f90 nf_codelets.mod fstarpu_mod.mod
  836. $(AM_V_FC)$(FC) $(native_fortran_nf_vector_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_vector.f90' || echo '$(srcdir)/'`native_fortran/nf_vector.f90
  837. nf_matrix.o: $(top_srcdir)/examples/native_fortran/nf_matrix.f90 nf_codelets.mod fstarpu_mod.mod
  838. $(AM_V_FC)$(FC) $(native_fortran_nf_matrix_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_matrix.f90' || echo '$(srcdir)/'`native_fortran/nf_matrix.f90
  839. nf_compute.o: $(top_srcdir)/examples/native_fortran/nf_compute.f90 nf_types.mod fstarpu_mod.mod
  840. $(AM_V_FC)$(FC) $(native_fortran_nf_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_compute.f90' || echo '$(srcdir)/'`native_fortran/nf_compute.f90
  841. nf_example.o: $(top_srcdir)/examples/native_fortran/nf_example.f90 nf_types.mod nf_compute.mod fstarpu_mod.mod
  842. $(AM_V_FC)$(FC) $(native_fortran_nf_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_example.f90' || echo '$(srcdir)/'`native_fortran/nf_example.f90
  843. endif