Makefile.am 28 KB

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