Makefile.am 26 KB

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