Makefile.am 21 KB

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