Makefile.am 25 KB

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