Makefile.am 12 KB

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