Makefile.am 12 KB

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