Makefile.am 12 KB

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