Makefile.am 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  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. examplebin_PROGRAMS += \
  224. pi/pi \
  225. pi/pi_redux
  226. pi_pi_SOURCES = \
  227. pi/pi.c \
  228. pi/SobolQRNG/sobol_gold.c \
  229. pi/SobolQRNG/sobol_primitives.c
  230. if STARPU_USE_CUDA
  231. pi_pi_SOURCES += \
  232. pi/pi_kernel.cu \
  233. pi/SobolQRNG/sobol_gpu.cu
  234. endif
  235. pi_pi_redux_SOURCES = \
  236. pi/pi_redux.c
  237. if STARPU_USE_CUDA
  238. pi_pi_redux_SOURCES += \
  239. pi/pi_redux_kernel.cu
  240. endif
  241. ################
  242. # AXPY example #
  243. ################
  244. if !NO_BLAS_LIB
  245. examplebin_PROGRAMS += \
  246. axpy/axpy
  247. axpy_axpy_SOURCES = \
  248. axpy/axpy.c \
  249. common/blas.c
  250. endif
  251. ################
  252. # Mult example #
  253. ################
  254. if !NO_BLAS_LIB
  255. examplebin_PROGRAMS += \
  256. mult/sgemm \
  257. mult/dgemm \
  258. mult/dw_mult_no_stride \
  259. mult/dw_mult_no_stride_no_tag
  260. mult_sgemm_SOURCES = \
  261. mult/sgemm.c \
  262. common/blas.c \
  263. common/blas_model.c
  264. mult_dgemm_SOURCES = \
  265. mult/dgemm.c \
  266. common/blas.c \
  267. common/blas_model.c
  268. mult_dw_mult_no_stride_SOURCES = \
  269. mult/dw_mult_no_stride.c \
  270. common/blas.c \
  271. common/blas_model.c
  272. mult_dw_mult_no_stride_no_tag_SOURCES = \
  273. mult/dw_mult_no_stride_no_tag.c \
  274. common/blas.c \
  275. common/blas_model.c
  276. endif
  277. ####################
  278. # Cholesky example #
  279. ####################
  280. if !NO_BLAS_LIB
  281. examplebin_PROGRAMS += \
  282. cholesky/dw_cholesky \
  283. cholesky/dw_cholesky_no_stride \
  284. cholesky/dw_cholesky_grain
  285. cholesky_dw_cholesky_SOURCES = \
  286. cholesky/dw_cholesky.c \
  287. cholesky/dw_cholesky_models.c \
  288. cholesky/dw_cholesky_kernels.c \
  289. common/blas.c
  290. cholesky_dw_cholesky_no_stride_SOURCES = \
  291. cholesky/dw_cholesky_no_stride.c \
  292. cholesky/dw_cholesky_models.c \
  293. cholesky/dw_cholesky_kernels.c \
  294. common/blas.c
  295. cholesky_dw_cholesky_grain_SOURCES = \
  296. cholesky/dw_cholesky_grain.c \
  297. cholesky/dw_cholesky_models.c \
  298. cholesky/dw_cholesky_kernels.c \
  299. common/blas.c
  300. endif
  301. ##############
  302. # LU example #
  303. ##############
  304. if !NO_BLAS_LIB
  305. check_PROGRAMS += \
  306. lu/lu_example_float \
  307. lu/lu_implicit_example_float
  308. examplebin_PROGRAMS += \
  309. lu/lu_example_float \
  310. lu/lu_example_double
  311. lu_lu_example_float_SOURCES = \
  312. lu/lu_example_float.c \
  313. lu/slu.c \
  314. lu/slu_pivot.c \
  315. lu/slu_kernels.c \
  316. common/blas.c
  317. lu_lu_example_double_SOURCES = \
  318. lu/lu_example_double.c \
  319. lu/dlu.c \
  320. lu/dlu_pivot.c \
  321. lu/dlu_kernels.c \
  322. common/blas.c
  323. examplebin_PROGRAMS += \
  324. lu/lu_implicit_example_float \
  325. lu/lu_implicit_example_double
  326. lu_lu_implicit_example_float_SOURCES = \
  327. lu/lu_example_float.c \
  328. lu/slu_implicit.c \
  329. lu/slu_implicit_pivot.c \
  330. lu/slu_kernels.c \
  331. common/blas.c
  332. lu_lu_implicit_example_double_SOURCES = \
  333. lu/lu_example_double.c \
  334. lu/dlu_implicit.c \
  335. lu/dlu_implicit_pivot.c \
  336. lu/dlu_kernels.c \
  337. common/blas.c
  338. endif
  339. ################
  340. # Heat example #
  341. ################
  342. if !NO_BLAS_LIB
  343. examplebin_PROGRAMS += heat/heat
  344. heat_heat_SOURCES = \
  345. heat/heat.c \
  346. heat/dw_factolu.c \
  347. heat/dw_factolu_tag.c \
  348. heat/dw_factolu_grain.c \
  349. heat/dw_sparse_cg.c \
  350. heat/heat_display.c \
  351. heat/lu_kernels_model.c \
  352. heat/dw_sparse_cg_kernels.c \
  353. heat/dw_factolu_kernels.c \
  354. common/blas.c
  355. endif
  356. ################
  357. # Tag examples #
  358. ################
  359. check_PROGRAMS += \
  360. tag_example/tag_example \
  361. tag_example/tag_example3 \
  362. tag_example/tag_example2 \
  363. tag_example/tag_restartable
  364. examplebin_PROGRAMS += \
  365. tag_example/tag_example \
  366. tag_example/tag_example3 \
  367. tag_example/tag_example2 \
  368. tag_example/tag_restartable
  369. tag_example_tag_example_SOURCES = \
  370. tag_example/tag_example.c
  371. tag_example_tag_example2_SOURCES = \
  372. tag_example/tag_example2.c
  373. tag_example_tag_example3_SOURCES = \
  374. tag_example/tag_example3.c
  375. tag_example_tag_restartable_SOURCES = \
  376. tag_example/tag_restartable.c
  377. ################
  378. # SpMV example #
  379. ################
  380. examplebin_PROGRAMS += \
  381. spmv/dw_spmv
  382. spmv_dw_spmv_SOURCES = \
  383. spmv/dw_spmv.c
  384. if STARPU_USE_CUDA
  385. spmv_dw_spmv_SOURCES += \
  386. spmv/spmv_cuda.cu
  387. endif
  388. if ATLAS_BLAS_LIB
  389. examplebin_PROGRAMS += \
  390. spmv/dw_block_spmv
  391. spmv_dw_block_spmv_SOURCES = \
  392. spmv/dw_block_spmv.c \
  393. spmv/dw_block_spmv_kernels.c \
  394. spmv/matrix_market/mm_to_bcsr.c \
  395. spmv/matrix_market/mmio.c
  396. endif
  397. #######################
  398. # Incrementer example #
  399. #######################
  400. check_PROGRAMS += \
  401. incrementer/incrementer
  402. examplebin_PROGRAMS += \
  403. incrementer/incrementer
  404. incrementer_incrementer_SOURCES = \
  405. incrementer/incrementer.c
  406. if STARPU_USE_CUDA
  407. incrementer_incrementer_SOURCES += \
  408. incrementer/incrementer_kernels.cu
  409. endif
  410. if STARPU_USE_OPENCL
  411. incrementer_incrementer_SOURCES += \
  412. incrementer/incrementer_kernels_opencl.c
  413. endif
  414. nobase_STARPU_OPENCL_DATA_DATA += \
  415. incrementer/incrementer_kernels_opencl_codelet.cl
  416. ######################
  417. # matVecMult example #
  418. ######################
  419. check_PROGRAMS += \
  420. matvecmult/matvecmult
  421. examplebin_PROGRAMS += \
  422. matvecmult/matvecmult
  423. matvecmult_matvecmult_SOURCES = \
  424. matvecmult/matvecmult.c
  425. if STARPU_USE_OPENCL
  426. nobase_STARPU_OPENCL_DATA_DATA += \
  427. matvecmult/matvecmult_kernel.cl
  428. endif
  429. #####################
  430. # profiling example #
  431. #####################
  432. check_PROGRAMS += \
  433. profiling/profiling
  434. examplebin_PROGRAMS += \
  435. profiling/profiling
  436. profiling_profiling_SOURCES = \
  437. profiling/profiling.c
  438. #####################
  439. # scheduler example #
  440. #####################
  441. check_PROGRAMS += \
  442. scheduler/dummy_sched
  443. examplebin_PROGRAMS += \
  444. scheduler/dummy_sched
  445. scheduler_dummy_sched_SOURCES = \
  446. scheduler/dummy_sched.c
  447. #######################
  448. # dot_product example #
  449. #######################
  450. check_PROGRAMS += \
  451. dot_product/dot_product
  452. examplebin_PROGRAMS += \
  453. dot_product/dot_product
  454. dot_product_dot_product_SOURCES = \
  455. dot_product/dot_product.c