Makefile.am 27 KB

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