Makefile.am 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009, 2010-2011 Université de Bordeaux 1
  4. # Copyright (C) 2010, 2011 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 $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
  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. AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS)
  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. spmv/spmv_opencl.cl \
  36. gordon/null_kernel_gordon.c \
  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. CLEANFILES = \
  50. gordon/null_kernel_gordon.spuelf
  51. CLEANFILES += *.gcno *.gcda *.linkinfo
  52. if STARPU_USE_CUDA
  53. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/ $(HWLOC_CFLAGS) -arch sm_13
  54. .cu.o:
  55. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  56. endif
  57. if STARPU_USE_GORDON
  58. SPU_CC ?= spu-gcc
  59. SPU_LD ?= spu-ld
  60. SPULDFLAGS =
  61. SPULIBS = -lblas #-lc -lgloss -lc
  62. .c.spuo:
  63. $(MKDIR_P) `dirname $@`
  64. $(SPU_CC) -c -fpic $< -o $@
  65. .spuo.spuelf:
  66. $(MKDIR_P) `dirname $@`
  67. $(SPU_LD) $(SPULDFLAGS) $< -o $@ $(SPULIBS)
  68. BUILT_SOURCES += \
  69. gordon/null_kernel_gordon.spuelf
  70. endif
  71. examplebindir = $(libdir)/starpu/examples/
  72. examplebin_PROGRAMS =
  73. noinst_HEADERS = \
  74. cg/cg.h \
  75. heat/lu_kernels_model.h \
  76. heat/dw_sparse_cg.h \
  77. heat/heat.h \
  78. heat/dw_factolu.h \
  79. lu/xlu.h \
  80. lu/xlu_kernels.h \
  81. lu/float.h \
  82. lu/double.h \
  83. cholesky/cholesky.h \
  84. common/blas_model.h \
  85. common/blas.h \
  86. mult/simple.h \
  87. mult/double.h \
  88. gordon/null.h \
  89. fortran/bindings/StarPU_fortran.h \
  90. ppm_downscaler/ppm_downscaler.h \
  91. ppm_downscaler/yuv_downscaler.h \
  92. spmv/matrix_market/mmio.h \
  93. spmv/matrix_market/mm_to_bcsr.h \
  94. spmv/spmv.h \
  95. spmv/dw_block_spmv.h
  96. check_PROGRAMS += \
  97. basic_examples/hello_world \
  98. basic_examples/vector_scal \
  99. basic_examples/mult \
  100. basic_examples/block \
  101. basic_examples/variable \
  102. filters/fvector \
  103. filters/fblock \
  104. filters/fmatrix \
  105. tag_example/tag_example \
  106. tag_example/tag_example3 \
  107. tag_example/tag_example2 \
  108. tag_example/tag_restartable \
  109. spmv/spmv \
  110. callback/callback \
  111. incrementer/incrementer \
  112. matvecmult/matvecmult \
  113. profiling/profiling \
  114. scheduler/dummy_sched \
  115. reductions/dot_product \
  116. reductions/minmax_reduction
  117. # mandelbrot/mandelbrot
  118. # ppm_downscaler/ppm_downscaler
  119. # ppm_downscaler/yuv_downscaler
  120. if STARPU_HAVE_F77_H
  121. check_PROGRAMS += \
  122. basic_examples/vector_scal_fortran
  123. endif
  124. if !NO_BLAS_LIB
  125. check_PROGRAMS += \
  126. axpy/axpy \
  127. mult/sgemm \
  128. mult/dgemm \
  129. cholesky/cholesky_tag \
  130. cholesky/cholesky_tile_tag \
  131. cholesky/cholesky_grain_tag \
  132. cholesky/cholesky_implicit \
  133. lu/lu_example_float \
  134. lu/lu_example_double \
  135. lu/lu_implicit_example_float \
  136. lu/lu_implicit_example_double \
  137. heat/heat \
  138. cg/cg
  139. endif
  140. if ATLAS_BLAS_LIB
  141. check_PROGRAMS += \
  142. spmv/dw_block_spmv
  143. endif
  144. examplebin_PROGRAMS += \
  145. $(check_PROGRAMS)
  146. ##################
  147. # Basic examples #
  148. ##################
  149. basic_examples_vector_scal_SOURCES = \
  150. basic_examples/vector_scal.c \
  151. basic_examples/vector_scal_cpu.c
  152. if STARPU_USE_CUDA
  153. basic_examples_vector_scal_SOURCES += \
  154. basic_examples/vector_scal_cuda.cu
  155. endif
  156. if STARPU_USE_OPENCL
  157. basic_examples_vector_scal_SOURCES += \
  158. basic_examples/vector_scal_opencl.c
  159. nobase_STARPU_OPENCL_DATA_DATA += \
  160. basic_examples/vector_scal_opencl_kernel.cl
  161. endif
  162. if STARPU_HAVE_F77_H
  163. basic_examples_vector_scal_fortran_SOURCES = \
  164. basic_examples/vector_scal_fortran.F \
  165. basic_examples/vector_scal_c.c \
  166. basic_examples/vector_scal_cpu.c
  167. if STARPU_USE_CUDA
  168. basic_examples_vector_scal_fortran_SOURCES += \
  169. basic_examples/vector_scal_cuda.cu
  170. basic_examples_vector_scal_fortran_LDADD = \
  171. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  172. endif
  173. endif
  174. #################
  175. # block example #
  176. #################
  177. basic_examples_block_SOURCES = \
  178. basic_examples/block.c \
  179. basic_examples/block_cpu.c
  180. if STARPU_USE_CUDA
  181. basic_examples_block_SOURCES += \
  182. basic_examples/block_cuda.cu
  183. endif
  184. if STARPU_USE_OPENCL
  185. basic_examples_block_SOURCES += \
  186. basic_examples/block_opencl.c
  187. nobase_STARPU_OPENCL_DATA_DATA += \
  188. basic_examples/block_opencl_kernel.cl
  189. endif
  190. ####################
  191. # Variable example #
  192. ####################
  193. basic_examples_variable_SOURCES = \
  194. basic_examples/variable.c \
  195. basic_examples/variable_kernels_cpu.c
  196. if STARPU_USE_CUDA
  197. basic_examples_variable_SOURCES += \
  198. basic_examples/variable_kernels.cu
  199. endif
  200. if STARPU_USE_OPENCL
  201. basic_examples_variable_SOURCES += \
  202. basic_examples/variable_kernels_opencl.c
  203. nobase_STARPU_OPENCL_DATA_DATA += \
  204. basic_examples/variable_kernels_opencl_kernel.cl
  205. endif
  206. ###########
  207. # Filters #
  208. ###########
  209. filters_fblock_SOURCES = \
  210. filters/fblock.c \
  211. filters/fblock_cpu.c
  212. if STARPU_USE_CUDA
  213. filters_fblock_SOURCES += \
  214. filters/fblock_cuda.cu
  215. endif
  216. if STARPU_USE_OPENCL
  217. filters_fblock_SOURCES += \
  218. filters/fblock_opencl.c
  219. nobase_STARPU_OPENCL_DATA_DATA += \
  220. filters/fblock_opencl_kernel.cl
  221. endif
  222. ###################
  223. # PPM downscaling #
  224. ###################
  225. examplebin_PROGRAMS += \
  226. ppm_downscaler/ppm_downscaler \
  227. ppm_downscaler/yuv_downscaler
  228. ################
  229. # AXPY example #
  230. ################
  231. if !NO_BLAS_LIB
  232. axpy_axpy_SOURCES = \
  233. axpy/axpy.c \
  234. common/blas.c
  235. axpy_axpy_LDADD = \
  236. $(STARPU_BLAS_LDFLAGS)
  237. endif
  238. ################
  239. # Mult example #
  240. ################
  241. if !NO_BLAS_LIB
  242. mult_sgemm_SOURCES = \
  243. mult/sgemm.c \
  244. common/blas.c
  245. mult_sgemm_LDADD = \
  246. $(STARPU_BLAS_LDFLAGS)
  247. mult_dgemm_SOURCES = \
  248. mult/dgemm.c \
  249. common/blas.c
  250. mult_dgemm_LDADD = \
  251. $(STARPU_BLAS_LDFLAGS)
  252. endif
  253. ####################
  254. # Cholesky example #
  255. ####################
  256. if !NO_BLAS_LIB
  257. cholesky_cholesky_tag_SOURCES = \
  258. cholesky/cholesky_tag.c \
  259. cholesky/cholesky_models.c \
  260. cholesky/cholesky_kernels.c \
  261. common/blas.c
  262. cholesky_cholesky_tag_LDADD = \
  263. $(STARPU_BLAS_LDFLAGS)
  264. cholesky_cholesky_tile_tag_SOURCES = \
  265. cholesky/cholesky_tile_tag.c \
  266. cholesky/cholesky_models.c \
  267. cholesky/cholesky_kernels.c \
  268. common/blas.c
  269. cholesky_cholesky_tile_tag_LDADD = \
  270. $(STARPU_BLAS_LDFLAGS)
  271. cholesky_cholesky_grain_tag_SOURCES = \
  272. cholesky/cholesky_grain_tag.c \
  273. cholesky/cholesky_models.c \
  274. cholesky/cholesky_kernels.c \
  275. common/blas.c
  276. cholesky_cholesky_grain_tag_LDADD = \
  277. $(STARPU_BLAS_LDFLAGS)
  278. cholesky_cholesky_implicit_SOURCES = \
  279. cholesky/cholesky_implicit.c \
  280. cholesky/cholesky_models.c \
  281. cholesky/cholesky_kernels.c \
  282. common/blas.c
  283. cholesky_cholesky_implicit_LDADD = \
  284. $(STARPU_BLAS_LDFLAGS)
  285. endif
  286. ##############
  287. # LU example #
  288. ##############
  289. if !NO_BLAS_LIB
  290. lu_lu_example_float_SOURCES = \
  291. lu/lu_example_float.c \
  292. lu/slu.c \
  293. lu/slu_pivot.c \
  294. lu/slu_kernels.c \
  295. common/blas.c
  296. lu_lu_example_float_LDADD = \
  297. $(STARPU_BLAS_LDFLAGS)
  298. lu_lu_example_double_SOURCES = \
  299. lu/lu_example_double.c \
  300. lu/dlu.c \
  301. lu/dlu_pivot.c \
  302. lu/dlu_kernels.c \
  303. common/blas.c
  304. lu_lu_example_double_LDADD = \
  305. $(STARPU_BLAS_LDFLAGS)
  306. lu_lu_implicit_example_float_SOURCES = \
  307. lu/lu_example_float.c \
  308. lu/slu_implicit.c \
  309. lu/slu_implicit_pivot.c \
  310. lu/slu_kernels.c \
  311. common/blas.c
  312. lu_lu_implicit_example_float_LDADD = \
  313. $(STARPU_BLAS_LDFLAGS)
  314. lu_lu_implicit_example_double_SOURCES = \
  315. lu/lu_example_double.c \
  316. lu/dlu_implicit.c \
  317. lu/dlu_implicit_pivot.c \
  318. lu/dlu_kernels.c \
  319. common/blas.c
  320. lu_lu_implicit_example_double_LDADD = \
  321. $(STARPU_BLAS_LDFLAGS)
  322. endif
  323. ################
  324. # Heat example #
  325. ################
  326. if !NO_BLAS_LIB
  327. heat_heat_SOURCES = \
  328. heat/heat.c \
  329. heat/dw_factolu.c \
  330. heat/dw_factolu_tag.c \
  331. heat/dw_factolu_grain.c \
  332. heat/dw_sparse_cg.c \
  333. heat/heat_display.c \
  334. heat/lu_kernels_model.c \
  335. heat/dw_sparse_cg_kernels.c \
  336. heat/dw_factolu_kernels.c \
  337. common/blas.c
  338. heat_heat_LDADD = \
  339. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  340. $(STARPU_BLAS_LDFLAGS)
  341. endif
  342. ##############
  343. # CG example #
  344. ##############
  345. if !NO_BLAS_LIB
  346. cg_cg_SOURCES = \
  347. cg/cg.c \
  348. cg/cg_kernels.c \
  349. common/blas.c
  350. if STARPU_USE_CUDA
  351. cg_cg_SOURCES += \
  352. cg/cg_dot_kernel.cu
  353. endif
  354. cg_cg_LDADD = \
  355. $(STARPU_BLAS_LDFLAGS)
  356. endif
  357. ################
  358. # SpMV example #
  359. ################
  360. spmv_spmv_SOURCES = \
  361. spmv/spmv.c \
  362. spmv/spmv_kernels.c
  363. if STARPU_USE_CUDA
  364. spmv_spmv_SOURCES += \
  365. spmv/spmv_cuda.cu
  366. endif
  367. if ATLAS_BLAS_LIB
  368. spmv_dw_block_spmv_SOURCES = \
  369. spmv/dw_block_spmv.c \
  370. spmv/dw_block_spmv_kernels.c \
  371. spmv/matrix_market/mm_to_bcsr.c \
  372. spmv/matrix_market/mmio.c
  373. spmv_dw_block_spmv_LDADD = \
  374. $(STARPU_BLAS_LDFLAGS)
  375. endif
  376. #######################
  377. # Incrementer example #
  378. #######################
  379. incrementer_incrementer_SOURCES = \
  380. incrementer/incrementer.c
  381. if STARPU_USE_CUDA
  382. incrementer_incrementer_SOURCES += \
  383. incrementer/incrementer_kernels.cu
  384. endif
  385. if STARPU_USE_OPENCL
  386. incrementer_incrementer_SOURCES += \
  387. incrementer/incrementer_kernels_opencl.c
  388. nobase_STARPU_OPENCL_DATA_DATA += \
  389. incrementer/incrementer_kernels_opencl_kernel.cl
  390. endif
  391. ######################
  392. # matVecMult example #
  393. ######################
  394. if STARPU_USE_OPENCL
  395. nobase_STARPU_OPENCL_DATA_DATA += \
  396. matvecmult/matvecmult_kernel.cl
  397. endif
  398. #######################
  399. # dot_product example #
  400. #######################
  401. reductions_dot_product_SOURCES = \
  402. reductions/dot_product.c
  403. if STARPU_USE_CUDA
  404. reductions_dot_product_SOURCES += \
  405. reductions/dot_product_kernels.cu
  406. endif
  407. ##################
  408. # Mandelbrot Set #
  409. ##################
  410. examplebin_PROGRAMS += \
  411. mandelbrot/mandelbrot
  412. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  413. if HAVE_X11
  414. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  415. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS)
  416. endif