Makefile.am 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916
  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. 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
  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/bindings/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. reductions/dot_product \
  169. reductions/minmax_reduction \
  170. mandelbrot/mandelbrot \
  171. ppm_downscaler/ppm_downscaler \
  172. ppm_downscaler/yuv_downscaler
  173. if !STARPU_SIMGRID
  174. examplebin_PROGRAMS += \
  175. scheduler/dummy_sched
  176. if STARPU_HAVE_F77_H
  177. examplebin_PROGRAMS += \
  178. basic_examples/vector_scal_fortran
  179. endif
  180. endif
  181. if !NO_BLAS_LIB
  182. examplebin_PROGRAMS += \
  183. axpy/axpy \
  184. mult/sgemm \
  185. mult/dgemm \
  186. cholesky/cholesky_tag \
  187. cholesky/cholesky_tile_tag \
  188. cholesky/cholesky_grain_tag \
  189. cholesky/cholesky_implicit \
  190. lu/lu_example_float \
  191. lu/lu_example_double \
  192. lu/lu_implicit_example_float \
  193. lu/lu_implicit_example_double \
  194. heat/heat \
  195. cg/cg \
  196. pipeline/pipeline
  197. endif
  198. if MKL_BLAS_LIB
  199. examplebin_PROGRAMS += \
  200. lu/lu_example_complex_float \
  201. lu/lu_example_complex_double \
  202. lu/lu_implicit_example_complex_float \
  203. lu/lu_implicit_example_complex_double
  204. endif
  205. if ATLAS_BLAS_LIB
  206. examplebin_PROGRAMS += \
  207. spmv/dw_block_spmv
  208. endif
  209. STARPU_EXAMPLES += \
  210. basic_examples/hello_world \
  211. basic_examples/vector_scal \
  212. basic_examples/mult \
  213. basic_examples/block \
  214. basic_examples/variable \
  215. basic_examples/multiformat \
  216. cpp/incrementer_cpp \
  217. filters/fvector \
  218. filters/fblock \
  219. filters/fmatrix \
  220. tag_example/tag_example \
  221. tag_example/tag_example2 \
  222. tag_example/tag_example3 \
  223. tag_example/tag_example4 \
  224. tag_example/tag_restartable \
  225. spmd/vector_scal_spmd \
  226. spmv/spmv \
  227. callback/callback \
  228. callback/prologue \
  229. incrementer/incrementer \
  230. binary/binary \
  231. interface/complex \
  232. matvecmult/matvecmult \
  233. profiling/profiling \
  234. scheduler/dummy_sched \
  235. sched_ctx/sched_ctx \
  236. sched_ctx/dummy_sched_with_ctx \
  237. reductions/dot_product \
  238. reductions/minmax_reduction
  239. if STARPU_LONG_CHECK
  240. STARPU_EXAMPLES += \
  241. sched_ctx/parallel_code
  242. endif
  243. if STARPU_HAVE_F77_H
  244. STARPU_EXAMPLES += \
  245. basic_examples/vector_scal_fortran
  246. endif
  247. if !NO_BLAS_LIB
  248. STARPU_EXAMPLES += \
  249. axpy/axpy \
  250. mult/sgemm \
  251. mult/dgemm \
  252. cholesky/cholesky_tag \
  253. cholesky/cholesky_tile_tag \
  254. cholesky/cholesky_grain_tag \
  255. cholesky/cholesky_implicit \
  256. lu/lu_example_float \
  257. lu/lu_example_double \
  258. lu/lu_implicit_example_float \
  259. lu/lu_implicit_example_double \
  260. heat/heat \
  261. cg/cg \
  262. pipeline/pipeline
  263. endif
  264. if MKL_BLAS_LIB
  265. STARPU_EXAMPLES += \
  266. lu/lu_example_complex_float \
  267. lu/lu_example_complex_double \
  268. lu/lu_implicit_example_complex_float \
  269. lu/lu_implicit_example_complex_double
  270. endif
  271. if ATLAS_BLAS_LIB
  272. STARPU_EXAMPLES += \
  273. spmv/dw_block_spmv
  274. endif
  275. ##################
  276. # Basic examples #
  277. ##################
  278. basic_examples_vector_scal_SOURCES = \
  279. basic_examples/vector_scal.c \
  280. basic_examples/vector_scal_cpu.c
  281. if STARPU_HAVE_ICC
  282. if STARPU_CROSS_COMPILING
  283. else
  284. basic_examples_vector_scal_SOURCES += \
  285. basic_examples/vector_scal_cpu_icc.icc
  286. endif
  287. endif
  288. if STARPU_USE_CUDA
  289. basic_examples_vector_scal_SOURCES += \
  290. basic_examples/vector_scal_cuda.cu
  291. endif
  292. if STARPU_USE_OPENCL
  293. basic_examples_vector_scal_SOURCES += \
  294. basic_examples/vector_scal_opencl.c
  295. nobase_STARPU_OPENCL_DATA_DATA += \
  296. basic_examples/vector_scal_opencl_kernel.cl
  297. endif
  298. if STARPU_HAVE_F77_H
  299. basic_examples_vector_scal_fortran_SOURCES = \
  300. basic_examples/vector_scal_fortran.F \
  301. basic_examples/vector_scal_c.c \
  302. basic_examples/vector_scal_cpu.c
  303. if STARPU_USE_CUDA
  304. basic_examples_vector_scal_fortran_SOURCES += \
  305. basic_examples/vector_scal_cuda.cu
  306. basic_examples_vector_scal_fortran_LDADD = \
  307. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  308. endif
  309. endif
  310. #######################
  311. # Multiformat example #
  312. #######################
  313. basic_examples_multiformat_SOURCES = \
  314. basic_examples/multiformat.c \
  315. basic_examples/multiformat_conversion_codelets.c
  316. if STARPU_USE_CUDA
  317. basic_examples_multiformat_SOURCES += \
  318. basic_examples/multiformat_cuda.cu \
  319. basic_examples/multiformat_conversion_codelets_cuda.cu
  320. endif
  321. if STARPU_USE_OPENCL
  322. basic_examples_multiformat_SOURCES += \
  323. basic_examples/multiformat_opencl.c \
  324. basic_examples/multiformat_conversion_codelets_opencl.c
  325. nobase_STARPU_OPENCL_DATA_DATA += \
  326. basic_examples/multiformat_opencl_kernel.cl \
  327. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  328. endif
  329. #################
  330. # block example #
  331. #################
  332. basic_examples_block_SOURCES = \
  333. basic_examples/block.c \
  334. basic_examples/block_cpu.c
  335. if STARPU_USE_CUDA
  336. basic_examples_block_SOURCES += \
  337. basic_examples/block_cuda.cu
  338. endif
  339. if STARPU_USE_OPENCL
  340. basic_examples_block_SOURCES += \
  341. basic_examples/block_opencl.c
  342. nobase_STARPU_OPENCL_DATA_DATA += \
  343. basic_examples/block_opencl_kernel.cl
  344. endif
  345. ####################
  346. # Variable example #
  347. ####################
  348. basic_examples_variable_SOURCES = \
  349. basic_examples/variable.c \
  350. basic_examples/variable_kernels_cpu.c
  351. if STARPU_USE_CUDA
  352. basic_examples_variable_SOURCES += \
  353. basic_examples/variable_kernels.cu
  354. endif
  355. if STARPU_USE_OPENCL
  356. basic_examples_variable_SOURCES += \
  357. basic_examples/variable_kernels_opencl.c
  358. nobase_STARPU_OPENCL_DATA_DATA += \
  359. basic_examples/variable_kernels_opencl_kernel.cl
  360. endif
  361. ###########
  362. # Filters #
  363. ###########
  364. filters_fblock_SOURCES = \
  365. filters/fblock.c \
  366. filters/fblock_cpu.c
  367. if STARPU_USE_CUDA
  368. filters_fblock_SOURCES += \
  369. filters/fblock_cuda.cu
  370. endif
  371. if STARPU_USE_OPENCL
  372. filters_fblock_SOURCES += \
  373. filters/fblock_opencl.c
  374. nobase_STARPU_OPENCL_DATA_DATA += \
  375. filters/fblock_opencl_kernel.cl
  376. endif
  377. #############################
  378. # Custom multiformat filter #
  379. #############################
  380. filters_custom_mf_custom_mf_filter_SOURCES=\
  381. filters/custom_mf/custom_mf_filter.c \
  382. filters/custom_mf/custom_interface.c \
  383. filters/custom_mf/custom_conversion_codelets.c
  384. if STARPU_USE_CUDA
  385. filters_custom_mf_custom_mf_filter_SOURCES += \
  386. filters/custom_mf/conversion.cu \
  387. filters/custom_mf/cuda.cu
  388. endif
  389. if STARPU_USE_OPENCL
  390. filters_custom_mf_custom_mf_filter_SOURCES += \
  391. filters/custom_mf/conversion_opencl.c \
  392. filters/custom_mf/custom_opencl.c
  393. nobase_STARPU_OPENCL_DATA_DATA += \
  394. filters/custom_mf/conversion_opencl.cl \
  395. filters/custom_mf/custom_opencl.cl
  396. endif
  397. ################
  398. # AXPY example #
  399. ################
  400. if !NO_BLAS_LIB
  401. axpy_axpy_SOURCES = \
  402. axpy/axpy.c \
  403. common/blas.c
  404. if STARPU_USE_OPENCL
  405. axpy_axpy_SOURCES += \
  406. axpy/axpy_opencl.c
  407. nobase_STARPU_OPENCL_DATA_DATA += \
  408. axpy/axpy_opencl_kernel.cl
  409. endif
  410. axpy_axpy_LDADD = \
  411. $(STARPU_BLAS_LDFLAGS)
  412. endif
  413. ################
  414. # Mult example #
  415. ################
  416. if !NO_BLAS_LIB
  417. mult_sgemm_SOURCES = \
  418. mult/sgemm.c \
  419. common/blas.c
  420. mult_sgemm_LDADD = \
  421. $(STARPU_BLAS_LDFLAGS)
  422. mult_dgemm_SOURCES = \
  423. mult/dgemm.c \
  424. common/blas.c
  425. mult_dgemm_LDADD = \
  426. $(STARPU_BLAS_LDFLAGS)
  427. endif
  428. ####################
  429. # Cholesky example #
  430. ####################
  431. if !NO_BLAS_LIB
  432. cholesky_cholesky_tag_SOURCES = \
  433. cholesky/cholesky_tag.c \
  434. cholesky/cholesky_models.c \
  435. cholesky/cholesky_kernels.c \
  436. common/blas.c
  437. cholesky_cholesky_tag_LDADD = \
  438. $(STARPU_BLAS_LDFLAGS)
  439. cholesky_cholesky_tile_tag_SOURCES = \
  440. cholesky/cholesky_tile_tag.c \
  441. cholesky/cholesky_models.c \
  442. cholesky/cholesky_kernels.c \
  443. common/blas.c
  444. cholesky_cholesky_tile_tag_LDADD = \
  445. $(STARPU_BLAS_LDFLAGS)
  446. cholesky_cholesky_grain_tag_SOURCES = \
  447. cholesky/cholesky_grain_tag.c \
  448. cholesky/cholesky_models.c \
  449. cholesky/cholesky_kernels.c \
  450. common/blas.c
  451. cholesky_cholesky_grain_tag_LDADD = \
  452. $(STARPU_BLAS_LDFLAGS)
  453. cholesky_cholesky_implicit_SOURCES = \
  454. cholesky/cholesky_implicit.c \
  455. cholesky/cholesky_models.c \
  456. cholesky/cholesky_kernels.c \
  457. sched_ctx_utils/sched_ctx_utils.c \
  458. common/blas.c
  459. cholesky_cholesky_implicit_LDADD = \
  460. $(STARPU_BLAS_LDFLAGS)
  461. endif
  462. ##############
  463. # LU example #
  464. ##############
  465. if !NO_BLAS_LIB
  466. lu_lu_example_float_SOURCES = \
  467. lu/lu_example_float.c \
  468. lu/slu.c \
  469. lu/slu_pivot.c \
  470. lu/slu_kernels.c \
  471. common/blas.c
  472. lu_lu_example_float_LDADD = \
  473. $(STARPU_BLAS_LDFLAGS)
  474. lu_lu_example_double_SOURCES = \
  475. lu/lu_example_double.c \
  476. lu/dlu.c \
  477. lu/dlu_pivot.c \
  478. lu/dlu_kernels.c \
  479. common/blas.c
  480. lu_lu_example_double_LDADD = \
  481. $(STARPU_BLAS_LDFLAGS)
  482. lu_lu_implicit_example_float_SOURCES = \
  483. lu/lu_example_float.c \
  484. lu/slu_implicit.c \
  485. lu/slu_implicit_pivot.c \
  486. lu/slu_kernels.c \
  487. common/blas.c
  488. lu_lu_implicit_example_float_LDADD = \
  489. $(STARPU_BLAS_LDFLAGS)
  490. lu_lu_implicit_example_double_SOURCES = \
  491. lu/lu_example_double.c \
  492. lu/dlu_implicit.c \
  493. lu/dlu_implicit_pivot.c \
  494. lu/dlu_kernels.c \
  495. common/blas.c
  496. lu_lu_implicit_example_double_LDADD = \
  497. $(STARPU_BLAS_LDFLAGS)
  498. if MKL_BLAS_LIB
  499. lu_lu_example_complex_float_SOURCES = \
  500. lu/lu_example_complex_float.c \
  501. lu/clu.c \
  502. lu/clu_pivot.c \
  503. lu/clu_kernels.c \
  504. lu/blas_complex.c \
  505. common/blas.c
  506. lu_lu_example_complex_float_LDADD = \
  507. $(STARPU_BLAS_LDFLAGS)
  508. lu_lu_implicit_example_complex_float_SOURCES = \
  509. lu/lu_example_complex_float.c \
  510. lu/clu_implicit.c \
  511. lu/clu_implicit_pivot.c \
  512. lu/clu_kernels.c \
  513. lu/blas_complex.c \
  514. common/blas.c
  515. lu_lu_implicit_example_complex_float_LDADD = \
  516. $(STARPU_BLAS_LDFLAGS)
  517. lu_lu_example_complex_double_SOURCES = \
  518. lu/lu_example_complex_double.c \
  519. lu/zlu.c \
  520. lu/zlu_pivot.c \
  521. lu/zlu_kernels.c \
  522. lu/blas_complex.c \
  523. common/blas.c
  524. lu_lu_example_complex_double_LDADD = \
  525. $(STARPU_BLAS_LDFLAGS)
  526. lu_lu_implicit_example_complex_double_SOURCES = \
  527. lu/lu_example_complex_double.c \
  528. lu/zlu_implicit.c \
  529. lu/zlu_implicit_pivot.c \
  530. lu/zlu_kernels.c \
  531. lu/blas_complex.c \
  532. common/blas.c
  533. lu_lu_implicit_example_complex_double_LDADD = \
  534. $(STARPU_BLAS_LDFLAGS)
  535. endif
  536. endif
  537. ################
  538. # Heat example #
  539. ################
  540. if !NO_BLAS_LIB
  541. heat_heat_SOURCES = \
  542. heat/heat.c \
  543. heat/dw_factolu.c \
  544. heat/dw_factolu_tag.c \
  545. heat/dw_factolu_grain.c \
  546. heat/dw_sparse_cg.c \
  547. heat/heat_display.c \
  548. heat/lu_kernels_model.c \
  549. heat/dw_sparse_cg_kernels.c \
  550. heat/dw_factolu_kernels.c \
  551. common/blas.c
  552. heat_heat_LDADD = \
  553. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  554. $(STARPU_BLAS_LDFLAGS)
  555. endif
  556. ##############
  557. # CG example #
  558. ##############
  559. if !NO_BLAS_LIB
  560. cg_cg_SOURCES = \
  561. cg/cg.c \
  562. cg/cg_kernels.c \
  563. common/blas.c
  564. if STARPU_USE_CUDA
  565. cg_cg_SOURCES += \
  566. cg/cg_dot_kernel.cu
  567. cg/cg_dot_kernel.o: cg/cg_dot_kernel.cu
  568. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  569. endif
  570. cg_cg_LDADD = \
  571. $(STARPU_BLAS_LDFLAGS)
  572. endif
  573. ################
  574. # SPMD example #
  575. ################
  576. spmd_vector_scal_spmd_SOURCES = \
  577. spmd/vector_scal_spmd.c
  578. ################
  579. # SpMV example #
  580. ################
  581. spmv_spmv_SOURCES = \
  582. spmv/spmv.c \
  583. spmv/spmv_kernels.c
  584. if STARPU_USE_CUDA
  585. spmv_spmv_SOURCES += \
  586. spmv/spmv_cuda.cu
  587. endif
  588. if ATLAS_BLAS_LIB
  589. spmv_dw_block_spmv_SOURCES = \
  590. spmv/dw_block_spmv.c \
  591. spmv/dw_block_spmv_kernels.c \
  592. spmv/matrix_market/mm_to_bcsr.c \
  593. spmv/matrix_market/mmio.c
  594. spmv_dw_block_spmv_LDADD = \
  595. $(STARPU_BLAS_LDFLAGS)
  596. endif
  597. ###########################
  598. # C++ Incrementer example #
  599. ###########################
  600. cpp_incrementer_cpp_SOURCES = \
  601. cpp/incrementer_cpp.cpp
  602. if STARPU_USE_CUDA
  603. cpp_incrementer_cpp_SOURCES += \
  604. incrementer/incrementer_kernels.cu
  605. endif
  606. if STARPU_USE_OPENCL
  607. cpp_incrementer_cpp_SOURCES += \
  608. incrementer/incrementer_kernels_opencl.c
  609. endif
  610. #######################
  611. # Incrementer example #
  612. #######################
  613. incrementer_incrementer_SOURCES = \
  614. incrementer/incrementer.c
  615. if STARPU_USE_CUDA
  616. incrementer_incrementer_SOURCES += \
  617. incrementer/incrementer_kernels.cu
  618. endif
  619. if STARPU_USE_OPENCL
  620. incrementer_incrementer_SOURCES += \
  621. incrementer/incrementer_kernels_opencl.c
  622. nobase_STARPU_OPENCL_DATA_DATA += \
  623. incrementer/incrementer_kernels_opencl_kernel.cl
  624. endif
  625. ##################
  626. # Binary example #
  627. ##################
  628. binary_binary_SOURCES = \
  629. binary/binary.c
  630. if STARPU_USE_OPENCL
  631. binary_binary_SOURCES += \
  632. incrementer/incrementer_kernels_opencl.c
  633. endif
  634. #####################
  635. # interface example #
  636. #####################
  637. interface_complex_SOURCES = \
  638. interface/complex.c \
  639. interface/complex_interface.c
  640. if STARPU_USE_CUDA
  641. interface_complex_SOURCES += \
  642. interface/complex_kernels.cu
  643. interface/complex_kernels.o: interface/complex_kernels.cu
  644. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  645. endif
  646. if STARPU_USE_OPENCL
  647. interface_complex_SOURCES +=\
  648. interface/complex_kernels_opencl.c
  649. nobase_STARPU_OPENCL_DATA_DATA += \
  650. interface/complex_kernels.cl
  651. endif
  652. ######################
  653. # matVecMult example #
  654. ######################
  655. if STARPU_USE_OPENCL
  656. nobase_STARPU_OPENCL_DATA_DATA += \
  657. matvecmult/matvecmult_kernel.cl
  658. endif
  659. #######################
  660. # dot_product example #
  661. #######################
  662. reductions_dot_product_SOURCES = \
  663. reductions/dot_product.c
  664. if STARPU_USE_CUDA
  665. reductions_dot_product_SOURCES += \
  666. reductions/dot_product_kernels.cu
  667. reductions/dot_product_kernels.o: reductions/dot_product_kernels.cu
  668. $(NVCC) $< -c -o $@ $(NVCCFLAGS) -arch sm_13
  669. endif
  670. if STARPU_USE_OPENCL
  671. nobase_STARPU_OPENCL_DATA_DATA += \
  672. reductions/dot_product_opencl_kernels.cl
  673. endif
  674. ##################
  675. # Mandelbrot Set #
  676. ##################
  677. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  678. if HAVE_X11
  679. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  680. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11
  681. endif
  682. ################
  683. # Top Examples #
  684. ################
  685. examplebin_PROGRAMS += \
  686. top/hello_world_top
  687. top_hello_world_top_SOURCES = \
  688. top/hello_world_top.c
  689. ######
  690. # Pi #
  691. ######
  692. check_PROGRAMS += \
  693. pi/pi \
  694. pi/pi_redux
  695. examplebin_PROGRAMS += \
  696. pi/pi \
  697. pi/pi_redux
  698. pi_pi_SOURCES = \
  699. pi/pi.c \
  700. pi/SobolQRNG/sobol_gold.c \
  701. pi/SobolQRNG/sobol_primitives.c
  702. if STARPU_USE_CUDA
  703. pi_pi_SOURCES += \
  704. pi/pi_kernel.cu \
  705. pi/SobolQRNG/sobol_gpu.cu
  706. endif
  707. pi_pi_redux_SOURCES = \
  708. pi/pi_redux.c
  709. if STARPU_USE_CUDA
  710. pi_pi_redux_SOURCES += \
  711. pi/pi_redux_kernel.cu
  712. pi_pi_redux_LDADD = \
  713. $(STARPU_CURAND_LDFLAGS)
  714. endif
  715. ###########################
  716. # OpenGL interoperability #
  717. ###########################
  718. if HAVE_OPENGL
  719. examplebin_PROGRAMS += \
  720. gl_interop/gl_interop \
  721. gl_interop/gl_interop_idle
  722. gl_interop_gl_interop_SOURCES = \
  723. gl_interop/gl_interop.c
  724. gl_interop_gl_interop_LDADD = \
  725. $(STARPU_OPENGL_RENDER_LDFLAGS)
  726. gl_interop_gl_interop_idle_SOURCES = \
  727. gl_interop/gl_interop_idle.c
  728. gl_interop_gl_interop_idle_LDADD = \
  729. $(STARPU_OPENGL_RENDER_LDFLAGS)
  730. endif
  731. ####################
  732. # pipeline example #
  733. ####################
  734. if !NO_BLAS_LIB
  735. pipeline_pipeline_SOURCES = \
  736. pipeline/pipeline.c \
  737. common/blas.c
  738. pipeline_pipeline_LDADD = \
  739. $(STARPU_BLAS_LDFLAGS)
  740. endif
  741. ##################
  742. # openmp example #
  743. ##################
  744. if !STARPU_HAVE_WINDOWS
  745. examplebin_PROGRAMS += \
  746. openmp/vector_scal_omp
  747. openmp_vector_scal_omp_CFLAGS = \
  748. $(AM_CFLAGS) -fopenmp
  749. sched_ctx_parallel_code_CFLAGS = \
  750. $(AM_CFLAGS) -fopenmp
  751. endif
  752. showcheck:
  753. -cat $(TEST_LOGS) /dev/null
  754. for i in $(SUBDIRS) ; do \
  755. make -C $$i showcheck ; \
  756. done