Makefile.am 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997
  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. 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. lu/xlu.c \
  45. lu/xlu_pivot.c \
  46. lu/xlu_implicit.c \
  47. lu/xlu_implicit_pivot.c \
  48. lu/xlu_kernels.c \
  49. lu/lu_example.c \
  50. incrementer/incrementer_kernels_opencl_kernel.cl \
  51. basic_examples/variable_kernels_opencl_kernel.cl \
  52. matvecmult/matvecmult_kernel.cl \
  53. basic_examples/block_opencl_kernel.cl \
  54. filters/fblock_opencl_kernel.cl \
  55. filters/custom_mf/conversion_opencl.cl \
  56. filters/custom_mf/custom_opencl.cl \
  57. filters/custom_mf/custom_types.h \
  58. interface/complex_kernels.cl \
  59. reductions/dot_product.h \
  60. reductions/dot_product_opencl_kernels.cl \
  61. scheduler/schedulers.sh \
  62. scheduler/schedulers_context.sh
  63. CLEANFILES = *.gcno *.gcda *.linkinfo *.mod starpu_idle_microsec.log
  64. if STARPU_USE_CUDA
  65. if STARPU_COVERITY
  66. include $(top_srcdir)/starpu-mynvcc.mk
  67. else
  68. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/ $(HWLOC_CFLAGS)
  69. .cu.o:
  70. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  71. endif
  72. endif
  73. if STARPU_HAVE_ICC
  74. .icc.o:
  75. $(ICC) -x c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
  76. $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $< -c -o $@
  77. endif
  78. examplebindir = $(libdir)/starpu/examples/
  79. examplebin_PROGRAMS =
  80. noinst_HEADERS = \
  81. axpy/axpy.h \
  82. cg/cg.h \
  83. heat/lu_kernels_model.h \
  84. heat/dw_sparse_cg.h \
  85. heat/heat.h \
  86. heat/dw_factolu.h \
  87. lu/xlu.h \
  88. lu/xlu_kernels.h \
  89. lu/lu-float.h \
  90. lu/lu-double.h \
  91. lu/complex_float.h \
  92. lu/complex_double.h \
  93. lu/blas_complex.h \
  94. cholesky/cholesky.h \
  95. sched_ctx_utils/sched_ctx_utils.h \
  96. common/blas_model.h \
  97. common/blas.h \
  98. mult/simple.h \
  99. mult/double.h \
  100. fortran/StarPU_fortran.h \
  101. ppm_downscaler/ppm_downscaler.h \
  102. ppm_downscaler/yuv_downscaler.h \
  103. spmv/matrix_market/mmio.h \
  104. spmv/matrix_market/mm_to_bcsr.h \
  105. spmv/spmv.h \
  106. spmv/dw_block_spmv.h \
  107. basic_examples/multiformat_types.h \
  108. filters/custom_mf/custom_interface.h \
  109. filters/custom_mf/custom_types.h \
  110. interface/complex_interface.h \
  111. interface/complex_codelet.h \
  112. pi/pi.h \
  113. pi/SobolQRNG/sobol.h \
  114. pi/SobolQRNG/sobol_gold.h \
  115. pi/SobolQRNG/sobol_gpu.h \
  116. pi/SobolQRNG/sobol_primitives.h \
  117. reductions/dot_product.h \
  118. basic_examples/vector_scal_cpu_template.h
  119. #####################################
  120. # What to install and what to check #
  121. #####################################
  122. examplebin_PROGRAMS += $(STARPU_EXAMPLES)
  123. TESTS = $(STARPU_EXAMPLES)
  124. if STARPU_NEW_CHECK
  125. TESTS += scheduler/schedulers.sh
  126. TESTS += scheduler/schedulers_context.sh
  127. endif
  128. if STARPU_HAVE_WINDOWS
  129. check_PROGRAMS = $(STARPU_EXAMPLES)
  130. else
  131. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  132. endif
  133. if !STARPU_HAVE_WINDOWS
  134. ## test loader program
  135. if !STARPU_CROSS_COMPILING
  136. LOADER = loader
  137. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  138. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  139. loader_SOURCES = ../tests/loader.c
  140. else
  141. LOADER =
  142. LOADER_BIN = $(top_builddir)/examples/loader-cross.sh
  143. endif
  144. if STARPU_HAVE_AM111
  145. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  146. LOG_COMPILER = $(LOADER_BIN)
  147. else
  148. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  149. endif
  150. endif
  151. # STARPU_EXAMPLES list all applications which have to be compiled and checked
  152. # Applications which should only be compiled are added directly in examplebin_PROGRAMS
  153. # see for instance mandelbrot/mandelbrot
  154. STARPU_EXAMPLES = \
  155. basic_examples/hello_world \
  156. basic_examples/vector_scal \
  157. basic_examples/mult \
  158. basic_examples/block \
  159. basic_examples/variable \
  160. basic_examples/multiformat \
  161. basic_examples/dynamic_handles \
  162. cpp/incrementer_cpp \
  163. filters/fvector \
  164. filters/fblock \
  165. filters/fmatrix \
  166. filters/fmultiple_manual \
  167. filters/fmultiple_submit \
  168. filters/fmultiple_submit_readonly \
  169. tag_example/tag_example \
  170. tag_example/tag_example2 \
  171. tag_example/tag_example3 \
  172. tag_example/tag_example4 \
  173. tag_example/tag_restartable \
  174. spmd/vector_scal_spmd \
  175. spmv/spmv \
  176. callback/callback \
  177. callback/prologue \
  178. incrementer/incrementer \
  179. binary/binary \
  180. interface/complex \
  181. matvecmult/matvecmult \
  182. profiling/profiling \
  183. scheduler/dummy_sched \
  184. scheduler/heteroprio_test \
  185. sched_ctx/sched_ctx \
  186. sched_ctx/prio \
  187. sched_ctx/dummy_sched_with_ctx \
  188. worker_collections/worker_tree_example \
  189. worker_collections/worker_list_example \
  190. reductions/dot_product \
  191. reductions/minmax_reduction
  192. if !STARPU_SIMGRID
  193. STARPU_EXAMPLES += \
  194. scheduler/dummy_sched
  195. if STARPU_HAVE_F77_H
  196. STARPU_EXAMPLES += \
  197. basic_examples/vector_scal_fortran \
  198. fortran/hello
  199. endif
  200. if STARPU_HAVE_FC
  201. if !STARPU_SANITIZE
  202. STARPU_EXAMPLES += \
  203. fortran90/f90_example \
  204. native_fortran/native_fortran_example
  205. endif
  206. endif
  207. endif
  208. if !NO_BLAS_LIB
  209. STARPU_EXAMPLES += \
  210. axpy/axpy \
  211. mult/sgemm \
  212. mult/dgemm \
  213. cholesky/cholesky_tag \
  214. cholesky/cholesky_tile_tag \
  215. cholesky/cholesky_grain_tag \
  216. cholesky/cholesky_implicit \
  217. lu/lu_example_float \
  218. lu/lu_example_double \
  219. lu/lu_implicit_example_float \
  220. lu/lu_implicit_example_double \
  221. heat/heat \
  222. cg/cg \
  223. pipeline/pipeline
  224. endif
  225. if MKL_BLAS_LIB
  226. STARPU_EXAMPLES += \
  227. lu/lu_example_complex_float \
  228. lu/lu_example_complex_double \
  229. lu/lu_implicit_example_complex_float \
  230. lu/lu_implicit_example_complex_double
  231. endif
  232. if ATLAS_BLAS_LIB
  233. STARPU_EXAMPLES += \
  234. spmv/dw_block_spmv
  235. endif
  236. if !STARPU_SIMGRID
  237. if STARPU_HAVE_F77_H
  238. STARPU_EXAMPLES += \
  239. basic_examples/vector_scal_fortran \
  240. fortran/hello
  241. endif
  242. endif
  243. if STARPU_HAVE_OPENMP
  244. STARPU_EXAMPLES += \
  245. openmp/vector_scal_omp \
  246. sched_ctx/sched_ctx_without_sched_policy\
  247. sched_ctx/nested_sched_ctxs \
  248. sched_ctx/sched_ctx_without_sched_policy_awake\
  249. sched_ctx/parallel_tasks_reuse_handle
  250. if STARPU_LONG_CHECK
  251. STARPU_EXAMPLES += \
  252. sched_ctx/parallel_code
  253. endif
  254. if STARPU_HAVE_HWLOC
  255. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  256. STARPU_EXAMPLES += \
  257. sched_ctx/parallel_tasks_with_cluster_api
  258. endif
  259. endif
  260. endif
  261. ##################
  262. # Basic examples #
  263. ##################
  264. basic_examples_vector_scal_SOURCES = \
  265. basic_examples/vector_scal.c \
  266. basic_examples/vector_scal_cpu.c
  267. if STARPU_HAVE_ICC
  268. if STARPU_CROSS_COMPILING
  269. else
  270. basic_examples_vector_scal_SOURCES += \
  271. basic_examples/vector_scal_cpu_icc.icc
  272. endif
  273. endif
  274. if STARPU_USE_CUDA
  275. basic_examples_vector_scal_SOURCES += \
  276. basic_examples/vector_scal_cuda.cu
  277. endif
  278. if STARPU_USE_OPENCL
  279. basic_examples_vector_scal_SOURCES += \
  280. basic_examples/vector_scal_opencl.c
  281. nobase_STARPU_OPENCL_DATA_DATA += \
  282. basic_examples/vector_scal_opencl_kernel.cl
  283. endif
  284. if STARPU_HAVE_F77_H
  285. basic_examples_vector_scal_fortran_SOURCES = \
  286. basic_examples/vector_scal_fortran.F \
  287. basic_examples/vector_scal_c.c \
  288. basic_examples/vector_scal_cpu.c
  289. if STARPU_USE_CUDA
  290. basic_examples_vector_scal_fortran_SOURCES += \
  291. basic_examples/vector_scal_cuda.cu
  292. basic_examples_vector_scal_fortran_LDADD = \
  293. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  294. endif
  295. fortran_hello_SOURCES = \
  296. fortran/hello_c.c \
  297. fortran/hello.F \
  298. fortran/StarPU_fortran.h
  299. endif
  300. if STARPU_HAVE_FC
  301. fortran90_f90_example_SOURCES = \
  302. fortran90/mod_types.f90 \
  303. $(top_srcdir)/include/starpu_mod.f90 \
  304. fortran90/mod_interface.f90 \
  305. fortran90/mod_compute.f90 \
  306. fortran90/marshalling.c \
  307. fortran90/f90_example.f90
  308. native_fortran_native_fortran_example_SOURCES = \
  309. native_fortran/codelets.f90 \
  310. $(top_srcdir)/include/fstarpu_mod.f90 \
  311. native_fortran/native_fortran_example.f90
  312. endif
  313. #######################
  314. # Multiformat example #
  315. #######################
  316. basic_examples_multiformat_SOURCES = \
  317. basic_examples/multiformat.c \
  318. basic_examples/multiformat_conversion_codelets.c
  319. if STARPU_USE_CUDA
  320. basic_examples_multiformat_SOURCES += \
  321. basic_examples/multiformat_cuda.cu \
  322. basic_examples/multiformat_conversion_codelets_cuda.cu
  323. endif
  324. if STARPU_USE_OPENCL
  325. basic_examples_multiformat_SOURCES += \
  326. basic_examples/multiformat_opencl.c \
  327. basic_examples/multiformat_conversion_codelets_opencl.c
  328. nobase_STARPU_OPENCL_DATA_DATA += \
  329. basic_examples/multiformat_opencl_kernel.cl \
  330. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  331. endif
  332. #################
  333. # block example #
  334. #################
  335. basic_examples_block_SOURCES = \
  336. basic_examples/block.c \
  337. basic_examples/block_cpu.c
  338. if STARPU_USE_CUDA
  339. basic_examples_block_SOURCES += \
  340. basic_examples/block_cuda.cu
  341. endif
  342. if STARPU_USE_OPENCL
  343. basic_examples_block_SOURCES += \
  344. basic_examples/block_opencl.c
  345. nobase_STARPU_OPENCL_DATA_DATA += \
  346. basic_examples/block_opencl_kernel.cl
  347. endif
  348. ####################
  349. # Variable example #
  350. ####################
  351. basic_examples_variable_SOURCES = \
  352. basic_examples/variable.c \
  353. basic_examples/variable_kernels_cpu.c
  354. if STARPU_USE_CUDA
  355. basic_examples_variable_SOURCES += \
  356. basic_examples/variable_kernels.cu
  357. endif
  358. if STARPU_USE_OPENCL
  359. basic_examples_variable_SOURCES += \
  360. basic_examples/variable_kernels_opencl.c
  361. nobase_STARPU_OPENCL_DATA_DATA += \
  362. basic_examples/variable_kernels_opencl_kernel.cl
  363. endif
  364. ###########
  365. # Filters #
  366. ###########
  367. filters_fblock_SOURCES = \
  368. filters/fblock.c \
  369. filters/fblock_cpu.c
  370. if STARPU_USE_CUDA
  371. filters_fblock_SOURCES += \
  372. filters/fblock_cuda.cu
  373. endif
  374. if STARPU_USE_OPENCL
  375. filters_fblock_SOURCES += \
  376. filters/fblock_opencl.c
  377. nobase_STARPU_OPENCL_DATA_DATA += \
  378. filters/fblock_opencl_kernel.cl
  379. endif
  380. filters_fmultiple_manual_SOURCES = \
  381. filters/fmultiple_manual.c
  382. if STARPU_USE_CUDA
  383. filters_fmultiple_manual_SOURCES += \
  384. filters/fmultiple_cuda.cu
  385. endif
  386. filters_fmultiple_submit_SOURCES = \
  387. filters/fmultiple_submit.c
  388. if STARPU_USE_CUDA
  389. filters_fmultiple_submit_SOURCES += \
  390. filters/fmultiple_cuda.cu
  391. endif
  392. filters_fmultiple_submit_readonly_SOURCES = \
  393. filters/fmultiple_submit_readonly.c
  394. if STARPU_USE_CUDA
  395. filters_fmultiple_submit_readonly_SOURCES += \
  396. filters/fmultiple_cuda.cu
  397. endif
  398. examplebin_PROGRAMS += \
  399. filters/shadow \
  400. filters/shadow2d \
  401. filters/shadow3d
  402. #############################
  403. # Custom multiformat filter #
  404. #############################
  405. #TODO: see why the application is failing
  406. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  407. examplebin_PROGRAMS += \
  408. filters/custom_mf/custom_mf_filter
  409. filters_custom_mf_custom_mf_filter_SOURCES=\
  410. filters/custom_mf/custom_mf_filter.c \
  411. filters/custom_mf/custom_interface.c \
  412. filters/custom_mf/custom_conversion_codelets.c
  413. if STARPU_USE_CUDA
  414. filters_custom_mf_custom_mf_filter_SOURCES += \
  415. filters/custom_mf/conversion.cu \
  416. filters/custom_mf/cuda.cu
  417. endif
  418. if STARPU_USE_OPENCL
  419. filters_custom_mf_custom_mf_filter_SOURCES += \
  420. filters/custom_mf/conversion_opencl.c \
  421. filters/custom_mf/custom_opencl.c
  422. nobase_STARPU_OPENCL_DATA_DATA += \
  423. filters/custom_mf/conversion_opencl.cl \
  424. filters/custom_mf/custom_opencl.cl
  425. endif
  426. ################
  427. # AXPY example #
  428. ################
  429. if !NO_BLAS_LIB
  430. axpy_axpy_SOURCES = \
  431. axpy/axpy.c \
  432. common/blas.c
  433. if STARPU_USE_OPENCL
  434. axpy_axpy_SOURCES += \
  435. axpy/axpy_opencl.c
  436. nobase_STARPU_OPENCL_DATA_DATA += \
  437. axpy/axpy_opencl_kernel.cl
  438. endif
  439. axpy_axpy_LDADD = \
  440. $(STARPU_BLAS_LDFLAGS)
  441. endif
  442. ################
  443. # Mult example #
  444. ################
  445. if !NO_BLAS_LIB
  446. mult_sgemm_SOURCES = \
  447. mult/sgemm.c \
  448. common/blas.c
  449. mult_sgemm_LDADD = \
  450. $(STARPU_BLAS_LDFLAGS)
  451. mult_dgemm_SOURCES = \
  452. mult/dgemm.c \
  453. common/blas.c
  454. mult_dgemm_LDADD = \
  455. $(STARPU_BLAS_LDFLAGS)
  456. endif
  457. ####################
  458. # Cholesky example #
  459. ####################
  460. if !NO_BLAS_LIB
  461. cholesky_cholesky_tag_SOURCES = \
  462. cholesky/cholesky_tag.c \
  463. cholesky/cholesky_models.c \
  464. cholesky/cholesky_kernels.c \
  465. common/blas.c
  466. cholesky_cholesky_tag_LDADD = \
  467. $(STARPU_BLAS_LDFLAGS)
  468. cholesky_cholesky_tile_tag_SOURCES = \
  469. cholesky/cholesky_tile_tag.c \
  470. cholesky/cholesky_models.c \
  471. cholesky/cholesky_kernels.c \
  472. common/blas.c
  473. cholesky_cholesky_tile_tag_LDADD = \
  474. $(STARPU_BLAS_LDFLAGS)
  475. cholesky_cholesky_grain_tag_SOURCES = \
  476. cholesky/cholesky_grain_tag.c \
  477. cholesky/cholesky_models.c \
  478. cholesky/cholesky_kernels.c \
  479. common/blas.c
  480. cholesky_cholesky_grain_tag_LDADD = \
  481. $(STARPU_BLAS_LDFLAGS)
  482. cholesky_cholesky_implicit_SOURCES = \
  483. cholesky/cholesky_implicit.c \
  484. cholesky/cholesky_models.c \
  485. cholesky/cholesky_kernels.c \
  486. sched_ctx_utils/sched_ctx_utils.c \
  487. common/blas.c
  488. cholesky_cholesky_implicit_LDADD = \
  489. $(STARPU_BLAS_LDFLAGS)
  490. endif
  491. ##############
  492. # LU example #
  493. ##############
  494. if !NO_BLAS_LIB
  495. lu_lu_example_float_SOURCES = \
  496. lu/lu_example_float.c \
  497. lu/slu.c \
  498. lu/slu_pivot.c \
  499. lu/slu_kernels.c \
  500. common/blas.c
  501. lu_lu_example_float_LDADD = \
  502. $(STARPU_BLAS_LDFLAGS)
  503. lu_lu_example_double_SOURCES = \
  504. lu/lu_example_double.c \
  505. lu/dlu.c \
  506. lu/dlu_pivot.c \
  507. lu/dlu_kernels.c \
  508. common/blas.c
  509. lu_lu_example_double_LDADD = \
  510. $(STARPU_BLAS_LDFLAGS)
  511. lu_lu_implicit_example_float_SOURCES = \
  512. lu/lu_example_float.c \
  513. lu/slu_implicit.c \
  514. lu/slu_implicit_pivot.c \
  515. lu/slu_kernels.c \
  516. common/blas.c
  517. lu_lu_implicit_example_float_LDADD = \
  518. $(STARPU_BLAS_LDFLAGS)
  519. lu_lu_implicit_example_double_SOURCES = \
  520. lu/lu_example_double.c \
  521. lu/dlu_implicit.c \
  522. lu/dlu_implicit_pivot.c \
  523. lu/dlu_kernels.c \
  524. common/blas.c
  525. lu_lu_implicit_example_double_LDADD = \
  526. $(STARPU_BLAS_LDFLAGS)
  527. if MKL_BLAS_LIB
  528. lu_lu_example_complex_float_SOURCES = \
  529. lu/lu_example_complex_float.c \
  530. lu/clu.c \
  531. lu/clu_pivot.c \
  532. lu/clu_kernels.c \
  533. lu/blas_complex.c \
  534. common/blas.c
  535. lu_lu_example_complex_float_LDADD = \
  536. $(STARPU_BLAS_LDFLAGS)
  537. lu_lu_implicit_example_complex_float_SOURCES = \
  538. lu/lu_example_complex_float.c \
  539. lu/clu_implicit.c \
  540. lu/clu_implicit_pivot.c \
  541. lu/clu_kernels.c \
  542. lu/blas_complex.c \
  543. common/blas.c
  544. lu_lu_implicit_example_complex_float_LDADD = \
  545. $(STARPU_BLAS_LDFLAGS)
  546. lu_lu_example_complex_double_SOURCES = \
  547. lu/lu_example_complex_double.c \
  548. lu/zlu.c \
  549. lu/zlu_pivot.c \
  550. lu/zlu_kernels.c \
  551. lu/blas_complex.c \
  552. common/blas.c
  553. lu_lu_example_complex_double_LDADD = \
  554. $(STARPU_BLAS_LDFLAGS)
  555. lu_lu_implicit_example_complex_double_SOURCES = \
  556. lu/lu_example_complex_double.c \
  557. lu/zlu_implicit.c \
  558. lu/zlu_implicit_pivot.c \
  559. lu/zlu_kernels.c \
  560. lu/blas_complex.c \
  561. common/blas.c
  562. lu_lu_implicit_example_complex_double_LDADD = \
  563. $(STARPU_BLAS_LDFLAGS)
  564. endif
  565. endif
  566. ################
  567. # Heat example #
  568. ################
  569. if !NO_BLAS_LIB
  570. heat_heat_SOURCES = \
  571. heat/heat.c \
  572. heat/dw_factolu.c \
  573. heat/dw_factolu_tag.c \
  574. heat/dw_factolu_grain.c \
  575. heat/dw_sparse_cg.c \
  576. heat/heat_display.c \
  577. heat/lu_kernels_model.c \
  578. heat/dw_sparse_cg_kernels.c \
  579. heat/dw_factolu_kernels.c \
  580. common/blas.c
  581. heat_heat_LDADD = \
  582. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  583. $(STARPU_BLAS_LDFLAGS)
  584. endif
  585. ##############
  586. # CG example #
  587. ##############
  588. if !NO_BLAS_LIB
  589. cg_cg_SOURCES = \
  590. cg/cg.c \
  591. cg/cg_kernels.c \
  592. common/blas.c
  593. if STARPU_USE_CUDA
  594. cg_cg_SOURCES += \
  595. cg/cg_dot_kernel.cu
  596. endif
  597. cg_cg_LDADD = \
  598. $(STARPU_BLAS_LDFLAGS)
  599. endif
  600. ################
  601. # SPMD example #
  602. ################
  603. spmd_vector_scal_spmd_SOURCES = \
  604. spmd/vector_scal_spmd.c
  605. ################
  606. # SpMV example #
  607. ################
  608. spmv_spmv_SOURCES = \
  609. spmv/spmv.c \
  610. spmv/spmv_kernels.c
  611. if STARPU_USE_CUDA
  612. spmv_spmv_SOURCES += \
  613. spmv/spmv_cuda.cu
  614. endif
  615. if ATLAS_BLAS_LIB
  616. spmv_dw_block_spmv_SOURCES = \
  617. spmv/dw_block_spmv.c \
  618. spmv/dw_block_spmv_kernels.c \
  619. spmv/matrix_market/mm_to_bcsr.c \
  620. spmv/matrix_market/mmio.c
  621. spmv_dw_block_spmv_LDADD = \
  622. $(STARPU_BLAS_LDFLAGS)
  623. endif
  624. ###########################
  625. # C++ Incrementer example #
  626. ###########################
  627. cpp_incrementer_cpp_SOURCES = \
  628. cpp/incrementer_cpp.cpp
  629. if STARPU_USE_CUDA
  630. cpp_incrementer_cpp_SOURCES += \
  631. incrementer/incrementer_kernels.cu
  632. endif
  633. if STARPU_USE_OPENCL
  634. cpp_incrementer_cpp_SOURCES += \
  635. incrementer/incrementer_kernels_opencl.c
  636. endif
  637. #######################
  638. # Incrementer example #
  639. #######################
  640. incrementer_incrementer_SOURCES = \
  641. incrementer/incrementer.c
  642. if STARPU_USE_CUDA
  643. incrementer_incrementer_SOURCES += \
  644. incrementer/incrementer_kernels.cu
  645. endif
  646. if STARPU_USE_OPENCL
  647. incrementer_incrementer_SOURCES += \
  648. incrementer/incrementer_kernels_opencl.c
  649. nobase_STARPU_OPENCL_DATA_DATA += \
  650. incrementer/incrementer_kernels_opencl_kernel.cl
  651. endif
  652. ##################
  653. # Binary example #
  654. ##################
  655. binary_binary_SOURCES = \
  656. binary/binary.c
  657. if STARPU_USE_OPENCL
  658. binary_binary_SOURCES += \
  659. incrementer/incrementer_kernels_opencl.c
  660. endif
  661. #####################
  662. # interface example #
  663. #####################
  664. interface_complex_SOURCES = \
  665. interface/complex.c \
  666. interface/complex_interface.c
  667. if STARPU_USE_CUDA
  668. interface_complex_SOURCES += \
  669. interface/complex_kernels.cu
  670. endif
  671. if STARPU_USE_OPENCL
  672. interface_complex_SOURCES +=\
  673. interface/complex_kernels_opencl.c
  674. nobase_STARPU_OPENCL_DATA_DATA += \
  675. interface/complex_kernels.cl
  676. endif
  677. ######################
  678. # matVecMult example #
  679. ######################
  680. if STARPU_USE_OPENCL
  681. nobase_STARPU_OPENCL_DATA_DATA += \
  682. matvecmult/matvecmult_kernel.cl
  683. endif
  684. #######################
  685. # dot_product example #
  686. #######################
  687. reductions_dot_product_SOURCES = \
  688. reductions/dot_product.c
  689. if STARPU_USE_CUDA
  690. reductions_dot_product_SOURCES += \
  691. reductions/dot_product_kernels.cu
  692. endif
  693. if STARPU_USE_OPENCL
  694. nobase_STARPU_OPENCL_DATA_DATA += \
  695. reductions/dot_product_opencl_kernels.cl
  696. endif
  697. ##################
  698. # Mandelbrot Set #
  699. ##################
  700. examplebin_PROGRAMS += \
  701. mandelbrot/mandelbrot
  702. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  703. if HAVE_X11
  704. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  705. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
  706. endif
  707. ####################
  708. # Image downscaler #
  709. ####################
  710. examplebin_PROGRAMS += \
  711. ppm_downscaler/ppm_downscaler \
  712. ppm_downscaler/yuv_downscaler
  713. ################
  714. # Top Examples #
  715. ################
  716. examplebin_PROGRAMS += \
  717. top/hello_world_top
  718. top_hello_world_top_SOURCES = \
  719. top/hello_world_top.c
  720. ######
  721. # Pi #
  722. ######
  723. if !STARPU_HAVE_WINDOWS
  724. examplebin_PROGRAMS += \
  725. pi/pi \
  726. pi/pi_redux
  727. pi_pi_SOURCES = \
  728. pi/pi.c \
  729. pi/SobolQRNG/sobol_gold.c \
  730. pi/SobolQRNG/sobol_primitives.c
  731. if STARPU_USE_CUDA
  732. pi_pi_SOURCES += \
  733. pi/pi_kernel.cu \
  734. pi/SobolQRNG/sobol_gpu.cu
  735. endif
  736. pi_pi_redux_SOURCES = \
  737. pi/pi_redux.c
  738. if STARPU_USE_CUDA
  739. pi_pi_redux_SOURCES += \
  740. pi/pi_redux_kernel.cu
  741. pi_pi_redux_LDADD = \
  742. $(STARPU_CURAND_LDFLAGS)
  743. endif
  744. endif
  745. ###########################
  746. # OpenGL interoperability #
  747. ###########################
  748. if HAVE_OPENGL
  749. examplebin_PROGRAMS += \
  750. gl_interop/gl_interop \
  751. gl_interop/gl_interop_idle
  752. gl_interop_gl_interop_SOURCES = \
  753. gl_interop/gl_interop.c
  754. gl_interop_gl_interop_LDADD = \
  755. $(STARPU_OPENGL_RENDER_LDFLAGS)
  756. gl_interop_gl_interop_idle_SOURCES = \
  757. gl_interop/gl_interop_idle.c
  758. gl_interop_gl_interop_idle_LDADD = \
  759. $(STARPU_OPENGL_RENDER_LDFLAGS)
  760. endif
  761. ####################
  762. # pipeline example #
  763. ####################
  764. if !NO_BLAS_LIB
  765. pipeline_pipeline_SOURCES = \
  766. pipeline/pipeline.c \
  767. common/blas.c
  768. pipeline_pipeline_LDADD = \
  769. $(STARPU_BLAS_LDFLAGS)
  770. endif
  771. ##################
  772. # openmp example #
  773. ##################
  774. if STARPU_HAVE_OPENMP
  775. openmp_vector_scal_omp_CFLAGS = \
  776. $(AM_CFLAGS) -fopenmp
  777. sched_ctx_parallel_code_CFLAGS = \
  778. $(AM_CFLAGS) -fopenmp
  779. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  780. $(AM_CFLAGS) -fopenmp
  781. sched_ctx_nested_sched_ctxs_CFLAGS = \
  782. $(AM_CFLAGS) -fopenmp
  783. sched_ctx_parallel_tasks_reuse_handle_CFLAGS = \
  784. $(AM_CFLAGS) -fopenmp
  785. endif
  786. if STARPU_HAVE_FC
  787. # Fortran90 example
  788. # - list explicit dependences to control proper module files generation
  789. # - the overriding rule fully disables the corresponing default rule, thus
  790. # the default rule body must be copied entirely
  791. mod_types.mod: mod_types.o
  792. mod_compute.mod: mod_compute.o
  793. mod_interface.mod: mod_interface.o
  794. starpu_mod.mod: starpu_mod.o
  795. starpu_mod.o: $(top_srcdir)/include/starpu_mod.f90
  796. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/starpu_mod.f90
  797. mod_compute.o: $(top_srcdir)/examples/fortran90/mod_compute.f90 mod_types.mod mod_interface.mod starpu_mod.mod
  798. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/mod_compute.f90' || echo '$(srcdir)/'`fortran90/mod_compute.f90
  799. 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
  800. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/f90_example.f90' || echo '$(srcdir)/'`fortran90/f90_example.f90
  801. # Native Fortran example
  802. # - list explicit dependences to control proper module files generation
  803. # - the overriding rule fully disables the corresponing default rule, thus
  804. # the default rule body must be copied entirely
  805. fstarpu_mod.mod: fstarpu_mod.o
  806. codelets.mod: codelets.o
  807. fstarpu_mod.o: $(top_srcdir)/include/fstarpu_mod.f90
  808. $(AM_V_FC)$(FC) $(native_fortran_native_fortran_example_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/fstarpu_mod.f90
  809. codelets.o: $(top_srcdir)/examples/native_fortran/codelets.f90 fstarpu_mod.mod
  810. $(AM_V_FC)$(FC) $(native_fortran_native_fortran_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/codelets.f90' || echo '$(srcdir)/'`native_fortran/codelets.f90
  811. native_fortran_example.o: $(top_srcdir)/examples/native_fortran/native_fortran_example.f90 codelets.mod fstarpu_mod.mod
  812. $(AM_V_FC)$(FC) $(native_fortran_native_fortran_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/native_fortran_example.f90' || echo '$(srcdir)/'`native_fortran/native_fortran_example.f90
  813. endif