Makefile.am 13 KB

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