Makefile.am 12 KB

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