Makefile.am 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  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. examplebin_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. examplebin_PROGRAMS += \
  122. basic_examples/vector_scal_fortran
  123. endif
  124. if !NO_BLAS_LIB
  125. examplebin_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. examplebin_PROGRAMS += \
  142. spmv/dw_block_spmv
  143. endif
  144. check_PROGRAMS += $(examplebin_PROGRAMS)
  145. ##################
  146. # Basic examples #
  147. ##################
  148. basic_examples_vector_scal_SOURCES = \
  149. basic_examples/vector_scal.c \
  150. basic_examples/vector_scal_cpu.c
  151. if STARPU_USE_CUDA
  152. basic_examples_vector_scal_SOURCES += \
  153. basic_examples/vector_scal_cuda.cu
  154. endif
  155. if STARPU_USE_OPENCL
  156. basic_examples_vector_scal_SOURCES += \
  157. basic_examples/vector_scal_opencl.c
  158. nobase_STARPU_OPENCL_DATA_DATA += \
  159. basic_examples/vector_scal_opencl_kernel.cl
  160. endif
  161. if STARPU_HAVE_F77_H
  162. basic_examples_vector_scal_fortran_SOURCES = \
  163. basic_examples/vector_scal_fortran.F \
  164. basic_examples/vector_scal_c.c \
  165. basic_examples/vector_scal_cpu.c
  166. if STARPU_USE_CUDA
  167. basic_examples_vector_scal_fortran_SOURCES += \
  168. basic_examples/vector_scal_cuda.cu
  169. basic_examples_vector_scal_fortran_LDADD = \
  170. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  171. endif
  172. endif
  173. #################
  174. # block example #
  175. #################
  176. basic_examples_block_SOURCES = \
  177. basic_examples/block.c \
  178. basic_examples/block_cpu.c
  179. if STARPU_USE_CUDA
  180. basic_examples_block_SOURCES += \
  181. basic_examples/block_cuda.cu
  182. endif
  183. if STARPU_USE_OPENCL
  184. basic_examples_block_SOURCES += \
  185. basic_examples/block_opencl.c
  186. nobase_STARPU_OPENCL_DATA_DATA += \
  187. basic_examples/block_opencl_kernel.cl
  188. endif
  189. ####################
  190. # Variable example #
  191. ####################
  192. basic_examples_variable_SOURCES = \
  193. basic_examples/variable.c \
  194. basic_examples/variable_kernels_cpu.c
  195. if STARPU_USE_CUDA
  196. basic_examples_variable_SOURCES += \
  197. basic_examples/variable_kernels.cu
  198. endif
  199. if STARPU_USE_OPENCL
  200. basic_examples_variable_SOURCES += \
  201. basic_examples/variable_kernels_opencl.c
  202. nobase_STARPU_OPENCL_DATA_DATA += \
  203. basic_examples/variable_kernels_opencl_kernel.cl
  204. endif
  205. ###########
  206. # Filters #
  207. ###########
  208. filters_fblock_SOURCES = \
  209. filters/fblock.c \
  210. filters/fblock_cpu.c
  211. if STARPU_USE_CUDA
  212. filters_fblock_SOURCES += \
  213. filters/fblock_cuda.cu
  214. endif
  215. if STARPU_USE_OPENCL
  216. filters_fblock_SOURCES += \
  217. filters/fblock_opencl.c
  218. nobase_STARPU_OPENCL_DATA_DATA += \
  219. filters/fblock_opencl_kernel.cl
  220. endif
  221. ###################
  222. # PPM downscaling #
  223. ###################
  224. examplebin_PROGRAMS += \
  225. ppm_downscaler/ppm_downscaler \
  226. ppm_downscaler/yuv_downscaler
  227. ################
  228. # AXPY example #
  229. ################
  230. if !NO_BLAS_LIB
  231. axpy_axpy_SOURCES = \
  232. axpy/axpy.c \
  233. common/blas.c
  234. axpy_axpy_LDADD = \
  235. $(STARPU_BLAS_LDFLAGS)
  236. endif
  237. ################
  238. # Mult example #
  239. ################
  240. if !NO_BLAS_LIB
  241. mult_sgemm_SOURCES = \
  242. mult/sgemm.c \
  243. common/blas.c
  244. mult_sgemm_LDADD = \
  245. $(STARPU_BLAS_LDFLAGS)
  246. mult_dgemm_SOURCES = \
  247. mult/dgemm.c \
  248. common/blas.c
  249. mult_dgemm_LDADD = \
  250. $(STARPU_BLAS_LDFLAGS)
  251. endif
  252. ####################
  253. # Cholesky example #
  254. ####################
  255. if !NO_BLAS_LIB
  256. cholesky_cholesky_tag_SOURCES = \
  257. cholesky/cholesky_tag.c \
  258. cholesky/cholesky_models.c \
  259. cholesky/cholesky_kernels.c \
  260. common/blas.c
  261. cholesky_cholesky_tag_LDADD = \
  262. $(STARPU_BLAS_LDFLAGS)
  263. cholesky_cholesky_tile_tag_SOURCES = \
  264. cholesky/cholesky_tile_tag.c \
  265. cholesky/cholesky_models.c \
  266. cholesky/cholesky_kernels.c \
  267. common/blas.c
  268. cholesky_cholesky_tile_tag_LDADD = \
  269. $(STARPU_BLAS_LDFLAGS)
  270. cholesky_cholesky_grain_tag_SOURCES = \
  271. cholesky/cholesky_grain_tag.c \
  272. cholesky/cholesky_models.c \
  273. cholesky/cholesky_kernels.c \
  274. common/blas.c
  275. cholesky_cholesky_grain_tag_LDADD = \
  276. $(STARPU_BLAS_LDFLAGS)
  277. cholesky_cholesky_implicit_SOURCES = \
  278. cholesky/cholesky_implicit.c \
  279. cholesky/cholesky_models.c \
  280. cholesky/cholesky_kernels.c \
  281. common/blas.c
  282. cholesky_cholesky_implicit_LDADD = \
  283. $(STARPU_BLAS_LDFLAGS)
  284. endif
  285. ##############
  286. # LU example #
  287. ##############
  288. if !NO_BLAS_LIB
  289. lu_lu_example_float_SOURCES = \
  290. lu/lu_example_float.c \
  291. lu/slu.c \
  292. lu/slu_pivot.c \
  293. lu/slu_kernels.c \
  294. common/blas.c
  295. lu_lu_example_float_LDADD = \
  296. $(STARPU_BLAS_LDFLAGS)
  297. lu_lu_example_double_SOURCES = \
  298. lu/lu_example_double.c \
  299. lu/dlu.c \
  300. lu/dlu_pivot.c \
  301. lu/dlu_kernels.c \
  302. common/blas.c
  303. lu_lu_example_double_LDADD = \
  304. $(STARPU_BLAS_LDFLAGS)
  305. lu_lu_implicit_example_float_SOURCES = \
  306. lu/lu_example_float.c \
  307. lu/slu_implicit.c \
  308. lu/slu_implicit_pivot.c \
  309. lu/slu_kernels.c \
  310. common/blas.c
  311. lu_lu_implicit_example_float_LDADD = \
  312. $(STARPU_BLAS_LDFLAGS)
  313. lu_lu_implicit_example_double_SOURCES = \
  314. lu/lu_example_double.c \
  315. lu/dlu_implicit.c \
  316. lu/dlu_implicit_pivot.c \
  317. lu/dlu_kernels.c \
  318. common/blas.c
  319. lu_lu_implicit_example_double_LDADD = \
  320. $(STARPU_BLAS_LDFLAGS)
  321. endif
  322. ################
  323. # Heat example #
  324. ################
  325. if !NO_BLAS_LIB
  326. heat_heat_SOURCES = \
  327. heat/heat.c \
  328. heat/dw_factolu.c \
  329. heat/dw_factolu_tag.c \
  330. heat/dw_factolu_grain.c \
  331. heat/dw_sparse_cg.c \
  332. heat/heat_display.c \
  333. heat/lu_kernels_model.c \
  334. heat/dw_sparse_cg_kernels.c \
  335. heat/dw_factolu_kernels.c \
  336. common/blas.c
  337. heat_heat_LDADD = \
  338. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  339. $(STARPU_BLAS_LDFLAGS)
  340. endif
  341. ##############
  342. # CG example #
  343. ##############
  344. if !NO_BLAS_LIB
  345. cg_cg_SOURCES = \
  346. cg/cg.c \
  347. cg/cg_kernels.c \
  348. common/blas.c
  349. if STARPU_USE_CUDA
  350. cg_cg_SOURCES += \
  351. cg/cg_dot_kernel.cu
  352. endif
  353. cg_cg_LDADD = \
  354. $(STARPU_BLAS_LDFLAGS)
  355. endif
  356. ################
  357. # SpMV example #
  358. ################
  359. spmv_spmv_SOURCES = \
  360. spmv/spmv.c \
  361. spmv/spmv_kernels.c
  362. if STARPU_USE_CUDA
  363. spmv_spmv_SOURCES += \
  364. spmv/spmv_cuda.cu
  365. endif
  366. if ATLAS_BLAS_LIB
  367. spmv_dw_block_spmv_SOURCES = \
  368. spmv/dw_block_spmv.c \
  369. spmv/dw_block_spmv_kernels.c \
  370. spmv/matrix_market/mm_to_bcsr.c \
  371. spmv/matrix_market/mmio.c
  372. spmv_dw_block_spmv_LDADD = \
  373. $(STARPU_BLAS_LDFLAGS)
  374. endif
  375. #######################
  376. # Incrementer example #
  377. #######################
  378. incrementer_incrementer_SOURCES = \
  379. incrementer/incrementer.c
  380. if STARPU_USE_CUDA
  381. incrementer_incrementer_SOURCES += \
  382. incrementer/incrementer_kernels.cu
  383. endif
  384. if STARPU_USE_OPENCL
  385. incrementer_incrementer_SOURCES += \
  386. incrementer/incrementer_kernels_opencl.c
  387. nobase_STARPU_OPENCL_DATA_DATA += \
  388. incrementer/incrementer_kernels_opencl_kernel.cl
  389. endif
  390. ######################
  391. # matVecMult example #
  392. ######################
  393. if STARPU_USE_OPENCL
  394. nobase_STARPU_OPENCL_DATA_DATA += \
  395. matvecmult/matvecmult_kernel.cl
  396. endif
  397. #######################
  398. # dot_product example #
  399. #######################
  400. reductions_dot_product_SOURCES = \
  401. reductions/dot_product.c
  402. if STARPU_USE_CUDA
  403. reductions_dot_product_SOURCES += \
  404. reductions/dot_product_kernels.cu
  405. endif
  406. ##################
  407. # Mandelbrot Set #
  408. ##################
  409. examplebin_PROGRAMS += \
  410. mandelbrot/mandelbrot
  411. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  412. if HAVE_X11
  413. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  414. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS)
  415. endif