Makefile.am 12 KB

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