Makefile.am 13 KB

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