Makefile.am 21 KB

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