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