Makefile.am 28 KB

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