Makefile.am 21 KB

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