Makefile.am 29 KB

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