Makefile.am 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984
  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. 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. endif
  205. endif
  206. endif
  207. GEMMs = \
  208. mult/sgemm \
  209. mult/dgemm
  210. if STARPU_SIMGRID
  211. STARPU_EXAMPLES += $(GEMMs)
  212. endif
  213. if !NO_BLAS_LIB
  214. STARPU_EXAMPLES += $(GEMMs)
  215. endif
  216. if !NO_BLAS_LIB
  217. STARPU_EXAMPLES += \
  218. axpy/axpy \
  219. cholesky/cholesky_tag \
  220. cholesky/cholesky_tile_tag \
  221. cholesky/cholesky_grain_tag \
  222. cholesky/cholesky_implicit \
  223. lu/lu_example_float \
  224. lu/lu_example_double \
  225. lu/lu_implicit_example_float \
  226. lu/lu_implicit_example_double \
  227. heat/heat \
  228. cg/cg \
  229. pipeline/pipeline
  230. endif
  231. if MKL_BLAS_LIB
  232. STARPU_EXAMPLES += \
  233. lu/lu_example_complex_float \
  234. lu/lu_example_complex_double \
  235. lu/lu_implicit_example_complex_float \
  236. lu/lu_implicit_example_complex_double
  237. endif
  238. if ATLAS_BLAS_LIB
  239. STARPU_EXAMPLES += \
  240. spmv/dw_block_spmv
  241. endif
  242. if !STARPU_SIMGRID
  243. if STARPU_HAVE_F77_H
  244. STARPU_EXAMPLES += \
  245. basic_examples/vector_scal_fortran \
  246. fortran/hello
  247. endif
  248. endif
  249. if STARPU_HAVE_OPENMP
  250. STARPU_EXAMPLES += \
  251. openmp/vector_scal_omp \
  252. sched_ctx/sched_ctx_without_sched_policy\
  253. sched_ctx/nested_sched_ctxs \
  254. sched_ctx/sched_ctx_without_sched_policy_awake\
  255. sched_ctx/parallel_tasks_reuse_handle
  256. if STARPU_LONG_CHECK
  257. STARPU_EXAMPLES += \
  258. sched_ctx/parallel_code
  259. endif
  260. if STARPU_HAVE_HWLOC
  261. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  262. STARPU_EXAMPLES += \
  263. sched_ctx/parallel_tasks_with_cluster_api
  264. endif
  265. endif
  266. endif
  267. ##################
  268. # Basic examples #
  269. ##################
  270. basic_examples_vector_scal_SOURCES = \
  271. basic_examples/vector_scal.c \
  272. basic_examples/vector_scal_cpu.c
  273. if STARPU_HAVE_ICC
  274. if STARPU_CROSS_COMPILING
  275. else
  276. basic_examples_vector_scal_SOURCES += \
  277. basic_examples/vector_scal_cpu_icc.icc
  278. endif
  279. endif
  280. if STARPU_USE_CUDA
  281. basic_examples_vector_scal_SOURCES += \
  282. basic_examples/vector_scal_cuda.cu
  283. endif
  284. if STARPU_USE_OPENCL
  285. basic_examples_vector_scal_SOURCES += \
  286. basic_examples/vector_scal_opencl.c
  287. nobase_STARPU_OPENCL_DATA_DATA += \
  288. basic_examples/vector_scal_opencl_kernel.cl
  289. endif
  290. if STARPU_HAVE_F77_H
  291. basic_examples_vector_scal_fortran_SOURCES = \
  292. basic_examples/vector_scal_fortran.F \
  293. basic_examples/vector_scal_c.c \
  294. basic_examples/vector_scal_cpu.c
  295. if STARPU_USE_CUDA
  296. basic_examples_vector_scal_fortran_SOURCES += \
  297. basic_examples/vector_scal_cuda.cu
  298. basic_examples_vector_scal_fortran_LDADD = \
  299. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  300. endif
  301. fortran_hello_SOURCES = \
  302. fortran/hello_c.c \
  303. fortran/hello.F \
  304. fortran/StarPU_fortran.h
  305. endif
  306. if STARPU_HAVE_FC
  307. fortran90_f90_example_SOURCES = \
  308. fortran90/mod_types.f90 \
  309. $(top_srcdir)/include/starpu_mod.f90 \
  310. fortran90/mod_interface.f90 \
  311. fortran90/mod_compute.f90 \
  312. fortran90/marshalling.c \
  313. fortran90/f90_example.f90
  314. endif
  315. #######################
  316. # Multiformat example #
  317. #######################
  318. basic_examples_multiformat_SOURCES = \
  319. basic_examples/multiformat.c \
  320. basic_examples/multiformat_conversion_codelets.c
  321. if STARPU_USE_CUDA
  322. basic_examples_multiformat_SOURCES += \
  323. basic_examples/multiformat_cuda.cu \
  324. basic_examples/multiformat_conversion_codelets_cuda.cu
  325. endif
  326. if STARPU_USE_OPENCL
  327. basic_examples_multiformat_SOURCES += \
  328. basic_examples/multiformat_opencl.c \
  329. basic_examples/multiformat_conversion_codelets_opencl.c
  330. nobase_STARPU_OPENCL_DATA_DATA += \
  331. basic_examples/multiformat_opencl_kernel.cl \
  332. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  333. endif
  334. #################
  335. # block example #
  336. #################
  337. basic_examples_block_SOURCES = \
  338. basic_examples/block.c \
  339. basic_examples/block_cpu.c
  340. if STARPU_USE_CUDA
  341. basic_examples_block_SOURCES += \
  342. basic_examples/block_cuda.cu
  343. endif
  344. if STARPU_USE_OPENCL
  345. basic_examples_block_SOURCES += \
  346. basic_examples/block_opencl.c
  347. nobase_STARPU_OPENCL_DATA_DATA += \
  348. basic_examples/block_opencl_kernel.cl
  349. endif
  350. ####################
  351. # Variable example #
  352. ####################
  353. basic_examples_variable_SOURCES = \
  354. basic_examples/variable.c \
  355. basic_examples/variable_kernels_cpu.c
  356. if STARPU_USE_CUDA
  357. basic_examples_variable_SOURCES += \
  358. basic_examples/variable_kernels.cu
  359. endif
  360. if STARPU_USE_OPENCL
  361. basic_examples_variable_SOURCES += \
  362. basic_examples/variable_kernels_opencl.c
  363. nobase_STARPU_OPENCL_DATA_DATA += \
  364. basic_examples/variable_kernels_opencl_kernel.cl
  365. endif
  366. ###########
  367. # Filters #
  368. ###########
  369. filters_fblock_SOURCES = \
  370. filters/fblock.c \
  371. filters/fblock_cpu.c
  372. if STARPU_USE_CUDA
  373. filters_fblock_SOURCES += \
  374. filters/fblock_cuda.cu
  375. endif
  376. if STARPU_USE_OPENCL
  377. filters_fblock_SOURCES += \
  378. filters/fblock_opencl.c
  379. nobase_STARPU_OPENCL_DATA_DATA += \
  380. filters/fblock_opencl_kernel.cl
  381. endif
  382. filters_fmultiple_manual_SOURCES = \
  383. filters/fmultiple_manual.c
  384. if STARPU_USE_CUDA
  385. filters_fmultiple_manual_SOURCES += \
  386. filters/fmultiple_cuda.cu
  387. endif
  388. filters_fmultiple_submit_SOURCES = \
  389. filters/fmultiple_submit.c
  390. if STARPU_USE_CUDA
  391. filters_fmultiple_submit_SOURCES += \
  392. filters/fmultiple_cuda.cu
  393. endif
  394. filters_fmultiple_submit_readonly_SOURCES = \
  395. filters/fmultiple_submit_readonly.c
  396. if STARPU_USE_CUDA
  397. filters_fmultiple_submit_readonly_SOURCES += \
  398. filters/fmultiple_cuda.cu
  399. endif
  400. examplebin_PROGRAMS += \
  401. filters/shadow \
  402. filters/shadow2d \
  403. filters/shadow3d
  404. #############################
  405. # Custom multiformat filter #
  406. #############################
  407. #TODO: see why the application is failing
  408. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  409. examplebin_PROGRAMS += \
  410. filters/custom_mf/custom_mf_filter
  411. filters_custom_mf_custom_mf_filter_SOURCES=\
  412. filters/custom_mf/custom_mf_filter.c \
  413. filters/custom_mf/custom_interface.c \
  414. filters/custom_mf/custom_conversion_codelets.c
  415. if STARPU_USE_CUDA
  416. filters_custom_mf_custom_mf_filter_SOURCES += \
  417. filters/custom_mf/conversion.cu \
  418. filters/custom_mf/cuda.cu
  419. endif
  420. if STARPU_USE_OPENCL
  421. filters_custom_mf_custom_mf_filter_SOURCES += \
  422. filters/custom_mf/conversion_opencl.c \
  423. filters/custom_mf/custom_opencl.c
  424. nobase_STARPU_OPENCL_DATA_DATA += \
  425. filters/custom_mf/conversion_opencl.cl \
  426. filters/custom_mf/custom_opencl.cl
  427. endif
  428. ################
  429. # AXPY example #
  430. ################
  431. if !NO_BLAS_LIB
  432. axpy_axpy_SOURCES = \
  433. axpy/axpy.c \
  434. common/blas.c
  435. if STARPU_USE_OPENCL
  436. axpy_axpy_SOURCES += \
  437. axpy/axpy_opencl.c
  438. nobase_STARPU_OPENCL_DATA_DATA += \
  439. axpy/axpy_opencl_kernel.cl
  440. endif
  441. axpy_axpy_LDADD = \
  442. $(STARPU_BLAS_LDFLAGS)
  443. endif
  444. ################
  445. # Mult example #
  446. ################
  447. if !NO_BLAS_LIB
  448. mult_sgemm_SOURCES = \
  449. mult/sgemm.c \
  450. common/blas.c
  451. mult_sgemm_LDADD = \
  452. $(STARPU_BLAS_LDFLAGS)
  453. mult_dgemm_SOURCES = \
  454. mult/dgemm.c \
  455. common/blas.c
  456. mult_dgemm_LDADD = \
  457. $(STARPU_BLAS_LDFLAGS)
  458. endif
  459. ####################
  460. # Cholesky example #
  461. ####################
  462. if !NO_BLAS_LIB
  463. cholesky_cholesky_tag_SOURCES = \
  464. cholesky/cholesky_tag.c \
  465. cholesky/cholesky_models.c \
  466. cholesky/cholesky_kernels.c \
  467. common/blas.c
  468. cholesky_cholesky_tag_LDADD = \
  469. $(STARPU_BLAS_LDFLAGS)
  470. cholesky_cholesky_tile_tag_SOURCES = \
  471. cholesky/cholesky_tile_tag.c \
  472. cholesky/cholesky_models.c \
  473. cholesky/cholesky_kernels.c \
  474. common/blas.c
  475. cholesky_cholesky_tile_tag_LDADD = \
  476. $(STARPU_BLAS_LDFLAGS)
  477. cholesky_cholesky_grain_tag_SOURCES = \
  478. cholesky/cholesky_grain_tag.c \
  479. cholesky/cholesky_models.c \
  480. cholesky/cholesky_kernels.c \
  481. common/blas.c
  482. cholesky_cholesky_grain_tag_LDADD = \
  483. $(STARPU_BLAS_LDFLAGS)
  484. cholesky_cholesky_implicit_SOURCES = \
  485. cholesky/cholesky_implicit.c \
  486. cholesky/cholesky_models.c \
  487. cholesky/cholesky_kernels.c \
  488. sched_ctx_utils/sched_ctx_utils.c \
  489. common/blas.c
  490. cholesky_cholesky_implicit_LDADD = \
  491. $(STARPU_BLAS_LDFLAGS)
  492. endif
  493. ##############
  494. # LU example #
  495. ##############
  496. if !NO_BLAS_LIB
  497. lu_lu_example_float_SOURCES = \
  498. lu/lu_example_float.c \
  499. lu/slu.c \
  500. lu/slu_pivot.c \
  501. lu/slu_kernels.c \
  502. common/blas.c
  503. lu_lu_example_float_LDADD = \
  504. $(STARPU_BLAS_LDFLAGS)
  505. lu_lu_example_double_SOURCES = \
  506. lu/lu_example_double.c \
  507. lu/dlu.c \
  508. lu/dlu_pivot.c \
  509. lu/dlu_kernels.c \
  510. common/blas.c
  511. lu_lu_example_double_LDADD = \
  512. $(STARPU_BLAS_LDFLAGS)
  513. lu_lu_implicit_example_float_SOURCES = \
  514. lu/lu_example_float.c \
  515. lu/slu_implicit.c \
  516. lu/slu_implicit_pivot.c \
  517. lu/slu_kernels.c \
  518. common/blas.c
  519. lu_lu_implicit_example_float_LDADD = \
  520. $(STARPU_BLAS_LDFLAGS)
  521. lu_lu_implicit_example_double_SOURCES = \
  522. lu/lu_example_double.c \
  523. lu/dlu_implicit.c \
  524. lu/dlu_implicit_pivot.c \
  525. lu/dlu_kernels.c \
  526. common/blas.c
  527. lu_lu_implicit_example_double_LDADD = \
  528. $(STARPU_BLAS_LDFLAGS)
  529. if MKL_BLAS_LIB
  530. lu_lu_example_complex_float_SOURCES = \
  531. lu/lu_example_complex_float.c \
  532. lu/clu.c \
  533. lu/clu_pivot.c \
  534. lu/clu_kernels.c \
  535. lu/blas_complex.c \
  536. common/blas.c
  537. lu_lu_example_complex_float_LDADD = \
  538. $(STARPU_BLAS_LDFLAGS)
  539. lu_lu_implicit_example_complex_float_SOURCES = \
  540. lu/lu_example_complex_float.c \
  541. lu/clu_implicit.c \
  542. lu/clu_implicit_pivot.c \
  543. lu/clu_kernels.c \
  544. lu/blas_complex.c \
  545. common/blas.c
  546. lu_lu_implicit_example_complex_float_LDADD = \
  547. $(STARPU_BLAS_LDFLAGS)
  548. lu_lu_example_complex_double_SOURCES = \
  549. lu/lu_example_complex_double.c \
  550. lu/zlu.c \
  551. lu/zlu_pivot.c \
  552. lu/zlu_kernels.c \
  553. lu/blas_complex.c \
  554. common/blas.c
  555. lu_lu_example_complex_double_LDADD = \
  556. $(STARPU_BLAS_LDFLAGS)
  557. lu_lu_implicit_example_complex_double_SOURCES = \
  558. lu/lu_example_complex_double.c \
  559. lu/zlu_implicit.c \
  560. lu/zlu_implicit_pivot.c \
  561. lu/zlu_kernels.c \
  562. lu/blas_complex.c \
  563. common/blas.c
  564. lu_lu_implicit_example_complex_double_LDADD = \
  565. $(STARPU_BLAS_LDFLAGS)
  566. endif
  567. endif
  568. ################
  569. # Heat example #
  570. ################
  571. if !NO_BLAS_LIB
  572. heat_heat_SOURCES = \
  573. heat/heat.c \
  574. heat/dw_factolu.c \
  575. heat/dw_factolu_tag.c \
  576. heat/dw_factolu_grain.c \
  577. heat/dw_sparse_cg.c \
  578. heat/heat_display.c \
  579. heat/lu_kernels_model.c \
  580. heat/dw_sparse_cg_kernels.c \
  581. heat/dw_factolu_kernels.c \
  582. common/blas.c
  583. heat_heat_LDADD = \
  584. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  585. $(STARPU_BLAS_LDFLAGS)
  586. endif
  587. ##############
  588. # CG example #
  589. ##############
  590. if !NO_BLAS_LIB
  591. cg_cg_SOURCES = \
  592. cg/cg.c \
  593. cg/cg_kernels.c \
  594. common/blas.c
  595. if STARPU_USE_CUDA
  596. cg_cg_SOURCES += \
  597. cg/cg_dot_kernel.cu
  598. endif
  599. cg_cg_LDADD = \
  600. $(STARPU_BLAS_LDFLAGS)
  601. endif
  602. ################
  603. # SPMD example #
  604. ################
  605. spmd_vector_scal_spmd_SOURCES = \
  606. spmd/vector_scal_spmd.c
  607. ################
  608. # SpMV example #
  609. ################
  610. spmv_spmv_SOURCES = \
  611. spmv/spmv.c \
  612. spmv/spmv_kernels.c
  613. if STARPU_USE_CUDA
  614. spmv_spmv_SOURCES += \
  615. spmv/spmv_cuda.cu
  616. endif
  617. if ATLAS_BLAS_LIB
  618. spmv_dw_block_spmv_SOURCES = \
  619. spmv/dw_block_spmv.c \
  620. spmv/dw_block_spmv_kernels.c \
  621. spmv/matrix_market/mm_to_bcsr.c \
  622. spmv/matrix_market/mmio.c
  623. spmv_dw_block_spmv_LDADD = \
  624. $(STARPU_BLAS_LDFLAGS)
  625. endif
  626. ###########################
  627. # C++ Incrementer example #
  628. ###########################
  629. cpp_incrementer_cpp_SOURCES = \
  630. cpp/incrementer_cpp.cpp
  631. if STARPU_USE_CUDA
  632. cpp_incrementer_cpp_SOURCES += \
  633. incrementer/incrementer_kernels.cu
  634. endif
  635. if STARPU_USE_OPENCL
  636. cpp_incrementer_cpp_SOURCES += \
  637. incrementer/incrementer_kernels_opencl.c
  638. endif
  639. #######################
  640. # Incrementer example #
  641. #######################
  642. incrementer_incrementer_SOURCES = \
  643. incrementer/incrementer.c
  644. if STARPU_USE_CUDA
  645. incrementer_incrementer_SOURCES += \
  646. incrementer/incrementer_kernels.cu
  647. endif
  648. if STARPU_USE_OPENCL
  649. incrementer_incrementer_SOURCES += \
  650. incrementer/incrementer_kernels_opencl.c
  651. nobase_STARPU_OPENCL_DATA_DATA += \
  652. incrementer/incrementer_kernels_opencl_kernel.cl
  653. endif
  654. ##################
  655. # Binary example #
  656. ##################
  657. binary_binary_SOURCES = \
  658. binary/binary.c
  659. if STARPU_USE_OPENCL
  660. binary_binary_SOURCES += \
  661. incrementer/incrementer_kernels_opencl.c
  662. endif
  663. #####################
  664. # interface example #
  665. #####################
  666. interface_complex_SOURCES = \
  667. interface/complex.c \
  668. interface/complex_interface.c
  669. if STARPU_USE_CUDA
  670. interface_complex_SOURCES += \
  671. interface/complex_kernels.cu
  672. endif
  673. if STARPU_USE_OPENCL
  674. interface_complex_SOURCES +=\
  675. interface/complex_kernels_opencl.c
  676. nobase_STARPU_OPENCL_DATA_DATA += \
  677. interface/complex_kernels.cl
  678. endif
  679. ######################
  680. # matVecMult example #
  681. ######################
  682. if STARPU_USE_OPENCL
  683. nobase_STARPU_OPENCL_DATA_DATA += \
  684. matvecmult/matvecmult_kernel.cl
  685. endif
  686. #######################
  687. # dot_product example #
  688. #######################
  689. reductions_dot_product_SOURCES = \
  690. reductions/dot_product.c
  691. if STARPU_USE_CUDA
  692. reductions_dot_product_SOURCES += \
  693. reductions/dot_product_kernels.cu
  694. endif
  695. if STARPU_USE_OPENCL
  696. nobase_STARPU_OPENCL_DATA_DATA += \
  697. reductions/dot_product_opencl_kernels.cl
  698. endif
  699. ##################
  700. # Mandelbrot Set #
  701. ##################
  702. examplebin_PROGRAMS += \
  703. mandelbrot/mandelbrot
  704. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  705. if HAVE_X11
  706. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  707. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
  708. endif
  709. ####################
  710. # Image downscaler #
  711. ####################
  712. examplebin_PROGRAMS += \
  713. ppm_downscaler/ppm_downscaler \
  714. ppm_downscaler/yuv_downscaler
  715. ################
  716. # Top Examples #
  717. ################
  718. examplebin_PROGRAMS += \
  719. top/hello_world_top
  720. top_hello_world_top_SOURCES = \
  721. top/hello_world_top.c
  722. ######
  723. # Pi #
  724. ######
  725. if !STARPU_HAVE_WINDOWS
  726. examplebin_PROGRAMS += \
  727. pi/pi \
  728. pi/pi_redux
  729. pi_pi_SOURCES = \
  730. pi/pi.c \
  731. pi/SobolQRNG/sobol_gold.c \
  732. pi/SobolQRNG/sobol_primitives.c
  733. if STARPU_USE_CUDA
  734. pi_pi_SOURCES += \
  735. pi/pi_kernel.cu \
  736. pi/SobolQRNG/sobol_gpu.cu
  737. endif
  738. pi_pi_redux_SOURCES = \
  739. pi/pi_redux.c
  740. if STARPU_USE_CUDA
  741. pi_pi_redux_SOURCES += \
  742. pi/pi_redux_kernel.cu
  743. pi_pi_redux_LDADD = \
  744. $(STARPU_CURAND_LDFLAGS)
  745. endif
  746. endif
  747. ###########################
  748. # OpenGL interoperability #
  749. ###########################
  750. if HAVE_OPENGL
  751. examplebin_PROGRAMS += \
  752. gl_interop/gl_interop \
  753. gl_interop/gl_interop_idle
  754. gl_interop_gl_interop_SOURCES = \
  755. gl_interop/gl_interop.c
  756. gl_interop_gl_interop_LDADD = \
  757. $(STARPU_OPENGL_RENDER_LDFLAGS)
  758. gl_interop_gl_interop_idle_SOURCES = \
  759. gl_interop/gl_interop_idle.c
  760. gl_interop_gl_interop_idle_LDADD = \
  761. $(STARPU_OPENGL_RENDER_LDFLAGS)
  762. endif
  763. ####################
  764. # pipeline example #
  765. ####################
  766. if !NO_BLAS_LIB
  767. pipeline_pipeline_SOURCES = \
  768. pipeline/pipeline.c \
  769. common/blas.c
  770. pipeline_pipeline_LDADD = \
  771. $(STARPU_BLAS_LDFLAGS)
  772. endif
  773. ##################
  774. # openmp example #
  775. ##################
  776. if STARPU_HAVE_OPENMP
  777. openmp_vector_scal_omp_CFLAGS = \
  778. $(AM_CFLAGS) -fopenmp
  779. sched_ctx_parallel_code_CFLAGS = \
  780. $(AM_CFLAGS) -fopenmp
  781. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  782. $(AM_CFLAGS) -fopenmp
  783. sched_ctx_nested_sched_ctxs_CFLAGS = \
  784. $(AM_CFLAGS) -fopenmp
  785. sched_ctx_parallel_tasks_reuse_handle_CFLAGS = \
  786. $(AM_CFLAGS) -fopenmp
  787. endif
  788. if STARPU_HAVE_FC
  789. # Fortran90 example
  790. # - list explicit dependences to control proper module files generation
  791. # - the overriding rule fully disables the corresponing default rule, thus
  792. # the default rule body must be copied entirely
  793. mod_types.mod: mod_types.o
  794. mod_compute.mod: mod_compute.o
  795. mod_interface.mod: mod_interface.o
  796. starpu_mod.mod: starpu_mod.o
  797. starpu_mod.o: $(top_srcdir)/include/starpu_mod.f90
  798. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/starpu_mod.f90
  799. mod_compute.o: $(top_srcdir)/examples/fortran90/mod_compute.f90 mod_types.mod mod_interface.mod starpu_mod.mod
  800. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/mod_compute.f90' || echo '$(srcdir)/'`fortran90/mod_compute.f90
  801. 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
  802. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/f90_example.f90' || echo '$(srcdir)/'`fortran90/f90_example.f90
  803. endif