Makefile.am 20 KB

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