Makefile.am 29 KB

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