Makefile.am 20 KB

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