Makefile.am 12 KB

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