Makefile.am 13 KB

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