Makefile.am 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  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)
  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. TESTS += coverage/coverage.sh
  21. SUBDIRS = stencil
  22. if STARPU_HAVE_FFTW
  23. if STARPU_HAVE_FFTWL
  24. SUBDIRS += starpufft
  25. endif
  26. endif
  27. check_PROGRAMS =
  28. BUILT_SOURCES =
  29. EXTRA_DIST = \
  30. basic_examples/vector_scal_opencl_codelet.cl \
  31. spmv/spmv_cuda.cu \
  32. gordon/null_kernel_gordon.c \
  33. mult/xgemm.c \
  34. mult/xgemm_kernels.c \
  35. mult/gordon/func_sgemm_ibm.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_codelet.cl \
  43. basic_examples/variable_kernels_opencl_codelet.cl \
  44. matvecmult/matvecmult_kernel.cl \
  45. basic_examples/block_opencl_kernel.cl \
  46. filters/fblock_opencl_codelet.cl \
  47. coverage/coverage.sh
  48. CLEANFILES = \
  49. gordon/null_kernel_gordon.spuelf \
  50. mult/gordon/func_sgemm_ibm.spuelf
  51. CLEANFILES += *.gcno *.gcda *.linkinfo
  52. if STARPU_USE_CUDA
  53. NVCCFLAGS += $(HWLOC_CFLAGS)
  54. .cu.cubin:
  55. $(MKDIR_P) `dirname $@`
  56. $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS)
  57. .cu.o:
  58. $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS) -I$(top_srcdir)/include/ -I$(top_builddir)/include/
  59. endif
  60. if STARPU_USE_GORDON
  61. SPU_CC ?= spu-gcc
  62. SPU_LD ?= spu-ld
  63. SPULDFLAGS =
  64. SPULIBS = -lblas #-lc -lgloss -lc
  65. .c.spuo:
  66. $(MKDIR_P) `dirname $@`
  67. $(SPU_CC) -c -fpic $< -o $@
  68. .spuo.spuelf:
  69. $(MKDIR_P) `dirname $@`
  70. $(SPU_LD) $(SPULDFLAGS) $< -o $@ $(SPULIBS)
  71. BUILT_SOURCES += \
  72. gordon/null_kernel_gordon.spuelf \
  73. mult/gordon/func_sgemm_ibm.spuelf
  74. endif
  75. examplebindir = $(libdir)/starpu/examples/
  76. examplebin_PROGRAMS =
  77. noinst_HEADERS = \
  78. heat/lu_kernels_model.h \
  79. heat/dw_sparse_cg.h \
  80. heat/heat.h \
  81. heat/dw_factolu.h \
  82. lu/xlu.h \
  83. lu/xlu_kernels.h \
  84. lu/float.h \
  85. lu/double.h \
  86. pi/pi.h \
  87. pi/SobolQRNG/sobol.h \
  88. pi/SobolQRNG/sobol_gold.h \
  89. pi/SobolQRNG/sobol_gpu.h \
  90. pi/SobolQRNG/sobol_primitives.h \
  91. cholesky/dw_cholesky_models.h \
  92. cholesky/dw_cholesky.h \
  93. common/blas_model.h \
  94. common/blas.h \
  95. mult/dw_mult.h \
  96. mult/simple.h \
  97. mult/double.h \
  98. mult/gordon/func_gemm_ibm.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/dw_spmv.h \
  106. spmv/dw_block_spmv.h
  107. ##################
  108. # Basic examples #
  109. ##################
  110. examplebin_PROGRAMS += \
  111. basic_examples/hello_world
  112. basic_examples_hello_world_SOURCES = \
  113. basic_examples/hello_world.c
  114. examplebin_PROGRAMS += \
  115. basic_examples/vector_scal
  116. basic_examples_vector_scal_SOURCES = \
  117. basic_examples/vector_scal.c \
  118. basic_examples/vector_scal_cpu.c
  119. if STARPU_USE_CUDA
  120. basic_examples_vector_scal_SOURCES += \
  121. basic_examples/vector_scal_cuda.cu
  122. endif
  123. if STARPU_USE_OPENCL
  124. basic_examples_vector_scal_SOURCES += \
  125. basic_examples/vector_scal_opencl.c
  126. endif
  127. nobase_STARPU_OPENCL_DATA_DATA = \
  128. basic_examples/vector_scal_opencl_codelet.cl
  129. if STARPU_HAVE_F77_H
  130. examplebin_PROGRAMS += \
  131. basic_examples/vector_scal_fortran
  132. basic_examples_vector_scal_fortran_SOURCES = \
  133. basic_examples/vector_scal_fortran.F \
  134. basic_examples/vector_scal_c.c \
  135. basic_examples/vector_scal_cpu.c
  136. if STARPU_USE_CUDA
  137. basic_examples_vector_scal_fortran_SOURCES += \
  138. basic_examples/vector_scal_cuda.cu
  139. endif
  140. endif
  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. endif
  183. nobase_STARPU_OPENCL_DATA_DATA += \
  184. basic_examples/variable_kernels_opencl_codelet.cl
  185. ###########
  186. # Filters #
  187. ###########
  188. examplebin_PROGRAMS += \
  189. filters/fvector \
  190. filters/fblock \
  191. filters/fmatrix
  192. filters_fvector_SOURCES = \
  193. filters/fvector.c
  194. filters_fblock_SOURCES = \
  195. filters/fblock.c \
  196. filters/fblock_cpu.c
  197. if STARPU_USE_CUDA
  198. filters_fblock_SOURCES += \
  199. filters/fblock_cuda.cu
  200. endif
  201. if STARPU_USE_OPENCL
  202. filters_fblock_SOURCES += \
  203. filters/fblock_opencl.c
  204. endif
  205. nobase_STARPU_OPENCL_DATA_DATA += \
  206. filters/fblock_opencl_codelet.cl
  207. filters_fmatrix_SOURCES = \
  208. filters/fmatrix.c
  209. ###################
  210. # PPM downscaling #
  211. ###################
  212. examplebin_PROGRAMS += \
  213. ppm_downscaler/ppm_downscaler
  214. ppm_downscaler_ppm_downscaler_SOURCES = \
  215. ppm_downscaler/ppm_downscaler.c
  216. examplebin_PROGRAMS += \
  217. ppm_downscaler/yuv_downscaler
  218. ppm_downscaler_yuv_downscaler_SOURCES = \
  219. ppm_downscaler/yuv_downscaler.c
  220. ######
  221. # Pi #
  222. ######
  223. check_PROGRAMS += \
  224. pi/pi_redux
  225. examplebin_PROGRAMS += \
  226. pi/pi \
  227. pi/pi_redux
  228. pi_pi_SOURCES = \
  229. pi/pi.c \
  230. pi/SobolQRNG/sobol_gold.c \
  231. pi/SobolQRNG/sobol_primitives.c
  232. if STARPU_USE_CUDA
  233. pi_pi_SOURCES += \
  234. pi/pi_kernel.cu \
  235. pi/SobolQRNG/sobol_gpu.cu
  236. endif
  237. pi_pi_redux_SOURCES = \
  238. pi/pi_redux.c
  239. if STARPU_USE_CUDA
  240. pi_pi_redux_SOURCES += \
  241. pi/pi_redux_kernel.cu
  242. endif
  243. ################
  244. # AXPY example #
  245. ################
  246. if !NO_BLAS_LIB
  247. examplebin_PROGRAMS += \
  248. axpy/axpy
  249. axpy_axpy_SOURCES = \
  250. axpy/axpy.c \
  251. common/blas.c
  252. endif
  253. ################
  254. # Mult example #
  255. ################
  256. if !NO_BLAS_LIB
  257. examplebin_PROGRAMS += \
  258. mult/sgemm \
  259. mult/dgemm \
  260. mult/dw_mult_no_stride \
  261. mult/dw_mult_no_stride_no_tag
  262. mult_sgemm_SOURCES = \
  263. mult/sgemm.c \
  264. common/blas.c \
  265. common/blas_model.c
  266. mult_dgemm_SOURCES = \
  267. mult/dgemm.c \
  268. common/blas.c \
  269. common/blas_model.c
  270. mult_dw_mult_no_stride_SOURCES = \
  271. mult/dw_mult_no_stride.c \
  272. common/blas.c \
  273. common/blas_model.c
  274. mult_dw_mult_no_stride_no_tag_SOURCES = \
  275. mult/dw_mult_no_stride_no_tag.c \
  276. common/blas.c \
  277. common/blas_model.c
  278. endif
  279. ####################
  280. # Cholesky example #
  281. ####################
  282. if !NO_BLAS_LIB
  283. examplebin_PROGRAMS += \
  284. cholesky/dw_cholesky \
  285. cholesky/dw_cholesky_no_stride \
  286. cholesky/dw_cholesky_grain
  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. endif
  303. ##############
  304. # LU example #
  305. ##############
  306. if !NO_BLAS_LIB
  307. check_PROGRAMS += \
  308. lu/lu_example_float \
  309. lu/lu_implicit_example_float
  310. examplebin_PROGRAMS += \
  311. lu/lu_example_float \
  312. lu/lu_example_double
  313. lu_lu_example_float_SOURCES = \
  314. lu/lu_example_float.c \
  315. lu/slu.c \
  316. lu/slu_pivot.c \
  317. lu/slu_kernels.c \
  318. common/blas.c
  319. lu_lu_example_double_SOURCES = \
  320. lu/lu_example_double.c \
  321. lu/dlu.c \
  322. lu/dlu_pivot.c \
  323. lu/dlu_kernels.c \
  324. common/blas.c
  325. examplebin_PROGRAMS += \
  326. lu/lu_implicit_example_float \
  327. lu/lu_implicit_example_double
  328. lu_lu_implicit_example_float_SOURCES = \
  329. lu/lu_example_float.c \
  330. lu/slu_implicit.c \
  331. lu/slu_implicit_pivot.c \
  332. lu/slu_kernels.c \
  333. common/blas.c
  334. lu_lu_implicit_example_double_SOURCES = \
  335. lu/lu_example_double.c \
  336. lu/dlu_implicit.c \
  337. lu/dlu_implicit_pivot.c \
  338. lu/dlu_kernels.c \
  339. common/blas.c
  340. endif
  341. ################
  342. # Heat example #
  343. ################
  344. if !NO_BLAS_LIB
  345. examplebin_PROGRAMS += heat/heat
  346. heat_heat_SOURCES = \
  347. heat/heat.c \
  348. heat/dw_factolu.c \
  349. heat/dw_factolu_tag.c \
  350. heat/dw_factolu_grain.c \
  351. heat/dw_sparse_cg.c \
  352. heat/heat_display.c \
  353. heat/lu_kernels_model.c \
  354. heat/dw_sparse_cg_kernels.c \
  355. heat/dw_factolu_kernels.c \
  356. common/blas.c
  357. endif
  358. ################
  359. # Tag examples #
  360. ################
  361. check_PROGRAMS += \
  362. tag_example/tag_example \
  363. tag_example/tag_example3 \
  364. tag_example/tag_example2 \
  365. tag_example/tag_restartable
  366. examplebin_PROGRAMS += \
  367. tag_example/tag_example \
  368. tag_example/tag_example3 \
  369. tag_example/tag_example2 \
  370. tag_example/tag_restartable
  371. tag_example_tag_example_SOURCES = \
  372. tag_example/tag_example.c
  373. tag_example_tag_example2_SOURCES = \
  374. tag_example/tag_example2.c
  375. tag_example_tag_example3_SOURCES = \
  376. tag_example/tag_example3.c
  377. tag_example_tag_restartable_SOURCES = \
  378. tag_example/tag_restartable.c
  379. ################
  380. # SpMV example #
  381. ################
  382. examplebin_PROGRAMS += \
  383. spmv/dw_spmv
  384. spmv_dw_spmv_SOURCES = \
  385. spmv/dw_spmv.c
  386. if STARPU_USE_CUDA
  387. spmv_dw_spmv_SOURCES += \
  388. spmv/spmv_cuda.cu
  389. endif
  390. if ATLAS_BLAS_LIB
  391. examplebin_PROGRAMS += \
  392. spmv/dw_block_spmv
  393. spmv_dw_block_spmv_SOURCES = \
  394. spmv/dw_block_spmv.c \
  395. spmv/dw_block_spmv_kernels.c \
  396. spmv/matrix_market/mm_to_bcsr.c \
  397. spmv/matrix_market/mmio.c
  398. endif
  399. #######################
  400. # Incrementer example #
  401. #######################
  402. check_PROGRAMS += \
  403. incrementer/incrementer
  404. examplebin_PROGRAMS += \
  405. incrementer/incrementer
  406. incrementer_incrementer_SOURCES = \
  407. incrementer/incrementer.c
  408. if STARPU_USE_CUDA
  409. incrementer_incrementer_SOURCES += \
  410. incrementer/incrementer_kernels.cu
  411. endif
  412. if STARPU_USE_OPENCL
  413. incrementer_incrementer_SOURCES += \
  414. incrementer/incrementer_kernels_opencl.c
  415. endif
  416. nobase_STARPU_OPENCL_DATA_DATA += \
  417. incrementer/incrementer_kernels_opencl_codelet.cl
  418. ######################
  419. # matVecMult example #
  420. ######################
  421. check_PROGRAMS += \
  422. matvecmult/matvecmult
  423. examplebin_PROGRAMS += \
  424. matvecmult/matvecmult
  425. matvecmult_matvecmult_SOURCES = \
  426. matvecmult/matvecmult.c
  427. if STARPU_USE_OPENCL
  428. nobase_STARPU_OPENCL_DATA_DATA += \
  429. matvecmult/matvecmult_kernel.cl
  430. endif
  431. #####################
  432. # profiling example #
  433. #####################
  434. check_PROGRAMS += \
  435. profiling/profiling
  436. examplebin_PROGRAMS += \
  437. profiling/profiling
  438. profiling_profiling_SOURCES = \
  439. profiling/profiling.c
  440. #####################
  441. # scheduler example #
  442. #####################
  443. check_PROGRAMS += \
  444. scheduler/dummy_sched
  445. examplebin_PROGRAMS += \
  446. scheduler/dummy_sched
  447. scheduler_dummy_sched_SOURCES = \
  448. scheduler/dummy_sched.c
  449. #######################
  450. # dot_product example #
  451. #######################
  452. check_PROGRAMS += \
  453. dot_product/dot_product
  454. examplebin_PROGRAMS += \
  455. dot_product/dot_product
  456. dot_product_dot_product_SOURCES = \
  457. dot_product/dot_product.c