Makefile.am 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  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. # Copyright (C) 2011 Télécom-SudParis
  6. #
  7. # StarPU is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU Lesser General Public License as published by
  9. # the Free Software Foundation; either version 2.1 of the License, or (at
  10. # your option) any later version.
  11. #
  12. # StarPU is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. #
  16. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
  18. LIBS = $(top_builddir)/src/libstarpu.la $(MAGMA_LIBS) $(HWLOC_LIBS) @LIBS@
  19. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  20. AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS)
  21. SUBDIRS = stencil
  22. if STARPU_USE_SOCL
  23. SUBDIRS += socl
  24. endif
  25. if STARPU_HAVE_FFTW
  26. if STARPU_HAVE_FFTWF
  27. SUBDIRS += starpufft
  28. endif
  29. endif
  30. BUILT_SOURCES =
  31. if STARPU_USE_OPENCL
  32. nobase_STARPU_OPENCL_DATA_DATA =
  33. endif
  34. EXTRA_DIST = \
  35. basic_examples/vector_scal_opencl_kernel.cl \
  36. common/blas_model.c \
  37. spmv/spmv_cuda.cu \
  38. spmv/spmv_opencl.cl \
  39. gordon/null_kernel_gordon.c \
  40. mult/xgemm.c \
  41. lu/xlu.c \
  42. lu/xlu_pivot.c \
  43. lu/xlu_implicit.c \
  44. lu/xlu_implicit_pivot.c \
  45. lu/xlu_kernels.c \
  46. lu/lu_example.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. lu/complex_float.h \
  88. lu/complex_double.h \
  89. lu/blas_complex.h \
  90. cholesky/cholesky.h \
  91. common/blas_model.h \
  92. common/blas.h \
  93. mult/simple.h \
  94. mult/double.h \
  95. gordon/null.h \
  96. fortran/bindings/StarPU_fortran.h \
  97. ppm_downscaler/ppm_downscaler.h \
  98. ppm_downscaler/yuv_downscaler.h \
  99. spmv/matrix_market/mmio.h \
  100. spmv/matrix_market/mm_to_bcsr.h \
  101. spmv/spmv.h \
  102. spmv/dw_block_spmv.h
  103. #####################################
  104. # What to install and what to check #
  105. #####################################
  106. STARPU_EXAMPLES =
  107. TESTS = $(STARPU_EXAMPLES)
  108. if STARPU_HAVE_WINDOWS
  109. check_PROGRAMS = $(STARPU_EXAMPLES)
  110. else
  111. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  112. endif
  113. if !STARPU_HAVE_WINDOWS
  114. ## test loader program
  115. LOADER = loader
  116. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  117. loader_SOURCES = ../tests/loader.c
  118. TESTS_ENVIRONMENT = $(LOADER_BIN)
  119. endif
  120. examplebin_PROGRAMS += \
  121. basic_examples/hello_world \
  122. basic_examples/vector_scal \
  123. basic_examples/mult \
  124. basic_examples/block \
  125. basic_examples/variable \
  126. filters/fvector \
  127. filters/fblock \
  128. filters/fmatrix \
  129. tag_example/tag_example \
  130. tag_example/tag_example3 \
  131. tag_example/tag_example2 \
  132. tag_example/tag_restartable \
  133. spmv/spmv \
  134. callback/callback \
  135. incrementer/incrementer \
  136. matvecmult/matvecmult \
  137. profiling/profiling \
  138. scheduler/dummy_sched \
  139. reductions/dot_product \
  140. reductions/minmax_reduction \
  141. mandelbrot/mandelbrot \
  142. ppm_downscaler/ppm_downscaler \
  143. ppm_downscaler/yuv_downscaler
  144. if STARPU_HAVE_F77_H
  145. examplebin_PROGRAMS += \
  146. basic_examples/vector_scal_fortran
  147. endif
  148. if !NO_BLAS_LIB
  149. examplebin_PROGRAMS += \
  150. axpy/axpy \
  151. mult/sgemm \
  152. mult/dgemm \
  153. cholesky/cholesky_tag \
  154. cholesky/cholesky_tile_tag \
  155. cholesky/cholesky_grain_tag \
  156. cholesky/cholesky_implicit \
  157. lu/lu_example_float \
  158. lu/lu_example_double \
  159. lu/lu_implicit_example_float \
  160. lu/lu_implicit_example_double \
  161. heat/heat \
  162. cg/cg
  163. endif
  164. if MKL_BLAS_LIB
  165. examplebin_PROGRAMS += \
  166. lu/lu_example_complex_float \
  167. lu/lu_example_complex_double \
  168. lu/lu_implicit_example_complex_float \
  169. lu/lu_implicit_example_complex_double
  170. endif
  171. if ATLAS_BLAS_LIB
  172. examplebin_PROGRAMS += \
  173. spmv/dw_block_spmv
  174. endif
  175. STARPU_EXAMPLES += \
  176. basic_examples/hello_world \
  177. basic_examples/vector_scal \
  178. basic_examples/mult \
  179. basic_examples/block \
  180. basic_examples/variable \
  181. filters/fvector \
  182. filters/fblock \
  183. filters/fmatrix \
  184. tag_example/tag_example \
  185. tag_example/tag_example3 \
  186. tag_example/tag_example2 \
  187. tag_example/tag_restartable \
  188. spmv/spmv \
  189. callback/callback \
  190. incrementer/incrementer \
  191. matvecmult/matvecmult \
  192. profiling/profiling \
  193. scheduler/dummy_sched \
  194. reductions/dot_product \
  195. reductions/minmax_reduction
  196. if STARPU_HAVE_F77_H
  197. STARPU_EXAMPLES += \
  198. basic_examples/vector_scal_fortran
  199. endif
  200. if !NO_BLAS_LIB
  201. STARPU_EXAMPLES += \
  202. axpy/axpy \
  203. mult/sgemm \
  204. mult/dgemm \
  205. cholesky/cholesky_tag \
  206. cholesky/cholesky_tile_tag \
  207. cholesky/cholesky_grain_tag \
  208. cholesky/cholesky_implicit \
  209. lu/lu_example_float \
  210. lu/lu_example_double \
  211. lu/lu_implicit_example_float \
  212. lu/lu_implicit_example_double \
  213. heat/heat \
  214. cg/cg
  215. endif
  216. if MKL_BLAS_LIB
  217. STARPU_EXAMPLES += \
  218. lu/lu_example_complex_float \
  219. lu/lu_example_complex_double \
  220. lu/lu_implicit_example_complex_float \
  221. lu/lu_implicit_example_complex_double
  222. endif
  223. if ATLAS_BLAS_LIB
  224. STARPU_EXAMPLES += \
  225. spmv/dw_block_spmv
  226. endif
  227. ##################
  228. # Basic examples #
  229. ##################
  230. basic_examples_vector_scal_SOURCES = \
  231. basic_examples/vector_scal.c \
  232. basic_examples/vector_scal_cpu.c
  233. if STARPU_USE_CUDA
  234. basic_examples_vector_scal_SOURCES += \
  235. basic_examples/vector_scal_cuda.cu
  236. endif
  237. if STARPU_USE_OPENCL
  238. basic_examples_vector_scal_SOURCES += \
  239. basic_examples/vector_scal_opencl.c
  240. nobase_STARPU_OPENCL_DATA_DATA += \
  241. basic_examples/vector_scal_opencl_kernel.cl
  242. endif
  243. if STARPU_HAVE_F77_H
  244. basic_examples_vector_scal_fortran_SOURCES = \
  245. basic_examples/vector_scal_fortran.F \
  246. basic_examples/vector_scal_c.c \
  247. basic_examples/vector_scal_cpu.c
  248. if STARPU_USE_CUDA
  249. basic_examples_vector_scal_fortran_SOURCES += \
  250. basic_examples/vector_scal_cuda.cu
  251. basic_examples_vector_scal_fortran_LDADD = \
  252. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  253. endif
  254. endif
  255. #################
  256. # block example #
  257. #################
  258. basic_examples_block_SOURCES = \
  259. basic_examples/block.c \
  260. basic_examples/block_cpu.c
  261. if STARPU_USE_CUDA
  262. basic_examples_block_SOURCES += \
  263. basic_examples/block_cuda.cu
  264. endif
  265. if STARPU_USE_OPENCL
  266. basic_examples_block_SOURCES += \
  267. basic_examples/block_opencl.c
  268. nobase_STARPU_OPENCL_DATA_DATA += \
  269. basic_examples/block_opencl_kernel.cl
  270. endif
  271. ####################
  272. # Variable example #
  273. ####################
  274. basic_examples_variable_SOURCES = \
  275. basic_examples/variable.c \
  276. basic_examples/variable_kernels_cpu.c
  277. if STARPU_USE_CUDA
  278. basic_examples_variable_SOURCES += \
  279. basic_examples/variable_kernels.cu
  280. endif
  281. if STARPU_USE_OPENCL
  282. basic_examples_variable_SOURCES += \
  283. basic_examples/variable_kernels_opencl.c
  284. nobase_STARPU_OPENCL_DATA_DATA += \
  285. basic_examples/variable_kernels_opencl_kernel.cl
  286. endif
  287. ###########
  288. # Filters #
  289. ###########
  290. filters_fblock_SOURCES = \
  291. filters/fblock.c \
  292. filters/fblock_cpu.c
  293. if STARPU_USE_CUDA
  294. filters_fblock_SOURCES += \
  295. filters/fblock_cuda.cu
  296. endif
  297. if STARPU_USE_OPENCL
  298. filters_fblock_SOURCES += \
  299. filters/fblock_opencl.c
  300. nobase_STARPU_OPENCL_DATA_DATA += \
  301. filters/fblock_opencl_kernel.cl
  302. endif
  303. ################
  304. # AXPY example #
  305. ################
  306. if !NO_BLAS_LIB
  307. axpy_axpy_SOURCES = \
  308. axpy/axpy.c \
  309. common/blas.c
  310. axpy_axpy_LDADD = \
  311. $(STARPU_BLAS_LDFLAGS)
  312. endif
  313. ################
  314. # Mult example #
  315. ################
  316. if !NO_BLAS_LIB
  317. mult_sgemm_SOURCES = \
  318. mult/sgemm.c \
  319. common/blas.c
  320. mult_sgemm_LDADD = \
  321. $(STARPU_BLAS_LDFLAGS)
  322. mult_dgemm_SOURCES = \
  323. mult/dgemm.c \
  324. common/blas.c
  325. mult_dgemm_LDADD = \
  326. $(STARPU_BLAS_LDFLAGS)
  327. endif
  328. ####################
  329. # Cholesky example #
  330. ####################
  331. if !NO_BLAS_LIB
  332. cholesky_cholesky_tag_SOURCES = \
  333. cholesky/cholesky_tag.c \
  334. cholesky/cholesky_models.c \
  335. cholesky/cholesky_kernels.c \
  336. common/blas.c
  337. cholesky_cholesky_tag_LDADD = \
  338. $(STARPU_BLAS_LDFLAGS)
  339. cholesky_cholesky_tile_tag_SOURCES = \
  340. cholesky/cholesky_tile_tag.c \
  341. cholesky/cholesky_models.c \
  342. cholesky/cholesky_kernels.c \
  343. common/blas.c
  344. cholesky_cholesky_tile_tag_LDADD = \
  345. $(STARPU_BLAS_LDFLAGS)
  346. cholesky_cholesky_grain_tag_SOURCES = \
  347. cholesky/cholesky_grain_tag.c \
  348. cholesky/cholesky_models.c \
  349. cholesky/cholesky_kernels.c \
  350. common/blas.c
  351. cholesky_cholesky_grain_tag_LDADD = \
  352. $(STARPU_BLAS_LDFLAGS)
  353. cholesky_cholesky_implicit_SOURCES = \
  354. cholesky/cholesky_implicit.c \
  355. cholesky/cholesky_models.c \
  356. cholesky/cholesky_kernels.c \
  357. common/blas.c
  358. cholesky_cholesky_implicit_LDADD = \
  359. $(STARPU_BLAS_LDFLAGS)
  360. endif
  361. ##############
  362. # LU example #
  363. ##############
  364. if !NO_BLAS_LIB
  365. lu_lu_example_float_SOURCES = \
  366. lu/lu_example_float.c \
  367. lu/slu.c \
  368. lu/slu_pivot.c \
  369. lu/slu_kernels.c \
  370. common/blas.c
  371. lu_lu_example_float_LDADD = \
  372. $(STARPU_BLAS_LDFLAGS)
  373. lu_lu_example_double_SOURCES = \
  374. lu/lu_example_double.c \
  375. lu/dlu.c \
  376. lu/dlu_pivot.c \
  377. lu/dlu_kernels.c \
  378. common/blas.c
  379. lu_lu_example_double_LDADD = \
  380. $(STARPU_BLAS_LDFLAGS)
  381. lu_lu_implicit_example_float_SOURCES = \
  382. lu/lu_example_float.c \
  383. lu/slu_implicit.c \
  384. lu/slu_implicit_pivot.c \
  385. lu/slu_kernels.c \
  386. common/blas.c
  387. lu_lu_implicit_example_float_LDADD = \
  388. $(STARPU_BLAS_LDFLAGS)
  389. lu_lu_implicit_example_double_SOURCES = \
  390. lu/lu_example_double.c \
  391. lu/dlu_implicit.c \
  392. lu/dlu_implicit_pivot.c \
  393. lu/dlu_kernels.c \
  394. common/blas.c
  395. lu_lu_implicit_example_double_LDADD = \
  396. $(STARPU_BLAS_LDFLAGS)
  397. if MKL_BLAS_LIB
  398. lu_lu_example_complex_float_SOURCES = \
  399. lu/lu_example_complex_float.c \
  400. lu/clu.c \
  401. lu/clu_pivot.c \
  402. lu/clu_kernels.c \
  403. lu/blas_complex.c \
  404. common/blas.c
  405. lu_lu_example_complex_float_LDADD = \
  406. $(STARPU_BLAS_LDFLAGS)
  407. lu_lu_implicit_example_complex_float_SOURCES = \
  408. lu/lu_example_complex_float.c \
  409. lu/clu_implicit.c \
  410. lu/clu_implicit_pivot.c \
  411. lu/clu_kernels.c \
  412. lu/blas_complex.c \
  413. common/blas.c
  414. lu_lu_implicit_example_complex_float_LDADD = \
  415. $(STARPU_BLAS_LDFLAGS)
  416. lu_lu_example_complex_double_SOURCES = \
  417. lu/lu_example_complex_double.c \
  418. lu/zlu.c \
  419. lu/zlu_pivot.c \
  420. lu/zlu_kernels.c \
  421. lu/blas_complex.c \
  422. common/blas.c
  423. lu_lu_example_complex_double_LDADD = \
  424. $(STARPU_BLAS_LDFLAGS)
  425. lu_lu_implicit_example_complex_double_SOURCES = \
  426. lu/lu_example_complex_double.c \
  427. lu/zlu_implicit.c \
  428. lu/zlu_implicit_pivot.c \
  429. lu/zlu_kernels.c \
  430. lu/blas_complex.c \
  431. common/blas.c
  432. lu_lu_implicit_example_complex_double_LDADD = \
  433. $(STARPU_BLAS_LDFLAGS)
  434. endif
  435. endif
  436. ################
  437. # Heat example #
  438. ################
  439. if !NO_BLAS_LIB
  440. heat_heat_SOURCES = \
  441. heat/heat.c \
  442. heat/dw_factolu.c \
  443. heat/dw_factolu_tag.c \
  444. heat/dw_factolu_grain.c \
  445. heat/dw_sparse_cg.c \
  446. heat/heat_display.c \
  447. heat/lu_kernels_model.c \
  448. heat/dw_sparse_cg_kernels.c \
  449. heat/dw_factolu_kernels.c \
  450. common/blas.c
  451. heat_heat_LDADD = \
  452. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  453. $(STARPU_BLAS_LDFLAGS)
  454. endif
  455. ##############
  456. # CG example #
  457. ##############
  458. if !NO_BLAS_LIB
  459. cg_cg_SOURCES = \
  460. cg/cg.c \
  461. cg/cg_kernels.c \
  462. common/blas.c
  463. if STARPU_USE_CUDA
  464. cg_cg_SOURCES += \
  465. cg/cg_dot_kernel.cu
  466. endif
  467. cg_cg_LDADD = \
  468. $(STARPU_BLAS_LDFLAGS)
  469. endif
  470. ################
  471. # SpMV example #
  472. ################
  473. spmv_spmv_SOURCES = \
  474. spmv/spmv.c \
  475. spmv/spmv_kernels.c
  476. if STARPU_USE_CUDA
  477. spmv_spmv_SOURCES += \
  478. spmv/spmv_cuda.cu
  479. endif
  480. if ATLAS_BLAS_LIB
  481. spmv_dw_block_spmv_SOURCES = \
  482. spmv/dw_block_spmv.c \
  483. spmv/dw_block_spmv_kernels.c \
  484. spmv/matrix_market/mm_to_bcsr.c \
  485. spmv/matrix_market/mmio.c
  486. spmv_dw_block_spmv_LDADD = \
  487. $(STARPU_BLAS_LDFLAGS)
  488. endif
  489. #######################
  490. # Incrementer example #
  491. #######################
  492. incrementer_incrementer_SOURCES = \
  493. incrementer/incrementer.c
  494. if STARPU_USE_CUDA
  495. incrementer_incrementer_SOURCES += \
  496. incrementer/incrementer_kernels.cu
  497. endif
  498. if STARPU_USE_OPENCL
  499. incrementer_incrementer_SOURCES += \
  500. incrementer/incrementer_kernels_opencl.c
  501. nobase_STARPU_OPENCL_DATA_DATA += \
  502. incrementer/incrementer_kernels_opencl_kernel.cl
  503. endif
  504. ######################
  505. # matVecMult example #
  506. ######################
  507. if STARPU_USE_OPENCL
  508. nobase_STARPU_OPENCL_DATA_DATA += \
  509. matvecmult/matvecmult_kernel.cl
  510. endif
  511. #######################
  512. # dot_product example #
  513. #######################
  514. reductions_dot_product_SOURCES = \
  515. reductions/dot_product.c
  516. if STARPU_USE_CUDA
  517. reductions_dot_product_SOURCES += \
  518. reductions/dot_product_kernels.cu
  519. endif
  520. ##################
  521. # Mandelbrot Set #
  522. ##################
  523. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  524. if HAVE_X11
  525. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  526. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS)
  527. endif
  528. ################
  529. # Top Examples #
  530. ################
  531. examplebin_PROGRAMS += \
  532. top/hello_world_top
  533. top_hello_world_top_SOURCES = \
  534. top/hello_world_top.c