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. MPI = $(MPIEXEC) $(MPIEXEC_ARGS) -np 4
  159. LOADER_BIN2 = $(MPI) $(LOADER_BIN)
  160. else
  161. LOADER_BIN2 = $(LOADER_BIN)
  162. endif
  163. if STARPU_HAVE_AM111
  164. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  165. LOG_COMPILER = $(LOADER_BIN2)
  166. else
  167. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN2)
  168. endif
  169. endif
  170. # STARPU_EXAMPLES list all applications which have to be compiled and checked
  171. # Applications which should only be compiled are added directly in examplebin_PROGRAMS
  172. # see for instance mandelbrot/mandelbrot
  173. STARPU_EXAMPLES =
  174. STARPU_EXAMPLES += \
  175. sched_ctx/prio \
  176. worker_collections/worker_list_example
  177. if !STARPU_SIMGRID
  178. STARPU_EXAMPLES += \
  179. basic_examples/hello_world \
  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. endif
  266. endif
  267. if !STARPU_SIMGRID
  268. if MKL_BLAS_LIB
  269. STARPU_EXAMPLES += \
  270. lu/lu_example_complex_float \
  271. lu/lu_example_complex_double \
  272. lu/lu_implicit_example_complex_float \
  273. lu/lu_implicit_example_complex_double
  274. endif
  275. if ATLAS_BLAS_LIB
  276. STARPU_EXAMPLES += \
  277. spmv/dw_block_spmv
  278. endif
  279. if !STARPU_SIMGRID
  280. if STARPU_HAVE_F77
  281. if STARPU_HAVE_F77_H
  282. STARPU_EXAMPLES += \
  283. fortran/hello
  284. endif
  285. STARPU_EXAMPLES += \
  286. basic_examples/vector_scal_fortran
  287. endif
  288. endif
  289. if STARPU_HAVE_OPENMP
  290. STARPU_EXAMPLES += \
  291. openmp/vector_scal_omp \
  292. sched_ctx/sched_ctx_without_sched_policy\
  293. sched_ctx/nested_sched_ctxs \
  294. sched_ctx/sched_ctx_without_sched_policy_awake\
  295. sched_ctx/parallel_tasks_reuse_handle
  296. # FIXME: does not compile any more due to missing starpu_sched_ctx_book/unbook_workers_for_task
  297. #if STARPU_LONG_CHECK
  298. #STARPU_EXAMPLES += \
  299. # sched_ctx/parallel_code
  300. #endif
  301. if STARPU_HAVE_HWLOC
  302. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  303. STARPU_EXAMPLES += \
  304. sched_ctx/parallel_tasks_with_cluster_api
  305. endif
  306. endif
  307. endif
  308. endif !STARPU_SIMGRID
  309. if STARPU_USE_CUDA
  310. STARPU_EXAMPLES += \
  311. sched_ctx/gpu_partition
  312. sched_ctx_gpu_partition_SOURCES = \
  313. sched_ctx/gpu_partition.c \
  314. sched_ctx/axpy_partition_gpu.cu
  315. endif
  316. ##################
  317. # Basic examples #
  318. ##################
  319. basic_examples_vector_scal_SOURCES = \
  320. basic_examples/vector_scal.c \
  321. basic_examples/vector_scal_cpu.c
  322. if STARPU_HAVE_ICC
  323. if STARPU_CROSS_COMPILING
  324. else
  325. basic_examples_vector_scal_SOURCES += \
  326. basic_examples/vector_scal_cpu_icc.icc
  327. endif
  328. endif
  329. if STARPU_USE_CUDA
  330. basic_examples_vector_scal_SOURCES += \
  331. basic_examples/vector_scal_cuda.cu
  332. endif
  333. if STARPU_USE_OPENCL
  334. basic_examples_vector_scal_SOURCES += \
  335. basic_examples/vector_scal_opencl.c
  336. nobase_STARPU_OPENCL_DATA_DATA += \
  337. basic_examples/vector_scal_opencl_kernel.cl
  338. endif
  339. if STARPU_HAVE_F77
  340. basic_examples_vector_scal_fortran_SOURCES = \
  341. basic_examples/vector_scal_fortran.F \
  342. basic_examples/vector_scal_c.c \
  343. basic_examples/vector_scal_cpu.c
  344. if STARPU_USE_CUDA
  345. basic_examples_vector_scal_fortran_SOURCES += \
  346. basic_examples/vector_scal_cuda.cu
  347. basic_examples_vector_scal_fortran_LDADD = \
  348. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  349. endif
  350. if STARPU_HAVE_F77_H
  351. fortran_hello_SOURCES = \
  352. fortran/hello_c.c \
  353. fortran/hello.F \
  354. fortran/StarPU_fortran.h
  355. endif
  356. endif
  357. if STARPU_HAVE_FC
  358. fortran90_f90_example_SOURCES = \
  359. fortran90/mod_types.f90 \
  360. $(top_srcdir)/include/starpu_mod.f90 \
  361. fortran90/mod_interface.f90 \
  362. fortran90/mod_compute.f90 \
  363. fortran90/marshalling.c \
  364. fortran90/f90_example.f90
  365. native_fortran_nf_vector_SOURCES = \
  366. native_fortran/nf_codelets.f90 \
  367. $(top_srcdir)/include/fstarpu_mod.f90 \
  368. native_fortran/nf_vector.f90
  369. native_fortran_nf_matrix_SOURCES = \
  370. native_fortran/nf_codelets.f90 \
  371. $(top_srcdir)/include/fstarpu_mod.f90 \
  372. native_fortran/nf_matrix.f90
  373. native_fortran_nf_example_SOURCES = \
  374. native_fortran/nf_types.f90 \
  375. native_fortran/nf_compute.f90 \
  376. $(top_srcdir)/include/fstarpu_mod.f90 \
  377. native_fortran/nf_example.f90
  378. native_fortran_nf_dynbuf_SOURCES = \
  379. native_fortran/nf_dynbuf_cl.f90 \
  380. $(top_srcdir)/include/fstarpu_mod.f90 \
  381. native_fortran/nf_dynbuf.f90
  382. native_fortran_nf_varbuf_SOURCES = \
  383. native_fortran/nf_varbuf_cl.f90 \
  384. $(top_srcdir)/include/fstarpu_mod.f90 \
  385. native_fortran/nf_varbuf.f90
  386. native_fortran_nf_sched_ctx_SOURCES = \
  387. native_fortran/nf_sched_ctx_cl.f90 \
  388. $(top_srcdir)/include/fstarpu_mod.f90 \
  389. native_fortran/nf_sched_ctx.f90
  390. native_fortran_nf_partition_SOURCES = \
  391. native_fortran/nf_partition_cl.f90 \
  392. $(top_srcdir)/include/fstarpu_mod.f90 \
  393. native_fortran/nf_partition.f90
  394. endif
  395. #######################
  396. # Multiformat example #
  397. #######################
  398. basic_examples_multiformat_SOURCES = \
  399. basic_examples/multiformat.c \
  400. basic_examples/multiformat_conversion_codelets.c
  401. if STARPU_USE_CUDA
  402. basic_examples_multiformat_SOURCES += \
  403. basic_examples/multiformat_cuda.cu \
  404. basic_examples/multiformat_conversion_codelets_cuda.cu
  405. endif
  406. if STARPU_USE_OPENCL
  407. basic_examples_multiformat_SOURCES += \
  408. basic_examples/multiformat_opencl.c \
  409. basic_examples/multiformat_conversion_codelets_opencl.c
  410. nobase_STARPU_OPENCL_DATA_DATA += \
  411. basic_examples/multiformat_opencl_kernel.cl \
  412. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  413. endif
  414. #################
  415. # block example #
  416. #################
  417. basic_examples_block_SOURCES = \
  418. basic_examples/block.c \
  419. basic_examples/block_cpu.c
  420. if STARPU_USE_CUDA
  421. basic_examples_block_SOURCES += \
  422. basic_examples/block_cuda.cu
  423. endif
  424. if STARPU_USE_OPENCL
  425. basic_examples_block_SOURCES += \
  426. basic_examples/block_opencl.c
  427. nobase_STARPU_OPENCL_DATA_DATA += \
  428. basic_examples/block_opencl_kernel.cl
  429. endif
  430. ####################
  431. # Variable example #
  432. ####################
  433. basic_examples_variable_SOURCES = \
  434. basic_examples/variable.c \
  435. basic_examples/variable_kernels_cpu.c
  436. if STARPU_USE_CUDA
  437. basic_examples_variable_SOURCES += \
  438. basic_examples/variable_kernels.cu
  439. endif
  440. if STARPU_USE_OPENCL
  441. basic_examples_variable_SOURCES += \
  442. basic_examples/variable_kernels_opencl.c
  443. nobase_STARPU_OPENCL_DATA_DATA += \
  444. basic_examples/variable_kernels_opencl_kernel.cl
  445. endif
  446. ###########
  447. # Filters #
  448. ###########
  449. filters_fblock_SOURCES = \
  450. filters/fblock.c \
  451. filters/fblock_cpu.c
  452. if STARPU_USE_CUDA
  453. filters_fblock_SOURCES += \
  454. filters/fblock_cuda.cu
  455. endif
  456. if STARPU_USE_OPENCL
  457. filters_fblock_SOURCES += \
  458. filters/fblock_opencl.c
  459. nobase_STARPU_OPENCL_DATA_DATA += \
  460. filters/fblock_opencl_kernel.cl
  461. endif
  462. filters_fmultiple_manual_SOURCES = \
  463. filters/fmultiple_manual.c
  464. if STARPU_USE_CUDA
  465. filters_fmultiple_manual_SOURCES += \
  466. filters/fmultiple_cuda.cu
  467. endif
  468. filters_fmultiple_submit_SOURCES = \
  469. filters/fmultiple_submit.c
  470. if STARPU_USE_CUDA
  471. filters_fmultiple_submit_SOURCES += \
  472. filters/fmultiple_cuda.cu
  473. endif
  474. filters_fmultiple_submit_readonly_SOURCES = \
  475. filters/fmultiple_submit_readonly.c
  476. if STARPU_USE_CUDA
  477. filters_fmultiple_submit_readonly_SOURCES += \
  478. filters/fmultiple_cuda.cu
  479. endif
  480. examplebin_PROGRAMS += \
  481. filters/shadow \
  482. filters/shadow2d \
  483. filters/shadow3d
  484. #############################
  485. # Custom multiformat filter #
  486. #############################
  487. #TODO: see why the application is failing
  488. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  489. examplebin_PROGRAMS += \
  490. filters/custom_mf/custom_mf_filter
  491. filters_custom_mf_custom_mf_filter_SOURCES=\
  492. filters/custom_mf/custom_mf_filter.c \
  493. filters/custom_mf/custom_interface.c \
  494. filters/custom_mf/custom_conversion_codelets.c
  495. if STARPU_USE_CUDA
  496. filters_custom_mf_custom_mf_filter_SOURCES += \
  497. filters/custom_mf/conversion.cu \
  498. filters/custom_mf/cuda.cu
  499. endif
  500. if STARPU_USE_OPENCL
  501. filters_custom_mf_custom_mf_filter_SOURCES += \
  502. filters/custom_mf/conversion_opencl.c \
  503. filters/custom_mf/custom_opencl.c
  504. nobase_STARPU_OPENCL_DATA_DATA += \
  505. filters/custom_mf/conversion_opencl.cl \
  506. filters/custom_mf/custom_opencl.cl
  507. endif
  508. ################
  509. # AXPY example #
  510. ################
  511. if !NO_BLAS_LIB
  512. axpy_axpy_SOURCES = \
  513. axpy/axpy.c \
  514. common/blas.c
  515. if STARPU_USE_OPENCL
  516. axpy_axpy_SOURCES += \
  517. axpy/axpy_opencl.c
  518. nobase_STARPU_OPENCL_DATA_DATA += \
  519. axpy/axpy_opencl_kernel.cl
  520. endif
  521. axpy_axpy_LDADD = \
  522. $(STARPU_BLAS_LDFLAGS)
  523. endif
  524. ################
  525. # Mult example #
  526. ################
  527. if !NO_BLAS_LIB
  528. mult_sgemm_SOURCES = \
  529. mult/sgemm.c \
  530. common/blas.c
  531. mult_sgemm_LDADD = \
  532. $(STARPU_BLAS_LDFLAGS)
  533. mult_dgemm_SOURCES = \
  534. mult/dgemm.c \
  535. common/blas.c
  536. mult_dgemm_LDADD = \
  537. $(STARPU_BLAS_LDFLAGS)
  538. endif
  539. ####################
  540. # Cholesky example #
  541. ####################
  542. if !NO_BLAS_LIB
  543. cholesky_cholesky_tag_SOURCES = \
  544. cholesky/cholesky_tag.c \
  545. cholesky/cholesky_models.c \
  546. cholesky/cholesky_kernels.c \
  547. common/blas.c
  548. cholesky_cholesky_tag_LDADD = \
  549. $(STARPU_BLAS_LDFLAGS)
  550. cholesky_cholesky_tile_tag_SOURCES = \
  551. cholesky/cholesky_tile_tag.c \
  552. cholesky/cholesky_models.c \
  553. cholesky/cholesky_kernels.c \
  554. common/blas.c
  555. cholesky_cholesky_tile_tag_LDADD = \
  556. $(STARPU_BLAS_LDFLAGS)
  557. cholesky_cholesky_grain_tag_SOURCES = \
  558. cholesky/cholesky_grain_tag.c \
  559. cholesky/cholesky_models.c \
  560. cholesky/cholesky_kernels.c \
  561. common/blas.c
  562. cholesky_cholesky_grain_tag_LDADD = \
  563. $(STARPU_BLAS_LDFLAGS)
  564. cholesky_cholesky_implicit_SOURCES = \
  565. cholesky/cholesky_implicit.c \
  566. cholesky/cholesky_models.c \
  567. cholesky/cholesky_kernels.c \
  568. sched_ctx_utils/sched_ctx_utils.c \
  569. common/blas.c
  570. cholesky_cholesky_implicit_LDADD = \
  571. $(STARPU_BLAS_LDFLAGS)
  572. endif
  573. ##############
  574. # LU example #
  575. ##############
  576. if !NO_BLAS_LIB
  577. lu_lu_example_float_SOURCES = \
  578. lu/lu_example_float.c \
  579. lu/slu.c \
  580. lu/slu_pivot.c \
  581. lu/slu_kernels.c \
  582. common/blas.c
  583. lu_lu_example_float_LDADD = \
  584. $(STARPU_BLAS_LDFLAGS)
  585. lu_lu_example_double_SOURCES = \
  586. lu/lu_example_double.c \
  587. lu/dlu.c \
  588. lu/dlu_pivot.c \
  589. lu/dlu_kernels.c \
  590. common/blas.c
  591. lu_lu_example_double_LDADD = \
  592. $(STARPU_BLAS_LDFLAGS)
  593. lu_lu_implicit_example_float_SOURCES = \
  594. lu/lu_example_float.c \
  595. lu/slu_implicit.c \
  596. lu/slu_implicit_pivot.c \
  597. lu/slu_kernels.c \
  598. common/blas.c
  599. lu_lu_implicit_example_float_LDADD = \
  600. $(STARPU_BLAS_LDFLAGS)
  601. lu_lu_implicit_example_double_SOURCES = \
  602. lu/lu_example_double.c \
  603. lu/dlu_implicit.c \
  604. lu/dlu_implicit_pivot.c \
  605. lu/dlu_kernels.c \
  606. common/blas.c
  607. lu_lu_implicit_example_double_LDADD = \
  608. $(STARPU_BLAS_LDFLAGS)
  609. if MKL_BLAS_LIB
  610. lu_lu_example_complex_float_SOURCES = \
  611. lu/lu_example_complex_float.c \
  612. lu/clu.c \
  613. lu/clu_pivot.c \
  614. lu/clu_kernels.c \
  615. lu/blas_complex.c \
  616. common/blas.c
  617. lu_lu_example_complex_float_LDADD = \
  618. $(STARPU_BLAS_LDFLAGS)
  619. lu_lu_implicit_example_complex_float_SOURCES = \
  620. lu/lu_example_complex_float.c \
  621. lu/clu_implicit.c \
  622. lu/clu_implicit_pivot.c \
  623. lu/clu_kernels.c \
  624. lu/blas_complex.c \
  625. common/blas.c
  626. lu_lu_implicit_example_complex_float_LDADD = \
  627. $(STARPU_BLAS_LDFLAGS)
  628. lu_lu_example_complex_double_SOURCES = \
  629. lu/lu_example_complex_double.c \
  630. lu/zlu.c \
  631. lu/zlu_pivot.c \
  632. lu/zlu_kernels.c \
  633. lu/blas_complex.c \
  634. common/blas.c
  635. lu_lu_example_complex_double_LDADD = \
  636. $(STARPU_BLAS_LDFLAGS)
  637. lu_lu_implicit_example_complex_double_SOURCES = \
  638. lu/lu_example_complex_double.c \
  639. lu/zlu_implicit.c \
  640. lu/zlu_implicit_pivot.c \
  641. lu/zlu_kernels.c \
  642. lu/blas_complex.c \
  643. common/blas.c
  644. lu_lu_implicit_example_complex_double_LDADD = \
  645. $(STARPU_BLAS_LDFLAGS)
  646. endif
  647. endif
  648. ################
  649. # Heat example #
  650. ################
  651. if !NO_BLAS_LIB
  652. heat_heat_SOURCES = \
  653. heat/heat.c \
  654. heat/dw_factolu.c \
  655. heat/dw_factolu_tag.c \
  656. heat/dw_factolu_grain.c \
  657. heat/dw_sparse_cg.c \
  658. heat/heat_display.c \
  659. heat/lu_kernels_model.c \
  660. heat/dw_sparse_cg_kernels.c \
  661. heat/dw_factolu_kernels.c \
  662. common/blas.c
  663. heat_heat_LDADD = \
  664. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  665. $(STARPU_BLAS_LDFLAGS)
  666. endif
  667. ##############
  668. # CG example #
  669. ##############
  670. if !NO_BLAS_LIB
  671. cg_cg_SOURCES = \
  672. cg/cg.c \
  673. cg/cg_kernels.c \
  674. common/blas.c
  675. if STARPU_USE_CUDA
  676. cg_cg_SOURCES += \
  677. cg/cg_dot_kernel.cu
  678. endif
  679. cg_cg_LDADD = \
  680. $(STARPU_BLAS_LDFLAGS)
  681. endif
  682. ################
  683. # SPMD example #
  684. ################
  685. spmd_vector_scal_spmd_SOURCES = \
  686. spmd/vector_scal_spmd.c
  687. ################
  688. # SpMV example #
  689. ################
  690. spmv_spmv_SOURCES = \
  691. spmv/spmv.c \
  692. spmv/spmv_kernels.c
  693. if STARPU_USE_CUDA
  694. spmv_spmv_SOURCES += \
  695. spmv/spmv_cuda.cu
  696. endif
  697. if ATLAS_BLAS_LIB
  698. spmv_dw_block_spmv_SOURCES = \
  699. spmv/dw_block_spmv.c \
  700. spmv/dw_block_spmv_kernels.c \
  701. spmv/matrix_market/mm_to_bcsr.c \
  702. spmv/matrix_market/mmio.c
  703. spmv_dw_block_spmv_LDADD = \
  704. $(STARPU_BLAS_LDFLAGS)
  705. endif
  706. ###########################
  707. # C++ Incrementer example #
  708. ###########################
  709. cpp_incrementer_cpp_SOURCES = \
  710. cpp/incrementer_cpp.cpp
  711. if STARPU_USE_CUDA
  712. cpp_incrementer_cpp_SOURCES += \
  713. incrementer/incrementer_kernels.cu
  714. endif
  715. if STARPU_USE_OPENCL
  716. cpp_incrementer_cpp_SOURCES += \
  717. incrementer/incrementer_kernels_opencl.c
  718. endif
  719. ###########################
  720. # C++ Add vectors example #
  721. ###########################
  722. cpp_add_vectors_SOURCES = \
  723. cpp/add_vectors.cpp
  724. if STARPU_HAVE_CXX11
  725. cpp_add_vectors_cpp11_SOURCES = \
  726. cpp/add_vectors_cpp11.cpp
  727. endif
  728. #######################
  729. # Incrementer example #
  730. #######################
  731. incrementer_incrementer_SOURCES = \
  732. incrementer/incrementer.c
  733. if STARPU_USE_CUDA
  734. incrementer_incrementer_SOURCES += \
  735. incrementer/incrementer_kernels.cu
  736. endif
  737. if STARPU_USE_OPENCL
  738. incrementer_incrementer_SOURCES += \
  739. incrementer/incrementer_kernels_opencl.c
  740. nobase_STARPU_OPENCL_DATA_DATA += \
  741. incrementer/incrementer_kernels_opencl_kernel.cl
  742. endif
  743. ##################
  744. # Binary example #
  745. ##################
  746. binary_binary_SOURCES = \
  747. binary/binary.c
  748. if STARPU_USE_OPENCL
  749. binary_binary_SOURCES += \
  750. incrementer/incrementer_kernels_opencl.c
  751. endif
  752. #####################
  753. # interface example #
  754. #####################
  755. interface_complex_SOURCES = \
  756. interface/complex.c \
  757. interface/complex_interface.c
  758. if STARPU_USE_CUDA
  759. interface_complex_SOURCES += \
  760. interface/complex_kernels.cu
  761. endif
  762. if STARPU_USE_OPENCL
  763. interface_complex_SOURCES +=\
  764. interface/complex_kernels_opencl.c
  765. nobase_STARPU_OPENCL_DATA_DATA += \
  766. interface/complex_kernels.cl
  767. endif
  768. ######################
  769. # matVecMult example #
  770. ######################
  771. if STARPU_USE_OPENCL
  772. nobase_STARPU_OPENCL_DATA_DATA += \
  773. matvecmult/matvecmult_kernel.cl
  774. endif
  775. #######################
  776. # dot_product example #
  777. #######################
  778. reductions_dot_product_SOURCES = \
  779. reductions/dot_product.c
  780. if STARPU_USE_CUDA
  781. reductions_dot_product_SOURCES += \
  782. reductions/dot_product_kernels.cu
  783. endif
  784. if STARPU_USE_OPENCL
  785. nobase_STARPU_OPENCL_DATA_DATA += \
  786. reductions/dot_product_opencl_kernels.cl
  787. endif
  788. ##################
  789. # Mandelbrot Set #
  790. ##################
  791. examplebin_PROGRAMS += \
  792. mandelbrot/mandelbrot
  793. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  794. if HAVE_X11
  795. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  796. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
  797. endif
  798. ####################
  799. # Image downscaler #
  800. ####################
  801. examplebin_PROGRAMS += \
  802. ppm_downscaler/ppm_downscaler \
  803. ppm_downscaler/yuv_downscaler
  804. ################
  805. # Top Examples #
  806. ################
  807. examplebin_PROGRAMS += \
  808. top/hello_world_top
  809. top_hello_world_top_SOURCES = \
  810. top/hello_world_top.c
  811. ######
  812. # Pi #
  813. ######
  814. if !STARPU_HAVE_WINDOWS
  815. examplebin_PROGRAMS += \
  816. pi/pi \
  817. pi/pi_redux
  818. pi_pi_SOURCES = \
  819. pi/pi.c \
  820. pi/SobolQRNG/sobol_gold.c \
  821. pi/SobolQRNG/sobol_primitives.c
  822. if STARPU_USE_CUDA
  823. pi_pi_SOURCES += \
  824. pi/pi_kernel.cu \
  825. pi/SobolQRNG/sobol_gpu.cu
  826. endif
  827. pi_pi_redux_SOURCES = \
  828. pi/pi_redux.c
  829. if STARPU_USE_CUDA
  830. pi_pi_redux_SOURCES += \
  831. pi/pi_redux_kernel.cu
  832. pi_pi_redux_LDADD = \
  833. $(STARPU_CURAND_LDFLAGS)
  834. endif
  835. endif
  836. ###########################
  837. # OpenGL interoperability #
  838. ###########################
  839. if HAVE_OPENGL
  840. examplebin_PROGRAMS += \
  841. gl_interop/gl_interop \
  842. gl_interop/gl_interop_idle
  843. gl_interop_gl_interop_SOURCES = \
  844. gl_interop/gl_interop.c
  845. gl_interop_gl_interop_LDADD = \
  846. $(STARPU_OPENGL_RENDER_LDFLAGS)
  847. gl_interop_gl_interop_idle_SOURCES = \
  848. gl_interop/gl_interop_idle.c
  849. gl_interop_gl_interop_idle_LDADD = \
  850. $(STARPU_OPENGL_RENDER_LDFLAGS)
  851. endif
  852. ####################
  853. # pipeline example #
  854. ####################
  855. if !NO_BLAS_LIB
  856. pipeline_pipeline_SOURCES = \
  857. pipeline/pipeline.c \
  858. common/blas.c
  859. pipeline_pipeline_LDADD = \
  860. $(STARPU_BLAS_LDFLAGS)
  861. endif
  862. ##################
  863. # openmp example #
  864. ##################
  865. if STARPU_HAVE_OPENMP
  866. openmp_vector_scal_omp_CFLAGS = \
  867. $(AM_CFLAGS) -fopenmp
  868. sched_ctx_parallel_code_CFLAGS = \
  869. $(AM_CFLAGS) -fopenmp
  870. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  871. $(AM_CFLAGS) -fopenmp
  872. sched_ctx_nested_sched_ctxs_CFLAGS = \
  873. $(AM_CFLAGS) -fopenmp
  874. sched_ctx_parallel_tasks_reuse_handle_CFLAGS = \
  875. $(AM_CFLAGS) -fopenmp
  876. endif
  877. if STARPU_HAVE_FC
  878. # Fortran90 example
  879. # - list explicit dependences to control proper module files generation
  880. # - the overriding rule fully disables the corresponing default rule, thus
  881. # the default rule body must be copied entirely
  882. mod_types.mod: mod_types.o
  883. mod_compute.mod: mod_compute.o
  884. mod_interface.mod: mod_interface.o
  885. starpu_mod.mod: starpu_mod.o
  886. starpu_mod.o: $(top_srcdir)/include/starpu_mod.f90
  887. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/starpu_mod.f90
  888. mod_compute.o: $(top_srcdir)/examples/fortran90/mod_compute.f90 mod_types.mod mod_interface.mod starpu_mod.mod
  889. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/mod_compute.f90' || echo '$(srcdir)/'`fortran90/mod_compute.f90
  890. 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
  891. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/f90_example.f90' || echo '$(srcdir)/'`fortran90/f90_example.f90
  892. # Native Fortran example
  893. # - list explicit dependences to control proper module files generation
  894. # - the overriding rule fully disables the corresponing default rule, thus
  895. # the default rule body must be copied entirely
  896. nf_types.mod: nf_types.o
  897. nf_compute.mod: nf_compute.o
  898. fstarpu_mod.mod: fstarpu_mod.o
  899. nf_codelets.mod: nf_codelets.o
  900. nf_dynbuf_cl.mod: nf_dynbuf_cl.o
  901. nf_varbuf_cl.mod: nf_varbuf_cl.o
  902. nf_sched_ctx_cl.mod: nf_sched_ctx_cl.o
  903. nf_partition_cl.mod: nf_partition_cl.o
  904. fstarpu_mod.o: $(top_srcdir)/include/fstarpu_mod.f90
  905. $(AM_V_FC)$(FC) $(native_fortran_nf_vector_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/fstarpu_mod.f90
  906. nf_codelets.o: $(top_srcdir)/examples/native_fortran/nf_codelets.f90 fstarpu_mod.mod
  907. $(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
  908. nf_vector.o: $(top_srcdir)/examples/native_fortran/nf_vector.f90 nf_codelets.mod fstarpu_mod.mod
  909. $(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
  910. nf_matrix.o: $(top_srcdir)/examples/native_fortran/nf_matrix.f90 nf_codelets.mod fstarpu_mod.mod
  911. $(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
  912. nf_compute.o: $(top_srcdir)/examples/native_fortran/nf_compute.f90 nf_types.mod fstarpu_mod.mod
  913. $(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
  914. nf_example.o: $(top_srcdir)/examples/native_fortran/nf_example.f90 nf_types.mod nf_compute.mod fstarpu_mod.mod
  915. $(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
  916. nf_dynbuf_cl.o: $(top_srcdir)/examples/native_fortran/nf_dynbuf_cl.f90 nf_types.mod fstarpu_mod.mod
  917. $(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
  918. nf_dynbuf.o: $(top_srcdir)/examples/native_fortran/nf_dynbuf.f90 nf_types.mod nf_dynbuf_cl.mod fstarpu_mod.mod
  919. $(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
  920. nf_varbuf_cl.o: $(top_srcdir)/examples/native_fortran/nf_varbuf_cl.f90 nf_types.mod fstarpu_mod.mod
  921. $(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
  922. nf_varbuf.o: $(top_srcdir)/examples/native_fortran/nf_varbuf.f90 nf_types.mod nf_varbuf_cl.mod fstarpu_mod.mod
  923. $(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
  924. nf_sched_ctx_cl.o: $(top_srcdir)/examples/native_fortran/nf_sched_ctx_cl.f90 nf_types.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_cl.f90' || echo '$(srcdir)/'`native_fortran/nf_sched_ctx_cl.f90
  926. nf_sched_ctx.o: $(top_srcdir)/examples/native_fortran/nf_sched_ctx.f90 nf_types.mod nf_sched_ctx_cl.mod fstarpu_mod.mod
  927. $(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
  928. nf_partition_cl.o: $(top_srcdir)/examples/native_fortran/nf_partition_cl.f90 nf_types.mod fstarpu_mod.mod
  929. $(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
  930. nf_partition.o: $(top_srcdir)/examples/native_fortran/nf_partition.f90 nf_types.mod nf_partition_cl.mod fstarpu_mod.mod
  931. $(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
  932. endif