Makefile.am 20 KB

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