Makefile.am 28 KB

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