Makefile.am 29 KB

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