Makefile.am 21 KB

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