Makefile.am 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009, 2010 Université de Bordeaux 1
  4. # Copyright (C) 2010 Centre National de la Recherche Scientifique
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. AUTOMAKE_OPTIONS = subdir-objects
  17. AM_CFLAGS = $(HWLOC_CFLAGS) -Wall
  18. LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
  19. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  20. TESTS = $(check_PROGRAMS)
  21. SUBDIRS = stencil
  22. if STARPU_HAVE_FFTW
  23. if STARPU_HAVE_FFTWL
  24. SUBDIRS += starpufft
  25. endif
  26. endif
  27. check_PROGRAMS =
  28. BUILT_SOURCES =
  29. if STARPU_USE_OPENCL
  30. nobase_STARPU_OPENCL_DATA_DATA =
  31. endif
  32. EXTRA_DIST = \
  33. basic_examples/vector_scal_opencl_kernel.cl \
  34. spmv/spmv_cuda.cu \
  35. gordon/null_kernel_gordon.c \
  36. mult/xgemm.c \
  37. lu/xlu.c \
  38. lu/xlu_pivot.c \
  39. lu/xlu_implicit.c \
  40. lu/xlu_implicit_pivot.c \
  41. lu/xlu_kernels.c \
  42. lu/lu_example.c \
  43. cholesky_and_lu/cholesky_and_lu.c \
  44. cholesky_and_lu_without_sched_ctx/cholesky_and_lu_without_sched_ctx.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. CLEANFILES = \
  51. gordon/null_kernel_gordon.spuelf
  52. CLEANFILES += *.gcno *.gcda *.linkinfo
  53. if STARPU_USE_CUDA
  54. NVCCFLAGS += --compiler-options -fno-strict-aliasing $(HWLOC_CFLAGS) -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/ -arch sm_13
  55. .cu.o:
  56. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  57. endif
  58. if STARPU_USE_GORDON
  59. SPU_CC ?= spu-gcc
  60. SPU_LD ?= spu-ld
  61. SPULDFLAGS =
  62. SPULIBS = -lblas #-lc -lgloss -lc
  63. .c.spuo:
  64. $(MKDIR_P) `dirname $@`
  65. $(SPU_CC) -c -fpic $< -o $@
  66. .spuo.spuelf:
  67. $(MKDIR_P) `dirname $@`
  68. $(SPU_LD) $(SPULDFLAGS) $< -o $@ $(SPULIBS)
  69. BUILT_SOURCES += \
  70. gordon/null_kernel_gordon.spuelf
  71. endif
  72. examplebindir = $(libdir)/starpu/examples/
  73. examplebin_PROGRAMS =
  74. noinst_HEADERS = \
  75. cg/cg.h \
  76. heat/lu_kernels_model.h \
  77. heat/dw_sparse_cg.h \
  78. heat/heat.h \
  79. heat/dw_factolu.h \
  80. lu/xlu.h \
  81. lu/xlu_kernels.h \
  82. lu/float.h \
  83. lu/double.h \
  84. pi/pi.h \
  85. pi/SobolQRNG/sobol.h \
  86. pi/SobolQRNG/sobol_gold.h \
  87. pi/SobolQRNG/sobol_gpu.h \
  88. pi/SobolQRNG/sobol_primitives.h \
  89. cholesky/cholesky.h \
  90. common/blas_model.h \
  91. common/blas.h \
  92. mult/simple.h \
  93. mult/double.h \
  94. gordon/null.h \
  95. fortran/bindings/StarPU_fortran.h \
  96. ppm_downscaler/ppm_downscaler.h \
  97. ppm_downscaler/yuv_downscaler.h \
  98. spmv/matrix_market/mmio.h \
  99. spmv/matrix_market/mm_to_bcsr.h \
  100. spmv/dw_spmv.h \
  101. spmv/dw_block_spmv.h
  102. ##################
  103. # Basic examples #
  104. ##################
  105. examplebin_PROGRAMS += \
  106. basic_examples/hello_world
  107. basic_examples_hello_world_SOURCES = \
  108. basic_examples/hello_world.c
  109. examplebin_PROGRAMS += \
  110. basic_examples/vector_scal
  111. basic_examples_vector_scal_SOURCES = \
  112. basic_examples/vector_scal.c \
  113. basic_examples/vector_scal_cpu.c
  114. if STARPU_USE_CUDA
  115. basic_examples_vector_scal_SOURCES += \
  116. basic_examples/vector_scal_cuda.cu
  117. endif
  118. if STARPU_USE_OPENCL
  119. basic_examples_vector_scal_SOURCES += \
  120. basic_examples/vector_scal_opencl.c
  121. nobase_STARPU_OPENCL_DATA_DATA += \
  122. basic_examples/vector_scal_opencl_kernel.cl
  123. endif
  124. if STARPU_HAVE_F77_H
  125. examplebin_PROGRAMS += \
  126. basic_examples/vector_scal_fortran
  127. basic_examples_vector_scal_fortran_SOURCES = \
  128. basic_examples/vector_scal_fortran.F \
  129. basic_examples/vector_scal_c.c \
  130. basic_examples/vector_scal_cpu.c
  131. if STARPU_USE_CUDA
  132. basic_examples_vector_scal_fortran_SOURCES += \
  133. basic_examples/vector_scal_cuda.cu
  134. endif
  135. endif
  136. examplebin_PROGRAMS += \
  137. basic_examples/mult
  138. basic_examples_mult_SOURCES = \
  139. basic_examples/mult.c
  140. #################
  141. # block example #
  142. #################
  143. check_PROGRAMS += \
  144. basic_examples/block
  145. examplebin_PROGRAMS += \
  146. basic_examples/block
  147. basic_examples_block_SOURCES = \
  148. basic_examples/block.c \
  149. basic_examples/block_cpu.c
  150. if STARPU_USE_CUDA
  151. basic_examples_block_SOURCES += \
  152. basic_examples/block_cuda.cu
  153. endif
  154. if STARPU_USE_OPENCL
  155. basic_examples_block_SOURCES += \
  156. basic_examples/block_opencl.c
  157. nobase_STARPU_OPENCL_DATA_DATA += \
  158. basic_examples/block_opencl_kernel.cl
  159. endif
  160. ####################
  161. # Variable example #
  162. ####################
  163. check_PROGRAMS += \
  164. basic_examples/variable
  165. examplebin_PROGRAMS += \
  166. basic_examples/variable
  167. basic_examples_variable_SOURCES = \
  168. basic_examples/variable.c \
  169. basic_examples/variable_kernels_cpu.c
  170. if STARPU_USE_CUDA
  171. basic_examples_variable_SOURCES += \
  172. basic_examples/variable_kernels.cu
  173. endif
  174. if STARPU_USE_OPENCL
  175. basic_examples_variable_SOURCES += \
  176. basic_examples/variable_kernels_opencl.c
  177. nobase_STARPU_OPENCL_DATA_DATA += \
  178. basic_examples/variable_kernels_opencl_kernel.cl
  179. endif
  180. ###########
  181. # Filters #
  182. ###########
  183. examplebin_PROGRAMS += \
  184. filters/fvector \
  185. filters/fblock \
  186. filters/fmatrix
  187. filters_fvector_SOURCES = \
  188. filters/fvector.c
  189. filters_fblock_SOURCES = \
  190. filters/fblock.c \
  191. filters/fblock_cpu.c
  192. if STARPU_USE_CUDA
  193. filters_fblock_SOURCES += \
  194. filters/fblock_cuda.cu
  195. endif
  196. if STARPU_USE_OPENCL
  197. filters_fblock_SOURCES += \
  198. filters/fblock_opencl.c
  199. nobase_STARPU_OPENCL_DATA_DATA += \
  200. filters/fblock_opencl_kernel.cl
  201. endif
  202. filters_fmatrix_SOURCES = \
  203. filters/fmatrix.c
  204. ###################
  205. # PPM downscaling #
  206. ###################
  207. examplebin_PROGRAMS += \
  208. ppm_downscaler/ppm_downscaler
  209. ppm_downscaler_ppm_downscaler_SOURCES = \
  210. ppm_downscaler/ppm_downscaler.c
  211. examplebin_PROGRAMS += \
  212. ppm_downscaler/yuv_downscaler
  213. ppm_downscaler_yuv_downscaler_SOURCES = \
  214. ppm_downscaler/yuv_downscaler.c
  215. ######
  216. # Pi #
  217. ######
  218. check_PROGRAMS += \
  219. pi/pi_redux
  220. examplebin_PROGRAMS += \
  221. pi/pi \
  222. pi/pi_redux
  223. pi_pi_SOURCES = \
  224. pi/pi.c \
  225. pi/SobolQRNG/sobol_gold.c \
  226. pi/SobolQRNG/sobol_primitives.c
  227. if STARPU_USE_CUDA
  228. pi_pi_SOURCES += \
  229. pi/pi_kernel.cu \
  230. pi/SobolQRNG/sobol_gpu.cu
  231. endif
  232. pi_pi_redux_SOURCES = \
  233. pi/pi_redux.c
  234. if STARPU_USE_CUDA
  235. pi_pi_redux_SOURCES += \
  236. pi/pi_redux_kernel.cu
  237. endif
  238. ################
  239. # AXPY example #
  240. ################
  241. if !NO_BLAS_LIB
  242. examplebin_PROGRAMS += \
  243. axpy/axpy
  244. axpy_axpy_SOURCES = \
  245. axpy/axpy.c \
  246. common/blas.c
  247. endif
  248. ################
  249. # Mult example #
  250. ################
  251. if !NO_BLAS_LIB
  252. examplebin_PROGRAMS += \
  253. mult/sgemm \
  254. mult/dgemm
  255. mult_sgemm_SOURCES = \
  256. mult/sgemm.c \
  257. common/blas.c
  258. mult_dgemm_SOURCES = \
  259. mult/dgemm.c \
  260. common/blas.c
  261. endif
  262. ####################
  263. # Cholesky example #
  264. ####################
  265. if !NO_BLAS_LIB
  266. examplebin_PROGRAMS += \
  267. cholesky/cholesky_tag \
  268. cholesky/cholesky_tile_tag \
  269. cholesky/cholesky_grain_tag \
  270. cholesky/cholesky_implicit
  271. cholesky_cholesky_tag_SOURCES = \
  272. cholesky/cholesky_tag.c \
  273. cholesky/cholesky_models.c \
  274. cholesky/cholesky_kernels.c \
  275. common/blas.c
  276. cholesky_cholesky_tile_tag_SOURCES = \
  277. cholesky/cholesky_tile_tag.c \
  278. cholesky/cholesky_models.c \
  279. cholesky/cholesky_kernels.c \
  280. common/blas.c
  281. cholesky_cholesky_grain_tag_SOURCES = \
  282. cholesky/cholesky_grain_tag.c \
  283. cholesky/cholesky_models.c \
  284. cholesky/cholesky_kernels.c \
  285. common/blas.c
  286. cholesky_cholesky_implicit_SOURCES = \
  287. cholesky/cholesky_implicit.c \
  288. cholesky/cholesky_models.c \
  289. cholesky/cholesky_kernels.c \
  290. common/blas.c
  291. endif
  292. ##############
  293. # LU example #
  294. ##############
  295. if !NO_BLAS_LIB
  296. check_PROGRAMS += \
  297. lu/lu_example_float \
  298. lu/lu_implicit_example_float
  299. examplebin_PROGRAMS += \
  300. lu/lu_example_float \
  301. lu/lu_example_double
  302. lu_lu_example_float_SOURCES = \
  303. lu/lu_example_float.c \
  304. lu/slu.c \
  305. lu/slu_pivot.c \
  306. lu/slu_kernels.c \
  307. common/blas.c
  308. lu_lu_example_double_SOURCES = \
  309. lu/lu_example_double.c \
  310. lu/dlu.c \
  311. lu/dlu_pivot.c \
  312. lu/dlu_kernels.c \
  313. common/blas.c
  314. examplebin_PROGRAMS += \
  315. lu/lu_implicit_example_float \
  316. lu/lu_implicit_example_double
  317. lu_lu_implicit_example_float_SOURCES = \
  318. lu/lu_example_float.c \
  319. lu/slu_implicit.c \
  320. lu/slu_implicit_pivot.c \
  321. lu/slu_kernels.c \
  322. common/blas.c
  323. lu_lu_implicit_example_double_SOURCES = \
  324. lu/lu_example_double.c \
  325. lu/dlu_implicit.c \
  326. lu/dlu_implicit_pivot.c \
  327. lu/dlu_kernels.c \
  328. common/blas.c
  329. endif
  330. ###########################
  331. # Cholesky and Lu example #
  332. ###########################
  333. if !NO_BLAS_LIB
  334. examplebin_PROGRAMS += \
  335. cholesky_and_lu/cholesky_and_lu
  336. cholesky_and_lu_cholesky_and_lu_SOURCES = \
  337. cholesky_and_lu/cholesky_and_lu.c \
  338. cholesky_and_lu/cholesky/cholesky_tile_tag.c \
  339. cholesky_and_lu/cholesky/cholesky_models.c \
  340. cholesky_and_lu/cholesky/cholesky_kernels.c \
  341. cholesky_and_lu/lu/slu.c \
  342. cholesky_and_lu/lu/slu_pivot.c \
  343. cholesky_and_lu/lu/slu_kernels.c \
  344. common/blas.c
  345. endif
  346. ###########################
  347. # Cholesky and Lu without sched ctx example #
  348. ###########################
  349. if !NO_BLAS_LIB
  350. examplebin_PROGRAMS += \
  351. cholesky_and_lu_without_sched_ctx/cholesky_and_lu_without_sched_ctx
  352. cholesky_and_lu_without_sched_ctx_cholesky_and_lu_without_sched_ctx_SOURCES = \
  353. cholesky_and_lu_without_sched_ctx/cholesky_and_lu_without_sched_ctx.c \
  354. cholesky_and_lu_without_sched_ctx/cholesky/cholesky_tile_tag.c \
  355. cholesky_and_lu_without_sched_ctx/cholesky/cholesky_models.c \
  356. cholesky_and_lu_without_sched_ctx/cholesky/cholesky_kernels.c \
  357. cholesky_and_lu_without_sched_ctx/lu/slu.c \
  358. cholesky_and_lu_without_sched_ctx/lu/slu_pivot.c \
  359. cholesky_and_lu_without_sched_ctx/lu/slu_kernels.c \
  360. common/blas.c
  361. endif
  362. ################
  363. # Heat example #
  364. ################
  365. if !NO_BLAS_LIB
  366. examplebin_PROGRAMS += heat/heat
  367. heat_heat_SOURCES = \
  368. heat/heat.c \
  369. heat/dw_factolu.c \
  370. heat/dw_factolu_tag.c \
  371. heat/dw_factolu_grain.c \
  372. heat/dw_sparse_cg.c \
  373. heat/heat_display.c \
  374. heat/lu_kernels_model.c \
  375. heat/dw_sparse_cg_kernels.c \
  376. heat/dw_factolu_kernels.c \
  377. common/blas.c
  378. endif
  379. ##############
  380. # CG example #
  381. ##############
  382. if !NO_BLAS_LIB
  383. examplebin_PROGRAMS += cg/cg
  384. cg_cg_SOURCES = \
  385. cg/cg.c \
  386. cg/cg_kernels.c \
  387. common/blas.c
  388. if STARPU_USE_CUDA
  389. cg_cg_SOURCES += \
  390. cg/cg_dot_kernel.cu
  391. endif
  392. endif
  393. ################
  394. # Tag examples #
  395. ################
  396. check_PROGRAMS += \
  397. tag_example/tag_example \
  398. tag_example/tag_example3 \
  399. tag_example/tag_example2 \
  400. tag_example/tag_restartable
  401. examplebin_PROGRAMS += \
  402. tag_example/tag_example \
  403. tag_example/tag_example3 \
  404. tag_example/tag_example2 \
  405. tag_example/tag_restartable
  406. tag_example_tag_example_SOURCES = \
  407. tag_example/tag_example.c
  408. tag_example_tag_example2_SOURCES = \
  409. tag_example/tag_example2.c
  410. tag_example_tag_example3_SOURCES = \
  411. tag_example/tag_example3.c
  412. tag_example_tag_restartable_SOURCES = \
  413. tag_example/tag_restartable.c
  414. ################
  415. # SpMV example #
  416. ################
  417. examplebin_PROGRAMS += \
  418. spmv/dw_spmv
  419. spmv_dw_spmv_SOURCES = \
  420. spmv/dw_spmv.c
  421. if STARPU_USE_CUDA
  422. spmv_dw_spmv_SOURCES += \
  423. spmv/spmv_cuda.cu
  424. endif
  425. if ATLAS_BLAS_LIB
  426. examplebin_PROGRAMS += \
  427. spmv/dw_block_spmv
  428. spmv_dw_block_spmv_SOURCES = \
  429. spmv/dw_block_spmv.c \
  430. spmv/dw_block_spmv_kernels.c \
  431. spmv/matrix_market/mm_to_bcsr.c \
  432. spmv/matrix_market/mmio.c
  433. endif
  434. #######################
  435. # Incrementer example #
  436. #######################
  437. check_PROGRAMS += \
  438. incrementer/incrementer
  439. examplebin_PROGRAMS += \
  440. incrementer/incrementer
  441. incrementer_incrementer_SOURCES = \
  442. incrementer/incrementer.c
  443. if STARPU_USE_CUDA
  444. incrementer_incrementer_SOURCES += \
  445. incrementer/incrementer_kernels.cu
  446. endif
  447. if STARPU_USE_OPENCL
  448. incrementer_incrementer_SOURCES += \
  449. incrementer/incrementer_kernels_opencl.c
  450. nobase_STARPU_OPENCL_DATA_DATA += \
  451. incrementer/incrementer_kernels_opencl_kernel.cl
  452. endif
  453. ######################
  454. # matVecMult example #
  455. ######################
  456. check_PROGRAMS += \
  457. matvecmult/matvecmult
  458. examplebin_PROGRAMS += \
  459. matvecmult/matvecmult
  460. matvecmult_matvecmult_SOURCES = \
  461. matvecmult/matvecmult.c
  462. if STARPU_USE_OPENCL
  463. nobase_STARPU_OPENCL_DATA_DATA += \
  464. matvecmult/matvecmult_kernel.cl
  465. endif
  466. #####################
  467. # profiling example #
  468. #####################
  469. check_PROGRAMS += \
  470. profiling/profiling
  471. examplebin_PROGRAMS += \
  472. profiling/profiling
  473. profiling_profiling_SOURCES = \
  474. profiling/profiling.c
  475. #####################
  476. # scheduler example #
  477. #####################
  478. check_PROGRAMS += \
  479. scheduler/dummy_sched
  480. examplebin_PROGRAMS += \
  481. scheduler/dummy_sched
  482. scheduler_dummy_sched_SOURCES = \
  483. scheduler/dummy_sched.c
  484. #######################
  485. # dot_product example #
  486. #######################
  487. check_PROGRAMS += \
  488. reductions/dot_product
  489. examplebin_PROGRAMS += \
  490. reductions/dot_product
  491. reductions_dot_product_SOURCES = \
  492. reductions/dot_product.c
  493. #####################
  494. # Min/Max reduction #
  495. #####################
  496. check_PROGRAMS += \
  497. reductions/minmax_reduction
  498. examplebin_PROGRAMS += \
  499. reductions/minmax_reduction
  500. reductions_minmax_reduction_SOURCES = \
  501. reductions/minmax_reduction.c
  502. ##################
  503. # Mandelbrot Set #
  504. ##################
  505. examplebin_PROGRAMS += \
  506. mandelbrot/mandelbrot
  507. mandelbrot_mandelbrot_SOURCES = \
  508. mandelbrot/mandelbrot.c