Makefile.am 14 KB

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