Makefile.am 21 KB

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