Makefile.am 14 KB

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