Makefile.am 22 KB

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