Makefile.am 12 KB

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