Makefile.am 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  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. #####################################
  97. # What to install and what to check #
  98. #####################################
  99. examplebin_PROGRAMS += \
  100. basic_examples/hello_world \
  101. basic_examples/vector_scal \
  102. basic_examples/mult \
  103. basic_examples/block \
  104. basic_examples/variable \
  105. filters/fvector \
  106. filters/fblock \
  107. filters/fmatrix \
  108. tag_example/tag_example \
  109. tag_example/tag_example3 \
  110. tag_example/tag_example2 \
  111. tag_example/tag_restartable \
  112. spmv/spmv \
  113. callback/callback \
  114. incrementer/incrementer \
  115. matvecmult/matvecmult \
  116. profiling/profiling \
  117. scheduler/dummy_sched \
  118. reductions/dot_product \
  119. reductions/minmax_reduction \
  120. mandelbrot/mandelbrot \
  121. ppm_downscaler/ppm_downscaler \
  122. ppm_downscaler/yuv_downscaler
  123. if STARPU_HAVE_F77_H
  124. examplebin_PROGRAMS += \
  125. basic_examples/vector_scal_fortran
  126. endif
  127. if !NO_BLAS_LIB
  128. examplebin_PROGRAMS += \
  129. axpy/axpy \
  130. mult/sgemm \
  131. mult/dgemm \
  132. cholesky/cholesky_tag \
  133. cholesky/cholesky_tile_tag \
  134. cholesky/cholesky_grain_tag \
  135. cholesky/cholesky_implicit \
  136. lu/lu_example_float \
  137. lu/lu_example_double \
  138. lu/lu_implicit_example_float \
  139. lu/lu_implicit_example_double \
  140. heat/heat \
  141. cg/cg
  142. endif
  143. if ATLAS_BLAS_LIB
  144. examplebin_PROGRAMS += \
  145. spmv/dw_block_spmv
  146. endif
  147. check_PROGRAMS += \
  148. basic_examples/hello_world \
  149. basic_examples/vector_scal \
  150. basic_examples/mult \
  151. basic_examples/block \
  152. basic_examples/variable \
  153. filters/fvector \
  154. filters/fblock \
  155. filters/fmatrix \
  156. tag_example/tag_example \
  157. tag_example/tag_example3 \
  158. tag_example/tag_example2 \
  159. tag_example/tag_restartable \
  160. spmv/spmv \
  161. callback/callback \
  162. incrementer/incrementer \
  163. matvecmult/matvecmult \
  164. profiling/profiling \
  165. scheduler/dummy_sched \
  166. reductions/dot_product \
  167. reductions/minmax_reduction
  168. if STARPU_HAVE_F77_H
  169. check_PROGRAMS += \
  170. basic_examples/vector_scal_fortran
  171. endif
  172. if !NO_BLAS_LIB
  173. check_PROGRAMS += \
  174. axpy/axpy \
  175. mult/sgemm \
  176. mult/dgemm \
  177. cholesky/cholesky_tag \
  178. cholesky/cholesky_tile_tag \
  179. cholesky/cholesky_grain_tag \
  180. cholesky/cholesky_implicit \
  181. lu/lu_example_float \
  182. lu/lu_example_double \
  183. lu/lu_implicit_example_float \
  184. lu/lu_implicit_example_double \
  185. heat/heat \
  186. cg/cg
  187. endif
  188. if ATLAS_BLAS_LIB
  189. check_PROGRAMS += \
  190. spmv/dw_block_spmv
  191. endif
  192. ##################
  193. # Basic examples #
  194. ##################
  195. basic_examples_vector_scal_SOURCES = \
  196. basic_examples/vector_scal.c \
  197. basic_examples/vector_scal_cpu.c
  198. if STARPU_USE_CUDA
  199. basic_examples_vector_scal_SOURCES += \
  200. basic_examples/vector_scal_cuda.cu
  201. endif
  202. if STARPU_USE_OPENCL
  203. basic_examples_vector_scal_SOURCES += \
  204. basic_examples/vector_scal_opencl.c
  205. nobase_STARPU_OPENCL_DATA_DATA += \
  206. basic_examples/vector_scal_opencl_kernel.cl
  207. endif
  208. if STARPU_HAVE_F77_H
  209. basic_examples_vector_scal_fortran_SOURCES = \
  210. basic_examples/vector_scal_fortran.F \
  211. basic_examples/vector_scal_c.c \
  212. basic_examples/vector_scal_cpu.c
  213. if STARPU_USE_CUDA
  214. basic_examples_vector_scal_fortran_SOURCES += \
  215. basic_examples/vector_scal_cuda.cu
  216. basic_examples_vector_scal_fortran_LDADD = \
  217. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  218. endif
  219. endif
  220. #################
  221. # block example #
  222. #################
  223. basic_examples_block_SOURCES = \
  224. basic_examples/block.c \
  225. basic_examples/block_cpu.c
  226. if STARPU_USE_CUDA
  227. basic_examples_block_SOURCES += \
  228. basic_examples/block_cuda.cu
  229. endif
  230. if STARPU_USE_OPENCL
  231. basic_examples_block_SOURCES += \
  232. basic_examples/block_opencl.c
  233. nobase_STARPU_OPENCL_DATA_DATA += \
  234. basic_examples/block_opencl_kernel.cl
  235. endif
  236. ####################
  237. # Variable example #
  238. ####################
  239. basic_examples_variable_SOURCES = \
  240. basic_examples/variable.c \
  241. basic_examples/variable_kernels_cpu.c
  242. if STARPU_USE_CUDA
  243. basic_examples_variable_SOURCES += \
  244. basic_examples/variable_kernels.cu
  245. endif
  246. if STARPU_USE_OPENCL
  247. basic_examples_variable_SOURCES += \
  248. basic_examples/variable_kernels_opencl.c
  249. nobase_STARPU_OPENCL_DATA_DATA += \
  250. basic_examples/variable_kernels_opencl_kernel.cl
  251. endif
  252. ###########
  253. # Filters #
  254. ###########
  255. filters_fblock_SOURCES = \
  256. filters/fblock.c \
  257. filters/fblock_cpu.c
  258. if STARPU_USE_CUDA
  259. filters_fblock_SOURCES += \
  260. filters/fblock_cuda.cu
  261. endif
  262. if STARPU_USE_OPENCL
  263. filters_fblock_SOURCES += \
  264. filters/fblock_opencl.c
  265. nobase_STARPU_OPENCL_DATA_DATA += \
  266. filters/fblock_opencl_kernel.cl
  267. endif
  268. ################
  269. # AXPY example #
  270. ################
  271. if !NO_BLAS_LIB
  272. axpy_axpy_SOURCES = \
  273. axpy/axpy.c \
  274. common/blas.c
  275. axpy_axpy_LDADD = \
  276. $(STARPU_BLAS_LDFLAGS)
  277. endif
  278. ################
  279. # Mult example #
  280. ################
  281. if !NO_BLAS_LIB
  282. mult_sgemm_SOURCES = \
  283. mult/sgemm.c \
  284. common/blas.c
  285. mult_sgemm_LDADD = \
  286. $(STARPU_BLAS_LDFLAGS)
  287. mult_dgemm_SOURCES = \
  288. mult/dgemm.c \
  289. common/blas.c
  290. mult_dgemm_LDADD = \
  291. $(STARPU_BLAS_LDFLAGS)
  292. endif
  293. ####################
  294. # Cholesky example #
  295. ####################
  296. if !NO_BLAS_LIB
  297. cholesky_cholesky_tag_SOURCES = \
  298. cholesky/cholesky_tag.c \
  299. cholesky/cholesky_models.c \
  300. cholesky/cholesky_kernels.c \
  301. common/blas.c
  302. cholesky_cholesky_tag_LDADD = \
  303. $(STARPU_BLAS_LDFLAGS)
  304. cholesky_cholesky_tile_tag_SOURCES = \
  305. cholesky/cholesky_tile_tag.c \
  306. cholesky/cholesky_models.c \
  307. cholesky/cholesky_kernels.c \
  308. common/blas.c
  309. cholesky_cholesky_tile_tag_LDADD = \
  310. $(STARPU_BLAS_LDFLAGS)
  311. cholesky_cholesky_grain_tag_SOURCES = \
  312. cholesky/cholesky_grain_tag.c \
  313. cholesky/cholesky_models.c \
  314. cholesky/cholesky_kernels.c \
  315. common/blas.c
  316. cholesky_cholesky_grain_tag_LDADD = \
  317. $(STARPU_BLAS_LDFLAGS)
  318. cholesky_cholesky_implicit_SOURCES = \
  319. cholesky/cholesky_implicit.c \
  320. cholesky/cholesky_models.c \
  321. cholesky/cholesky_kernels.c \
  322. common/blas.c
  323. cholesky_cholesky_implicit_LDADD = \
  324. $(STARPU_BLAS_LDFLAGS)
  325. endif
  326. ##############
  327. # LU example #
  328. ##############
  329. if !NO_BLAS_LIB
  330. lu_lu_example_float_SOURCES = \
  331. lu/lu_example_float.c \
  332. lu/slu.c \
  333. lu/slu_pivot.c \
  334. lu/slu_kernels.c \
  335. common/blas.c
  336. lu_lu_example_float_LDADD = \
  337. $(STARPU_BLAS_LDFLAGS)
  338. lu_lu_example_double_SOURCES = \
  339. lu/lu_example_double.c \
  340. lu/dlu.c \
  341. lu/dlu_pivot.c \
  342. lu/dlu_kernels.c \
  343. common/blas.c
  344. lu_lu_example_double_LDADD = \
  345. $(STARPU_BLAS_LDFLAGS)
  346. lu_lu_implicit_example_float_SOURCES = \
  347. lu/lu_example_float.c \
  348. lu/slu_implicit.c \
  349. lu/slu_implicit_pivot.c \
  350. lu/slu_kernels.c \
  351. common/blas.c
  352. lu_lu_implicit_example_float_LDADD = \
  353. $(STARPU_BLAS_LDFLAGS)
  354. lu_lu_implicit_example_double_SOURCES = \
  355. lu/lu_example_double.c \
  356. lu/dlu_implicit.c \
  357. lu/dlu_implicit_pivot.c \
  358. lu/dlu_kernels.c \
  359. common/blas.c
  360. lu_lu_implicit_example_double_LDADD = \
  361. $(STARPU_BLAS_LDFLAGS)
  362. endif
  363. ################
  364. # Heat example #
  365. ################
  366. if !NO_BLAS_LIB
  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. heat_heat_LDADD = \
  379. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  380. $(STARPU_BLAS_LDFLAGS)
  381. endif
  382. ##############
  383. # CG example #
  384. ##############
  385. if !NO_BLAS_LIB
  386. cg_cg_SOURCES = \
  387. cg/cg.c \
  388. cg/cg_kernels.c \
  389. common/blas.c
  390. if STARPU_USE_CUDA
  391. cg_cg_SOURCES += \
  392. cg/cg_dot_kernel.cu
  393. endif
  394. cg_cg_LDADD = \
  395. $(STARPU_BLAS_LDFLAGS)
  396. endif
  397. ################
  398. # SpMV example #
  399. ################
  400. spmv_spmv_SOURCES = \
  401. spmv/spmv.c \
  402. spmv/spmv_kernels.c
  403. if STARPU_USE_CUDA
  404. spmv_spmv_SOURCES += \
  405. spmv/spmv_cuda.cu
  406. endif
  407. if ATLAS_BLAS_LIB
  408. spmv_dw_block_spmv_SOURCES = \
  409. spmv/dw_block_spmv.c \
  410. spmv/dw_block_spmv_kernels.c \
  411. spmv/matrix_market/mm_to_bcsr.c \
  412. spmv/matrix_market/mmio.c
  413. spmv_dw_block_spmv_LDADD = \
  414. $(STARPU_BLAS_LDFLAGS)
  415. endif
  416. #######################
  417. # Incrementer example #
  418. #######################
  419. incrementer_incrementer_SOURCES = \
  420. incrementer/incrementer.c
  421. if STARPU_USE_CUDA
  422. incrementer_incrementer_SOURCES += \
  423. incrementer/incrementer_kernels.cu
  424. endif
  425. if STARPU_USE_OPENCL
  426. incrementer_incrementer_SOURCES += \
  427. incrementer/incrementer_kernels_opencl.c
  428. nobase_STARPU_OPENCL_DATA_DATA += \
  429. incrementer/incrementer_kernels_opencl_kernel.cl
  430. endif
  431. ######################
  432. # matVecMult example #
  433. ######################
  434. if STARPU_USE_OPENCL
  435. nobase_STARPU_OPENCL_DATA_DATA += \
  436. matvecmult/matvecmult_kernel.cl
  437. endif
  438. #######################
  439. # dot_product example #
  440. #######################
  441. reductions_dot_product_SOURCES = \
  442. reductions/dot_product.c
  443. if STARPU_USE_CUDA
  444. reductions_dot_product_SOURCES += \
  445. reductions/dot_product_kernels.cu
  446. endif
  447. ##################
  448. # Mandelbrot Set #
  449. ##################
  450. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  451. if HAVE_X11
  452. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  453. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS)
  454. endif