Makefile.am 21 KB

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