Makefile.am 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  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. 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. cg/cg.h \
  79. heat/lu_kernels_model.h \
  80. heat/dw_sparse_cg.h \
  81. heat/heat.h \
  82. heat/dw_factolu.h \
  83. lu/xlu.h \
  84. lu/xlu_kernels.h \
  85. lu/float.h \
  86. lu/double.h \
  87. pi/pi.h \
  88. pi/SobolQRNG/sobol.h \
  89. pi/SobolQRNG/sobol_gold.h \
  90. pi/SobolQRNG/sobol_gpu.h \
  91. pi/SobolQRNG/sobol_primitives.h \
  92. cholesky/dw_cholesky_models.h \
  93. cholesky/dw_cholesky.h \
  94. common/blas_model.h \
  95. common/blas.h \
  96. mult/dw_mult.h \
  97. mult/simple.h \
  98. mult/double.h \
  99. mult/gordon/func_gemm_ibm.h \
  100. gordon/null.h \
  101. fortran/bindings/StarPU_fortran.h \
  102. ppm_downscaler/ppm_downscaler.h \
  103. ppm_downscaler/yuv_downscaler.h \
  104. spmv/matrix_market/mmio.h \
  105. spmv/matrix_market/mm_to_bcsr.h \
  106. spmv/dw_spmv.h \
  107. spmv/dw_block_spmv.h
  108. ##################
  109. # Basic examples #
  110. ##################
  111. examplebin_PROGRAMS += \
  112. basic_examples/hello_world
  113. basic_examples_hello_world_SOURCES = \
  114. basic_examples/hello_world.c
  115. examplebin_PROGRAMS += \
  116. basic_examples/vector_scal
  117. basic_examples_vector_scal_SOURCES = \
  118. basic_examples/vector_scal.c \
  119. basic_examples/vector_scal_cpu.c
  120. if STARPU_USE_CUDA
  121. basic_examples_vector_scal_SOURCES += \
  122. basic_examples/vector_scal_cuda.cu
  123. endif
  124. if STARPU_USE_OPENCL
  125. basic_examples_vector_scal_SOURCES += \
  126. basic_examples/vector_scal_opencl.c
  127. endif
  128. nobase_STARPU_OPENCL_DATA_DATA = \
  129. basic_examples/vector_scal_opencl_codelet.cl
  130. if STARPU_HAVE_F77_H
  131. examplebin_PROGRAMS += \
  132. basic_examples/vector_scal_fortran
  133. basic_examples_vector_scal_fortran_SOURCES = \
  134. basic_examples/vector_scal_fortran.F \
  135. basic_examples/vector_scal_c.c \
  136. basic_examples/vector_scal_cpu.c
  137. if STARPU_USE_CUDA
  138. basic_examples_vector_scal_fortran_SOURCES += \
  139. basic_examples/vector_scal_cuda.cu
  140. endif
  141. endif
  142. examplebin_PROGRAMS += \
  143. basic_examples/mult
  144. basic_examples_mult_SOURCES = \
  145. basic_examples/mult.c
  146. #################
  147. # block example #
  148. #################
  149. check_PROGRAMS += \
  150. basic_examples/block
  151. examplebin_PROGRAMS += \
  152. basic_examples/block
  153. basic_examples_block_SOURCES = \
  154. basic_examples/block.c \
  155. basic_examples/block_cpu.c
  156. if STARPU_USE_CUDA
  157. basic_examples_block_SOURCES += \
  158. basic_examples/block_cuda.cu
  159. endif
  160. if STARPU_USE_OPENCL
  161. basic_examples_block_SOURCES += \
  162. basic_examples/block_opencl.c
  163. nobase_STARPU_OPENCL_DATA_DATA += \
  164. basic_examples/block_opencl_kernel.cl
  165. endif
  166. ####################
  167. # Variable example #
  168. ####################
  169. check_PROGRAMS += \
  170. basic_examples/variable
  171. examplebin_PROGRAMS += \
  172. basic_examples/variable
  173. basic_examples_variable_SOURCES = \
  174. basic_examples/variable.c \
  175. basic_examples/variable_kernels_cpu.c
  176. if STARPU_USE_CUDA
  177. basic_examples_variable_SOURCES += \
  178. basic_examples/variable_kernels.cu
  179. endif
  180. if STARPU_USE_OPENCL
  181. basic_examples_variable_SOURCES += \
  182. basic_examples/variable_kernels_opencl.c
  183. endif
  184. nobase_STARPU_OPENCL_DATA_DATA += \
  185. basic_examples/variable_kernels_opencl_codelet.cl
  186. ###########
  187. # Filters #
  188. ###########
  189. examplebin_PROGRAMS += \
  190. filters/fvector \
  191. filters/fblock \
  192. filters/fmatrix
  193. filters_fvector_SOURCES = \
  194. filters/fvector.c
  195. filters_fblock_SOURCES = \
  196. filters/fblock.c \
  197. filters/fblock_cpu.c
  198. if STARPU_USE_CUDA
  199. filters_fblock_SOURCES += \
  200. filters/fblock_cuda.cu
  201. endif
  202. if STARPU_USE_OPENCL
  203. filters_fblock_SOURCES += \
  204. filters/fblock_opencl.c
  205. endif
  206. nobase_STARPU_OPENCL_DATA_DATA += \
  207. filters/fblock_opencl_codelet.cl
  208. filters_fmatrix_SOURCES = \
  209. filters/fmatrix.c
  210. ###################
  211. # PPM downscaling #
  212. ###################
  213. examplebin_PROGRAMS += \
  214. ppm_downscaler/ppm_downscaler
  215. ppm_downscaler_ppm_downscaler_SOURCES = \
  216. ppm_downscaler/ppm_downscaler.c
  217. examplebin_PROGRAMS += \
  218. ppm_downscaler/yuv_downscaler
  219. ppm_downscaler_yuv_downscaler_SOURCES = \
  220. ppm_downscaler/yuv_downscaler.c
  221. ######
  222. # Pi #
  223. ######
  224. check_PROGRAMS += \
  225. pi/pi_redux
  226. examplebin_PROGRAMS += \
  227. pi/pi \
  228. pi/pi_redux
  229. pi_pi_SOURCES = \
  230. pi/pi.c \
  231. pi/SobolQRNG/sobol_gold.c \
  232. pi/SobolQRNG/sobol_primitives.c
  233. if STARPU_USE_CUDA
  234. pi_pi_SOURCES += \
  235. pi/pi_kernel.cu \
  236. pi/SobolQRNG/sobol_gpu.cu
  237. endif
  238. pi_pi_redux_SOURCES = \
  239. pi/pi_redux.c
  240. if STARPU_USE_CUDA
  241. pi_pi_redux_SOURCES += \
  242. pi/pi_redux_kernel.cu
  243. endif
  244. ################
  245. # AXPY example #
  246. ################
  247. if !NO_BLAS_LIB
  248. examplebin_PROGRAMS += \
  249. axpy/axpy
  250. axpy_axpy_SOURCES = \
  251. axpy/axpy.c \
  252. common/blas.c
  253. endif
  254. ################
  255. # Mult example #
  256. ################
  257. if !NO_BLAS_LIB
  258. examplebin_PROGRAMS += \
  259. mult/sgemm \
  260. mult/dgemm \
  261. mult/dw_mult_no_stride \
  262. mult/dw_mult_no_stride_no_tag
  263. mult_sgemm_SOURCES = \
  264. mult/sgemm.c \
  265. common/blas.c \
  266. common/blas_model.c
  267. mult_dgemm_SOURCES = \
  268. mult/dgemm.c \
  269. common/blas.c \
  270. common/blas_model.c
  271. mult_dw_mult_no_stride_SOURCES = \
  272. mult/dw_mult_no_stride.c \
  273. common/blas.c \
  274. common/blas_model.c
  275. mult_dw_mult_no_stride_no_tag_SOURCES = \
  276. mult/dw_mult_no_stride_no_tag.c \
  277. common/blas.c \
  278. common/blas_model.c
  279. endif
  280. ####################
  281. # Cholesky example #
  282. ####################
  283. if !NO_BLAS_LIB
  284. examplebin_PROGRAMS += \
  285. cholesky/dw_cholesky \
  286. cholesky/dw_cholesky_no_stride \
  287. cholesky/dw_cholesky_grain
  288. cholesky_dw_cholesky_SOURCES = \
  289. cholesky/dw_cholesky.c \
  290. cholesky/dw_cholesky_models.c \
  291. cholesky/dw_cholesky_kernels.c \
  292. common/blas.c
  293. cholesky_dw_cholesky_no_stride_SOURCES = \
  294. cholesky/dw_cholesky_no_stride.c \
  295. cholesky/dw_cholesky_models.c \
  296. cholesky/dw_cholesky_kernels.c \
  297. common/blas.c
  298. cholesky_dw_cholesky_grain_SOURCES = \
  299. cholesky/dw_cholesky_grain.c \
  300. cholesky/dw_cholesky_models.c \
  301. cholesky/dw_cholesky_kernels.c \
  302. common/blas.c
  303. endif
  304. ##############
  305. # LU example #
  306. ##############
  307. if !NO_BLAS_LIB
  308. check_PROGRAMS += \
  309. lu/lu_example_float \
  310. lu/lu_implicit_example_float
  311. examplebin_PROGRAMS += \
  312. lu/lu_example_float \
  313. lu/lu_example_double
  314. lu_lu_example_float_SOURCES = \
  315. lu/lu_example_float.c \
  316. lu/slu.c \
  317. lu/slu_pivot.c \
  318. lu/slu_kernels.c \
  319. common/blas.c
  320. lu_lu_example_double_SOURCES = \
  321. lu/lu_example_double.c \
  322. lu/dlu.c \
  323. lu/dlu_pivot.c \
  324. lu/dlu_kernels.c \
  325. common/blas.c
  326. examplebin_PROGRAMS += \
  327. lu/lu_implicit_example_float \
  328. lu/lu_implicit_example_double
  329. lu_lu_implicit_example_float_SOURCES = \
  330. lu/lu_example_float.c \
  331. lu/slu_implicit.c \
  332. lu/slu_implicit_pivot.c \
  333. lu/slu_kernels.c \
  334. common/blas.c
  335. lu_lu_implicit_example_double_SOURCES = \
  336. lu/lu_example_double.c \
  337. lu/dlu_implicit.c \
  338. lu/dlu_implicit_pivot.c \
  339. lu/dlu_kernels.c \
  340. common/blas.c
  341. endif
  342. ################
  343. # Heat example #
  344. ################
  345. if !NO_BLAS_LIB
  346. examplebin_PROGRAMS += heat/heat
  347. heat_heat_SOURCES = \
  348. heat/heat.c \
  349. heat/dw_factolu.c \
  350. heat/dw_factolu_tag.c \
  351. heat/dw_factolu_grain.c \
  352. heat/dw_sparse_cg.c \
  353. heat/heat_display.c \
  354. heat/lu_kernels_model.c \
  355. heat/dw_sparse_cg_kernels.c \
  356. heat/dw_factolu_kernels.c \
  357. common/blas.c
  358. endif
  359. ##############
  360. # CG example #
  361. ##############
  362. if !NO_BLAS_LIB
  363. examplebin_PROGRAMS += cg/cg
  364. cg_cg_SOURCES = \
  365. cg/cg.c \
  366. cg/cg_kernels.c \
  367. common/blas.c
  368. endif
  369. ################
  370. # Tag examples #
  371. ################
  372. check_PROGRAMS += \
  373. tag_example/tag_example \
  374. tag_example/tag_example3 \
  375. tag_example/tag_example2 \
  376. tag_example/tag_restartable
  377. examplebin_PROGRAMS += \
  378. tag_example/tag_example \
  379. tag_example/tag_example3 \
  380. tag_example/tag_example2 \
  381. tag_example/tag_restartable
  382. tag_example_tag_example_SOURCES = \
  383. tag_example/tag_example.c
  384. tag_example_tag_example2_SOURCES = \
  385. tag_example/tag_example2.c
  386. tag_example_tag_example3_SOURCES = \
  387. tag_example/tag_example3.c
  388. tag_example_tag_restartable_SOURCES = \
  389. tag_example/tag_restartable.c
  390. ################
  391. # SpMV example #
  392. ################
  393. examplebin_PROGRAMS += \
  394. spmv/dw_spmv
  395. spmv_dw_spmv_SOURCES = \
  396. spmv/dw_spmv.c
  397. if STARPU_USE_CUDA
  398. spmv_dw_spmv_SOURCES += \
  399. spmv/spmv_cuda.cu
  400. endif
  401. if ATLAS_BLAS_LIB
  402. examplebin_PROGRAMS += \
  403. spmv/dw_block_spmv
  404. spmv_dw_block_spmv_SOURCES = \
  405. spmv/dw_block_spmv.c \
  406. spmv/dw_block_spmv_kernels.c \
  407. spmv/matrix_market/mm_to_bcsr.c \
  408. spmv/matrix_market/mmio.c
  409. endif
  410. #######################
  411. # Incrementer example #
  412. #######################
  413. check_PROGRAMS += \
  414. incrementer/incrementer
  415. examplebin_PROGRAMS += \
  416. incrementer/incrementer
  417. incrementer_incrementer_SOURCES = \
  418. incrementer/incrementer.c
  419. if STARPU_USE_CUDA
  420. incrementer_incrementer_SOURCES += \
  421. incrementer/incrementer_kernels.cu
  422. endif
  423. if STARPU_USE_OPENCL
  424. incrementer_incrementer_SOURCES += \
  425. incrementer/incrementer_kernels_opencl.c
  426. endif
  427. nobase_STARPU_OPENCL_DATA_DATA += \
  428. incrementer/incrementer_kernels_opencl_codelet.cl
  429. ######################
  430. # matVecMult example #
  431. ######################
  432. check_PROGRAMS += \
  433. matvecmult/matvecmult
  434. examplebin_PROGRAMS += \
  435. matvecmult/matvecmult
  436. matvecmult_matvecmult_SOURCES = \
  437. matvecmult/matvecmult.c
  438. if STARPU_USE_OPENCL
  439. nobase_STARPU_OPENCL_DATA_DATA += \
  440. matvecmult/matvecmult_kernel.cl
  441. endif
  442. #####################
  443. # profiling example #
  444. #####################
  445. check_PROGRAMS += \
  446. profiling/profiling
  447. examplebin_PROGRAMS += \
  448. profiling/profiling
  449. profiling_profiling_SOURCES = \
  450. profiling/profiling.c
  451. #####################
  452. # scheduler example #
  453. #####################
  454. check_PROGRAMS += \
  455. scheduler/dummy_sched
  456. examplebin_PROGRAMS += \
  457. scheduler/dummy_sched
  458. scheduler_dummy_sched_SOURCES = \
  459. scheduler/dummy_sched.c
  460. #######################
  461. # dot_product example #
  462. #######################
  463. check_PROGRAMS += \
  464. dot_product/dot_product
  465. examplebin_PROGRAMS += \
  466. dot_product/dot_product
  467. dot_product_dot_product_SOURCES = \
  468. dot_product/dot_product.c