Makefile.am 28 KB

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