Makefile.am 22 KB

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