Makefile.am 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2016 Université de Bordeaux
  4. # Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 CNRS
  5. # Copyright (C) 2011 Télécom-SudParis
  6. # Copyright (C) 2011-2012 INRIA
  7. # Copyright (C) 2015-2016 Inria
  8. #
  9. # StarPU is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU Lesser General Public License as published by
  11. # the Free Software Foundation; either version 2.1 of the License, or (at
  12. # your option) any later version.
  13. #
  14. # StarPU is distributed in the hope that it will be useful, but
  15. # WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. #
  18. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  19. include $(top_srcdir)/starpu.mk
  20. if STARPU_SIMGRID
  21. STARPU_PERF_MODEL_DIR=$(abs_top_srcdir)/tools/perfmodels/sampling
  22. STARPU_HOSTNAME=mirage
  23. export STARPU_PERF_MODEL_DIR
  24. export STARPU_HOSTNAME
  25. endif
  26. AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
  27. AM_CXXFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CXXFLAGS) -Wno-unused
  28. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(MAGMA_LIBS) $(HWLOC_LIBS) @LIBS@ $(FXT_LIBS)
  29. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  30. AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@ $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
  31. SUBDIRS = stencil
  32. BUILT_SOURCES =
  33. if STARPU_USE_OPENCL
  34. nobase_STARPU_OPENCL_DATA_DATA =
  35. endif
  36. EXTRA_DIST = \
  37. README.txt \
  38. axpy/axpy.h \
  39. axpy/axpy_opencl_kernel.cl \
  40. basic_examples/vector_scal_opencl_kernel.cl \
  41. basic_examples/multiformat_types.h \
  42. basic_examples/multiformat_opencl_kernel.cl \
  43. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl \
  44. common/blas_model.c \
  45. spmd/vector_scal_spmd.c \
  46. spmv/spmv_cuda.cu \
  47. spmv/spmv_opencl.cl \
  48. spmv/matrix_market/examples/fidapm05.mtx \
  49. mult/xgemm.c \
  50. lu/xlu.c \
  51. lu/xlu_pivot.c \
  52. lu/xlu_implicit.c \
  53. lu/xlu_implicit_pivot.c \
  54. lu/xlu_kernels.c \
  55. lu/lu_example.c \
  56. incrementer/incrementer_kernels_opencl_kernel.cl \
  57. basic_examples/variable_kernels_opencl_kernel.cl \
  58. matvecmult/matvecmult_kernel.cl \
  59. basic_examples/block_opencl_kernel.cl \
  60. filters/fblock_opencl_kernel.cl \
  61. filters/custom_mf/conversion_opencl.cl \
  62. filters/custom_mf/custom_opencl.cl \
  63. filters/custom_mf/custom_types.h \
  64. interface/complex_kernels.cl \
  65. reductions/dot_product.h \
  66. reductions/dot_product_opencl_kernels.cl \
  67. scheduler/schedulers.sh \
  68. scheduler/schedulers_context.sh \
  69. fortran/Makefile
  70. CLEANFILES = *.gcno *.gcda *.linkinfo *.mod starpu_idle_microsec.log
  71. if STARPU_USE_CUDA
  72. if STARPU_COVERITY
  73. include $(top_srcdir)/starpu-mynvcc.mk
  74. else
  75. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/ $(HWLOC_CFLAGS)
  76. .cu.o:
  77. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  78. endif
  79. endif
  80. if STARPU_HAVE_ICC
  81. .icc.o:
  82. $(ICC) -x c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
  83. $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $< -c -o $@
  84. endif
  85. examplebindir = $(libdir)/starpu/examples/
  86. examplebin_PROGRAMS =
  87. noinst_HEADERS = \
  88. axpy/axpy.h \
  89. cg/cg.h \
  90. heat/lu_kernels_model.h \
  91. heat/dw_sparse_cg.h \
  92. heat/heat.h \
  93. heat/dw_factolu.h \
  94. lu/xlu.h \
  95. lu/xlu_kernels.h \
  96. lu/lu-float.h \
  97. lu/lu-double.h \
  98. lu/complex_float.h \
  99. lu/complex_double.h \
  100. lu/blas_complex.h \
  101. cholesky/cholesky.h \
  102. sched_ctx_utils/sched_ctx_utils.h \
  103. common/blas_model.h \
  104. common/blas.h \
  105. mult/simple.h \
  106. mult/double.h \
  107. fortran/StarPU_fortran.h \
  108. ppm_downscaler/ppm_downscaler.h \
  109. ppm_downscaler/yuv_downscaler.h \
  110. spmv/matrix_market/mmio.h \
  111. spmv/matrix_market/mm_to_bcsr.h \
  112. spmv/spmv.h \
  113. spmv/dw_block_spmv.h \
  114. basic_examples/multiformat_types.h \
  115. filters/custom_mf/custom_interface.h \
  116. filters/custom_mf/custom_types.h \
  117. interface/complex_interface.h \
  118. interface/complex_codelet.h \
  119. pi/pi.h \
  120. pi/SobolQRNG/sobol.h \
  121. pi/SobolQRNG/sobol_gold.h \
  122. pi/SobolQRNG/sobol_gpu.h \
  123. pi/SobolQRNG/sobol_primitives.h \
  124. reductions/dot_product.h \
  125. basic_examples/vector_scal_cpu_template.h
  126. #####################################
  127. # What to install and what to check #
  128. #####################################
  129. examplebin_PROGRAMS += $(STARPU_EXAMPLES)
  130. TESTS = $(STARPU_EXAMPLES)
  131. if STARPU_NEW_CHECK
  132. TESTS += scheduler/schedulers.sh
  133. TESTS += scheduler/schedulers_context.sh
  134. endif
  135. if STARPU_HAVE_WINDOWS
  136. check_PROGRAMS = $(STARPU_EXAMPLES)
  137. else
  138. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  139. endif
  140. if !STARPU_HAVE_WINDOWS
  141. ## test loader program
  142. if !STARPU_CROSS_COMPILING
  143. LOADER = loader
  144. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  145. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  146. loader_SOURCES = ../tests/loader.c
  147. else
  148. LOADER =
  149. LOADER_BIN = $(top_builddir)/examples/loader-cross.sh
  150. endif
  151. if STARPU_HAVE_AM111
  152. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  153. LOG_COMPILER = $(LOADER_BIN)
  154. else
  155. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  156. endif
  157. endif
  158. # STARPU_EXAMPLES list all applications which have to be compiled and checked
  159. # Applications which should only be compiled are added directly in examplebin_PROGRAMS
  160. # see for instance mandelbrot/mandelbrot
  161. STARPU_EXAMPLES =
  162. STARPU_EXAMPLES += \
  163. sched_ctx/prio \
  164. worker_collections/worker_list_example
  165. if !STARPU_SIMGRID
  166. STARPU_EXAMPLES += \
  167. basic_examples/hello_world \
  168. basic_examples/vector_scal \
  169. basic_examples/mult \
  170. basic_examples/block \
  171. basic_examples/variable \
  172. basic_examples/multiformat \
  173. basic_examples/dynamic_handles \
  174. cpp/incrementer_cpp \
  175. filters/fvector \
  176. filters/fblock \
  177. filters/fmatrix \
  178. filters/fmultiple_manual \
  179. filters/fmultiple_submit \
  180. filters/fmultiple_submit_readonly \
  181. tag_example/tag_example \
  182. tag_example/tag_example2 \
  183. tag_example/tag_example3 \
  184. tag_example/tag_example4 \
  185. tag_example/tag_restartable \
  186. spmd/vector_scal_spmd \
  187. spmv/spmv \
  188. callback/callback \
  189. callback/prologue \
  190. incrementer/incrementer \
  191. binary/binary \
  192. interface/complex \
  193. matvecmult/matvecmult \
  194. profiling/profiling \
  195. scheduler/dummy_sched \
  196. scheduler/heteroprio_test \
  197. sched_ctx/sched_ctx \
  198. sched_ctx/dummy_sched_with_ctx \
  199. worker_collections/worker_tree_example \
  200. reductions/dot_product \
  201. reductions/minmax_reduction
  202. endif
  203. if !STARPU_SIMGRID
  204. STARPU_EXAMPLES += \
  205. scheduler/dummy_sched
  206. if STARPU_HAVE_F77
  207. if STARPU_HAVE_F77_H
  208. STARPU_EXAMPLES += \
  209. fortran/hello
  210. endif
  211. STARPU_EXAMPLES += \
  212. basic_examples/vector_scal_fortran
  213. endif
  214. if STARPU_HAVE_FC
  215. if !STARPU_SANITIZE
  216. STARPU_EXAMPLES += \
  217. fortran90/f90_example \
  218. native_fortran/nf_vector \
  219. native_fortran/nf_matrix \
  220. native_fortran/nf_example \
  221. native_fortran/nf_dynbuf \
  222. native_fortran/nf_varbuf \
  223. native_fortran/nf_partition
  224. endif
  225. endif
  226. endif
  227. if !NO_BLAS_LIB
  228. STARPU_EXAMPLES += \
  229. mult/sgemm \
  230. mult/dgemm \
  231. cholesky/cholesky_tag \
  232. cholesky/cholesky_tile_tag \
  233. cholesky/cholesky_implicit
  234. if !STARPU_SIMGRID
  235. STARPU_EXAMPLES += \
  236. axpy/axpy \
  237. cholesky/cholesky_grain_tag \
  238. lu/lu_example_float \
  239. lu/lu_example_double \
  240. lu/lu_implicit_example_float \
  241. lu/lu_implicit_example_double \
  242. heat/heat \
  243. cg/cg \
  244. pipeline/pipeline
  245. endif
  246. endif
  247. if !STARPU_SIMGRID
  248. if MKL_BLAS_LIB
  249. STARPU_EXAMPLES += \
  250. lu/lu_example_complex_float \
  251. lu/lu_example_complex_double \
  252. lu/lu_implicit_example_complex_float \
  253. lu/lu_implicit_example_complex_double
  254. endif
  255. if ATLAS_BLAS_LIB
  256. STARPU_EXAMPLES += \
  257. spmv/dw_block_spmv
  258. endif
  259. if !STARPU_SIMGRID
  260. if STARPU_HAVE_F77
  261. if STARPU_HAVE_F77_H
  262. STARPU_EXAMPLES += \
  263. fortran/hello
  264. endif
  265. STARPU_EXAMPLES += \
  266. basic_examples/vector_scal_fortran
  267. endif
  268. endif
  269. if STARPU_HAVE_OPENMP
  270. STARPU_EXAMPLES += \
  271. openmp/vector_scal_omp \
  272. sched_ctx/sched_ctx_without_sched_policy\
  273. sched_ctx/nested_sched_ctxs \
  274. sched_ctx/sched_ctx_without_sched_policy_awake\
  275. sched_ctx/parallel_tasks_reuse_handle
  276. if STARPU_LONG_CHECK
  277. STARPU_EXAMPLES += \
  278. sched_ctx/parallel_code
  279. endif
  280. if STARPU_HAVE_HWLOC
  281. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  282. STARPU_EXAMPLES += \
  283. sched_ctx/parallel_tasks_with_cluster_api
  284. endif
  285. endif
  286. endif
  287. endif !STARPU_SIMGRID
  288. ##################
  289. # Basic examples #
  290. ##################
  291. basic_examples_vector_scal_SOURCES = \
  292. basic_examples/vector_scal.c \
  293. basic_examples/vector_scal_cpu.c
  294. if STARPU_HAVE_ICC
  295. if STARPU_CROSS_COMPILING
  296. else
  297. basic_examples_vector_scal_SOURCES += \
  298. basic_examples/vector_scal_cpu_icc.icc
  299. endif
  300. endif
  301. if STARPU_USE_CUDA
  302. basic_examples_vector_scal_SOURCES += \
  303. basic_examples/vector_scal_cuda.cu
  304. endif
  305. if STARPU_USE_OPENCL
  306. basic_examples_vector_scal_SOURCES += \
  307. basic_examples/vector_scal_opencl.c
  308. nobase_STARPU_OPENCL_DATA_DATA += \
  309. basic_examples/vector_scal_opencl_kernel.cl
  310. endif
  311. if STARPU_HAVE_F77
  312. basic_examples_vector_scal_fortran_SOURCES = \
  313. basic_examples/vector_scal_fortran.F \
  314. basic_examples/vector_scal_c.c \
  315. basic_examples/vector_scal_cpu.c
  316. if STARPU_USE_CUDA
  317. basic_examples_vector_scal_fortran_SOURCES += \
  318. basic_examples/vector_scal_cuda.cu
  319. basic_examples_vector_scal_fortran_LDADD = \
  320. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  321. endif
  322. if STARPU_HAVE_F77_H
  323. fortran_hello_SOURCES = \
  324. fortran/hello_c.c \
  325. fortran/hello.F \
  326. fortran/StarPU_fortran.h
  327. endif
  328. endif
  329. if STARPU_HAVE_FC
  330. fortran90_f90_example_SOURCES = \
  331. fortran90/mod_types.f90 \
  332. $(top_srcdir)/include/starpu_mod.f90 \
  333. fortran90/mod_interface.f90 \
  334. fortran90/mod_compute.f90 \
  335. fortran90/marshalling.c \
  336. fortran90/f90_example.f90
  337. native_fortran_nf_vector_SOURCES = \
  338. native_fortran/nf_codelets.f90 \
  339. $(top_srcdir)/include/fstarpu_mod.f90 \
  340. native_fortran/nf_vector.f90
  341. native_fortran_nf_matrix_SOURCES = \
  342. native_fortran/nf_codelets.f90 \
  343. $(top_srcdir)/include/fstarpu_mod.f90 \
  344. native_fortran/nf_matrix.f90
  345. native_fortran_nf_example_SOURCES = \
  346. native_fortran/nf_types.f90 \
  347. native_fortran/nf_compute.f90 \
  348. $(top_srcdir)/include/fstarpu_mod.f90 \
  349. native_fortran/nf_example.f90
  350. native_fortran_nf_dynbuf_SOURCES = \
  351. native_fortran/nf_dynbuf_cl.f90 \
  352. $(top_srcdir)/include/fstarpu_mod.f90 \
  353. native_fortran/nf_dynbuf.f90
  354. native_fortran_nf_varbuf_SOURCES = \
  355. native_fortran/nf_varbuf_cl.f90 \
  356. $(top_srcdir)/include/fstarpu_mod.f90 \
  357. native_fortran/nf_varbuf.f90
  358. native_fortran_nf_partition_SOURCES = \
  359. native_fortran/nf_partition_cl.f90 \
  360. $(top_srcdir)/include/fstarpu_mod.f90 \
  361. native_fortran/nf_partition.f90
  362. endif
  363. #######################
  364. # Multiformat example #
  365. #######################
  366. basic_examples_multiformat_SOURCES = \
  367. basic_examples/multiformat.c \
  368. basic_examples/multiformat_conversion_codelets.c
  369. if STARPU_USE_CUDA
  370. basic_examples_multiformat_SOURCES += \
  371. basic_examples/multiformat_cuda.cu \
  372. basic_examples/multiformat_conversion_codelets_cuda.cu
  373. endif
  374. if STARPU_USE_OPENCL
  375. basic_examples_multiformat_SOURCES += \
  376. basic_examples/multiformat_opencl.c \
  377. basic_examples/multiformat_conversion_codelets_opencl.c
  378. nobase_STARPU_OPENCL_DATA_DATA += \
  379. basic_examples/multiformat_opencl_kernel.cl \
  380. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  381. endif
  382. #################
  383. # block example #
  384. #################
  385. basic_examples_block_SOURCES = \
  386. basic_examples/block.c \
  387. basic_examples/block_cpu.c
  388. if STARPU_USE_CUDA
  389. basic_examples_block_SOURCES += \
  390. basic_examples/block_cuda.cu
  391. endif
  392. if STARPU_USE_OPENCL
  393. basic_examples_block_SOURCES += \
  394. basic_examples/block_opencl.c
  395. nobase_STARPU_OPENCL_DATA_DATA += \
  396. basic_examples/block_opencl_kernel.cl
  397. endif
  398. ####################
  399. # Variable example #
  400. ####################
  401. basic_examples_variable_SOURCES = \
  402. basic_examples/variable.c \
  403. basic_examples/variable_kernels_cpu.c
  404. if STARPU_USE_CUDA
  405. basic_examples_variable_SOURCES += \
  406. basic_examples/variable_kernels.cu
  407. endif
  408. if STARPU_USE_OPENCL
  409. basic_examples_variable_SOURCES += \
  410. basic_examples/variable_kernels_opencl.c
  411. nobase_STARPU_OPENCL_DATA_DATA += \
  412. basic_examples/variable_kernels_opencl_kernel.cl
  413. endif
  414. ###########
  415. # Filters #
  416. ###########
  417. filters_fblock_SOURCES = \
  418. filters/fblock.c \
  419. filters/fblock_cpu.c
  420. if STARPU_USE_CUDA
  421. filters_fblock_SOURCES += \
  422. filters/fblock_cuda.cu
  423. endif
  424. if STARPU_USE_OPENCL
  425. filters_fblock_SOURCES += \
  426. filters/fblock_opencl.c
  427. nobase_STARPU_OPENCL_DATA_DATA += \
  428. filters/fblock_opencl_kernel.cl
  429. endif
  430. filters_fmultiple_manual_SOURCES = \
  431. filters/fmultiple_manual.c
  432. if STARPU_USE_CUDA
  433. filters_fmultiple_manual_SOURCES += \
  434. filters/fmultiple_cuda.cu
  435. endif
  436. filters_fmultiple_submit_SOURCES = \
  437. filters/fmultiple_submit.c
  438. if STARPU_USE_CUDA
  439. filters_fmultiple_submit_SOURCES += \
  440. filters/fmultiple_cuda.cu
  441. endif
  442. filters_fmultiple_submit_readonly_SOURCES = \
  443. filters/fmultiple_submit_readonly.c
  444. if STARPU_USE_CUDA
  445. filters_fmultiple_submit_readonly_SOURCES += \
  446. filters/fmultiple_cuda.cu
  447. endif
  448. examplebin_PROGRAMS += \
  449. filters/shadow \
  450. filters/shadow2d \
  451. filters/shadow3d
  452. #############################
  453. # Custom multiformat filter #
  454. #############################
  455. #TODO: see why the application is failing
  456. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  457. examplebin_PROGRAMS += \
  458. filters/custom_mf/custom_mf_filter
  459. filters_custom_mf_custom_mf_filter_SOURCES=\
  460. filters/custom_mf/custom_mf_filter.c \
  461. filters/custom_mf/custom_interface.c \
  462. filters/custom_mf/custom_conversion_codelets.c
  463. if STARPU_USE_CUDA
  464. filters_custom_mf_custom_mf_filter_SOURCES += \
  465. filters/custom_mf/conversion.cu \
  466. filters/custom_mf/cuda.cu
  467. endif
  468. if STARPU_USE_OPENCL
  469. filters_custom_mf_custom_mf_filter_SOURCES += \
  470. filters/custom_mf/conversion_opencl.c \
  471. filters/custom_mf/custom_opencl.c
  472. nobase_STARPU_OPENCL_DATA_DATA += \
  473. filters/custom_mf/conversion_opencl.cl \
  474. filters/custom_mf/custom_opencl.cl
  475. endif
  476. ################
  477. # AXPY example #
  478. ################
  479. if !NO_BLAS_LIB
  480. axpy_axpy_SOURCES = \
  481. axpy/axpy.c \
  482. common/blas.c
  483. if STARPU_USE_OPENCL
  484. axpy_axpy_SOURCES += \
  485. axpy/axpy_opencl.c
  486. nobase_STARPU_OPENCL_DATA_DATA += \
  487. axpy/axpy_opencl_kernel.cl
  488. endif
  489. axpy_axpy_LDADD = \
  490. $(STARPU_BLAS_LDFLAGS)
  491. endif
  492. ################
  493. # Mult example #
  494. ################
  495. if !NO_BLAS_LIB
  496. mult_sgemm_SOURCES = \
  497. mult/sgemm.c \
  498. common/blas.c
  499. mult_sgemm_LDADD = \
  500. $(STARPU_BLAS_LDFLAGS)
  501. mult_dgemm_SOURCES = \
  502. mult/dgemm.c \
  503. common/blas.c
  504. mult_dgemm_LDADD = \
  505. $(STARPU_BLAS_LDFLAGS)
  506. endif
  507. ####################
  508. # Cholesky example #
  509. ####################
  510. if !NO_BLAS_LIB
  511. cholesky_cholesky_tag_SOURCES = \
  512. cholesky/cholesky_tag.c \
  513. cholesky/cholesky_models.c \
  514. cholesky/cholesky_kernels.c \
  515. common/blas.c
  516. cholesky_cholesky_tag_LDADD = \
  517. $(STARPU_BLAS_LDFLAGS)
  518. cholesky_cholesky_tile_tag_SOURCES = \
  519. cholesky/cholesky_tile_tag.c \
  520. cholesky/cholesky_models.c \
  521. cholesky/cholesky_kernels.c \
  522. common/blas.c
  523. cholesky_cholesky_tile_tag_LDADD = \
  524. $(STARPU_BLAS_LDFLAGS)
  525. cholesky_cholesky_grain_tag_SOURCES = \
  526. cholesky/cholesky_grain_tag.c \
  527. cholesky/cholesky_models.c \
  528. cholesky/cholesky_kernels.c \
  529. common/blas.c
  530. cholesky_cholesky_grain_tag_LDADD = \
  531. $(STARPU_BLAS_LDFLAGS)
  532. cholesky_cholesky_implicit_SOURCES = \
  533. cholesky/cholesky_implicit.c \
  534. cholesky/cholesky_models.c \
  535. cholesky/cholesky_kernels.c \
  536. sched_ctx_utils/sched_ctx_utils.c \
  537. common/blas.c
  538. cholesky_cholesky_implicit_LDADD = \
  539. $(STARPU_BLAS_LDFLAGS)
  540. endif
  541. ##############
  542. # LU example #
  543. ##############
  544. if !NO_BLAS_LIB
  545. lu_lu_example_float_SOURCES = \
  546. lu/lu_example_float.c \
  547. lu/slu.c \
  548. lu/slu_pivot.c \
  549. lu/slu_kernels.c \
  550. common/blas.c
  551. lu_lu_example_float_LDADD = \
  552. $(STARPU_BLAS_LDFLAGS)
  553. lu_lu_example_double_SOURCES = \
  554. lu/lu_example_double.c \
  555. lu/dlu.c \
  556. lu/dlu_pivot.c \
  557. lu/dlu_kernels.c \
  558. common/blas.c
  559. lu_lu_example_double_LDADD = \
  560. $(STARPU_BLAS_LDFLAGS)
  561. lu_lu_implicit_example_float_SOURCES = \
  562. lu/lu_example_float.c \
  563. lu/slu_implicit.c \
  564. lu/slu_implicit_pivot.c \
  565. lu/slu_kernels.c \
  566. common/blas.c
  567. lu_lu_implicit_example_float_LDADD = \
  568. $(STARPU_BLAS_LDFLAGS)
  569. lu_lu_implicit_example_double_SOURCES = \
  570. lu/lu_example_double.c \
  571. lu/dlu_implicit.c \
  572. lu/dlu_implicit_pivot.c \
  573. lu/dlu_kernels.c \
  574. common/blas.c
  575. lu_lu_implicit_example_double_LDADD = \
  576. $(STARPU_BLAS_LDFLAGS)
  577. if MKL_BLAS_LIB
  578. lu_lu_example_complex_float_SOURCES = \
  579. lu/lu_example_complex_float.c \
  580. lu/clu.c \
  581. lu/clu_pivot.c \
  582. lu/clu_kernels.c \
  583. lu/blas_complex.c \
  584. common/blas.c
  585. lu_lu_example_complex_float_LDADD = \
  586. $(STARPU_BLAS_LDFLAGS)
  587. lu_lu_implicit_example_complex_float_SOURCES = \
  588. lu/lu_example_complex_float.c \
  589. lu/clu_implicit.c \
  590. lu/clu_implicit_pivot.c \
  591. lu/clu_kernels.c \
  592. lu/blas_complex.c \
  593. common/blas.c
  594. lu_lu_implicit_example_complex_float_LDADD = \
  595. $(STARPU_BLAS_LDFLAGS)
  596. lu_lu_example_complex_double_SOURCES = \
  597. lu/lu_example_complex_double.c \
  598. lu/zlu.c \
  599. lu/zlu_pivot.c \
  600. lu/zlu_kernels.c \
  601. lu/blas_complex.c \
  602. common/blas.c
  603. lu_lu_example_complex_double_LDADD = \
  604. $(STARPU_BLAS_LDFLAGS)
  605. lu_lu_implicit_example_complex_double_SOURCES = \
  606. lu/lu_example_complex_double.c \
  607. lu/zlu_implicit.c \
  608. lu/zlu_implicit_pivot.c \
  609. lu/zlu_kernels.c \
  610. lu/blas_complex.c \
  611. common/blas.c
  612. lu_lu_implicit_example_complex_double_LDADD = \
  613. $(STARPU_BLAS_LDFLAGS)
  614. endif
  615. endif
  616. ################
  617. # Heat example #
  618. ################
  619. if !NO_BLAS_LIB
  620. heat_heat_SOURCES = \
  621. heat/heat.c \
  622. heat/dw_factolu.c \
  623. heat/dw_factolu_tag.c \
  624. heat/dw_factolu_grain.c \
  625. heat/dw_sparse_cg.c \
  626. heat/heat_display.c \
  627. heat/lu_kernels_model.c \
  628. heat/dw_sparse_cg_kernels.c \
  629. heat/dw_factolu_kernels.c \
  630. common/blas.c
  631. heat_heat_LDADD = \
  632. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  633. $(STARPU_BLAS_LDFLAGS)
  634. endif
  635. ##############
  636. # CG example #
  637. ##############
  638. if !NO_BLAS_LIB
  639. cg_cg_SOURCES = \
  640. cg/cg.c \
  641. cg/cg_kernels.c \
  642. common/blas.c
  643. if STARPU_USE_CUDA
  644. cg_cg_SOURCES += \
  645. cg/cg_dot_kernel.cu
  646. endif
  647. cg_cg_LDADD = \
  648. $(STARPU_BLAS_LDFLAGS)
  649. endif
  650. ################
  651. # SPMD example #
  652. ################
  653. spmd_vector_scal_spmd_SOURCES = \
  654. spmd/vector_scal_spmd.c
  655. ################
  656. # SpMV example #
  657. ################
  658. spmv_spmv_SOURCES = \
  659. spmv/spmv.c \
  660. spmv/spmv_kernels.c
  661. if STARPU_USE_CUDA
  662. spmv_spmv_SOURCES += \
  663. spmv/spmv_cuda.cu
  664. endif
  665. if ATLAS_BLAS_LIB
  666. spmv_dw_block_spmv_SOURCES = \
  667. spmv/dw_block_spmv.c \
  668. spmv/dw_block_spmv_kernels.c \
  669. spmv/matrix_market/mm_to_bcsr.c \
  670. spmv/matrix_market/mmio.c
  671. spmv_dw_block_spmv_LDADD = \
  672. $(STARPU_BLAS_LDFLAGS)
  673. endif
  674. ###########################
  675. # C++ Incrementer example #
  676. ###########################
  677. cpp_incrementer_cpp_SOURCES = \
  678. cpp/incrementer_cpp.cpp
  679. if STARPU_USE_CUDA
  680. cpp_incrementer_cpp_SOURCES += \
  681. incrementer/incrementer_kernels.cu
  682. endif
  683. if STARPU_USE_OPENCL
  684. cpp_incrementer_cpp_SOURCES += \
  685. incrementer/incrementer_kernels_opencl.c
  686. endif
  687. #######################
  688. # Incrementer example #
  689. #######################
  690. incrementer_incrementer_SOURCES = \
  691. incrementer/incrementer.c
  692. if STARPU_USE_CUDA
  693. incrementer_incrementer_SOURCES += \
  694. incrementer/incrementer_kernels.cu
  695. endif
  696. if STARPU_USE_OPENCL
  697. incrementer_incrementer_SOURCES += \
  698. incrementer/incrementer_kernels_opencl.c
  699. nobase_STARPU_OPENCL_DATA_DATA += \
  700. incrementer/incrementer_kernels_opencl_kernel.cl
  701. endif
  702. ##################
  703. # Binary example #
  704. ##################
  705. binary_binary_SOURCES = \
  706. binary/binary.c
  707. if STARPU_USE_OPENCL
  708. binary_binary_SOURCES += \
  709. incrementer/incrementer_kernels_opencl.c
  710. endif
  711. #####################
  712. # interface example #
  713. #####################
  714. interface_complex_SOURCES = \
  715. interface/complex.c \
  716. interface/complex_interface.c
  717. if STARPU_USE_CUDA
  718. interface_complex_SOURCES += \
  719. interface/complex_kernels.cu
  720. endif
  721. if STARPU_USE_OPENCL
  722. interface_complex_SOURCES +=\
  723. interface/complex_kernels_opencl.c
  724. nobase_STARPU_OPENCL_DATA_DATA += \
  725. interface/complex_kernels.cl
  726. endif
  727. ######################
  728. # matVecMult example #
  729. ######################
  730. if STARPU_USE_OPENCL
  731. nobase_STARPU_OPENCL_DATA_DATA += \
  732. matvecmult/matvecmult_kernel.cl
  733. endif
  734. #######################
  735. # dot_product example #
  736. #######################
  737. reductions_dot_product_SOURCES = \
  738. reductions/dot_product.c
  739. if STARPU_USE_CUDA
  740. reductions_dot_product_SOURCES += \
  741. reductions/dot_product_kernels.cu
  742. endif
  743. if STARPU_USE_OPENCL
  744. nobase_STARPU_OPENCL_DATA_DATA += \
  745. reductions/dot_product_opencl_kernels.cl
  746. endif
  747. ##################
  748. # Mandelbrot Set #
  749. ##################
  750. examplebin_PROGRAMS += \
  751. mandelbrot/mandelbrot
  752. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  753. if HAVE_X11
  754. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  755. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
  756. endif
  757. ####################
  758. # Image downscaler #
  759. ####################
  760. examplebin_PROGRAMS += \
  761. ppm_downscaler/ppm_downscaler \
  762. ppm_downscaler/yuv_downscaler
  763. ################
  764. # Top Examples #
  765. ################
  766. examplebin_PROGRAMS += \
  767. top/hello_world_top
  768. top_hello_world_top_SOURCES = \
  769. top/hello_world_top.c
  770. ######
  771. # Pi #
  772. ######
  773. if !STARPU_HAVE_WINDOWS
  774. examplebin_PROGRAMS += \
  775. pi/pi \
  776. pi/pi_redux
  777. pi_pi_SOURCES = \
  778. pi/pi.c \
  779. pi/SobolQRNG/sobol_gold.c \
  780. pi/SobolQRNG/sobol_primitives.c
  781. if STARPU_USE_CUDA
  782. pi_pi_SOURCES += \
  783. pi/pi_kernel.cu \
  784. pi/SobolQRNG/sobol_gpu.cu
  785. endif
  786. pi_pi_redux_SOURCES = \
  787. pi/pi_redux.c
  788. if STARPU_USE_CUDA
  789. pi_pi_redux_SOURCES += \
  790. pi/pi_redux_kernel.cu
  791. pi_pi_redux_LDADD = \
  792. $(STARPU_CURAND_LDFLAGS)
  793. endif
  794. endif
  795. ###########################
  796. # OpenGL interoperability #
  797. ###########################
  798. if HAVE_OPENGL
  799. examplebin_PROGRAMS += \
  800. gl_interop/gl_interop \
  801. gl_interop/gl_interop_idle
  802. gl_interop_gl_interop_SOURCES = \
  803. gl_interop/gl_interop.c
  804. gl_interop_gl_interop_LDADD = \
  805. $(STARPU_OPENGL_RENDER_LDFLAGS)
  806. gl_interop_gl_interop_idle_SOURCES = \
  807. gl_interop/gl_interop_idle.c
  808. gl_interop_gl_interop_idle_LDADD = \
  809. $(STARPU_OPENGL_RENDER_LDFLAGS)
  810. endif
  811. ####################
  812. # pipeline example #
  813. ####################
  814. if !NO_BLAS_LIB
  815. pipeline_pipeline_SOURCES = \
  816. pipeline/pipeline.c \
  817. common/blas.c
  818. pipeline_pipeline_LDADD = \
  819. $(STARPU_BLAS_LDFLAGS)
  820. endif
  821. ##################
  822. # openmp example #
  823. ##################
  824. if STARPU_HAVE_OPENMP
  825. openmp_vector_scal_omp_CFLAGS = \
  826. $(AM_CFLAGS) -fopenmp
  827. sched_ctx_parallel_code_CFLAGS = \
  828. $(AM_CFLAGS) -fopenmp
  829. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  830. $(AM_CFLAGS) -fopenmp
  831. sched_ctx_nested_sched_ctxs_CFLAGS = \
  832. $(AM_CFLAGS) -fopenmp
  833. sched_ctx_parallel_tasks_reuse_handle_CFLAGS = \
  834. $(AM_CFLAGS) -fopenmp
  835. endif
  836. if STARPU_HAVE_FC
  837. # Fortran90 example
  838. # - list explicit dependences to control proper module files generation
  839. # - the overriding rule fully disables the corresponing default rule, thus
  840. # the default rule body must be copied entirely
  841. mod_types.mod: mod_types.o
  842. mod_compute.mod: mod_compute.o
  843. mod_interface.mod: mod_interface.o
  844. starpu_mod.mod: starpu_mod.o
  845. starpu_mod.o: $(top_srcdir)/include/starpu_mod.f90
  846. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/starpu_mod.f90
  847. mod_compute.o: $(top_srcdir)/examples/fortran90/mod_compute.f90 mod_types.mod mod_interface.mod starpu_mod.mod
  848. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/mod_compute.f90' || echo '$(srcdir)/'`fortran90/mod_compute.f90
  849. f90_example.o: $(top_srcdir)/examples/fortran90/f90_example.f90 $(top_srcdir)/examples/fortran90/marshalling.c mod_types.mod mod_interface.mod mod_compute.mod starpu_mod.mod
  850. $(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'fortran90/f90_example.f90' || echo '$(srcdir)/'`fortran90/f90_example.f90
  851. # Native Fortran example
  852. # - list explicit dependences to control proper module files generation
  853. # - the overriding rule fully disables the corresponing default rule, thus
  854. # the default rule body must be copied entirely
  855. nf_types.mod: nf_types.o
  856. nf_compute.mod: nf_compute.o
  857. fstarpu_mod.mod: fstarpu_mod.o
  858. nf_codelets.mod: nf_codelets.o
  859. nf_dynbuf_cl.mod: nf_dynbuf_cl.o
  860. nf_varbuf_cl.mod: nf_varbuf_cl.o
  861. nf_partition_cl.mod: nf_partition_cl.o
  862. fstarpu_mod.o: $(top_srcdir)/include/fstarpu_mod.f90
  863. $(AM_V_FC)$(FC) $(native_fortran_nf_vector_FCFLAGS) $(FCFLAGS) -c -o $@ '$(top_srcdir)/'include/fstarpu_mod.f90
  864. nf_codelets.o: $(top_srcdir)/examples/native_fortran/nf_codelets.f90 fstarpu_mod.mod
  865. $(AM_V_FC)$(FC) $(native_fortran_nf_vector_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_codelets.f90' || echo '$(srcdir)/'`native_fortran/nf_codelets.f90
  866. nf_vector.o: $(top_srcdir)/examples/native_fortran/nf_vector.f90 nf_codelets.mod fstarpu_mod.mod
  867. $(AM_V_FC)$(FC) $(native_fortran_nf_vector_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_vector.f90' || echo '$(srcdir)/'`native_fortran/nf_vector.f90
  868. nf_matrix.o: $(top_srcdir)/examples/native_fortran/nf_matrix.f90 nf_codelets.mod fstarpu_mod.mod
  869. $(AM_V_FC)$(FC) $(native_fortran_nf_matrix_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_matrix.f90' || echo '$(srcdir)/'`native_fortran/nf_matrix.f90
  870. nf_compute.o: $(top_srcdir)/examples/native_fortran/nf_compute.f90 nf_types.mod fstarpu_mod.mod
  871. $(AM_V_FC)$(FC) $(native_fortran_nf_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_compute.f90' || echo '$(srcdir)/'`native_fortran/nf_compute.f90
  872. nf_example.o: $(top_srcdir)/examples/native_fortran/nf_example.f90 nf_types.mod nf_compute.mod fstarpu_mod.mod
  873. $(AM_V_FC)$(FC) $(native_fortran_nf_example_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_example.f90' || echo '$(srcdir)/'`native_fortran/nf_example.f90
  874. nf_dynbuf_cl.o: $(top_srcdir)/examples/native_fortran/nf_dynbuf_cl.f90 nf_types.mod fstarpu_mod.mod
  875. $(AM_V_FC)$(FC) $(native_fortran_nf_dynbuf_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_dynbuf_cl.f90' || echo '$(srcdir)/'`native_fortran/nf_dynbuf_cl.f90
  876. nf_dynbuf.o: $(top_srcdir)/examples/native_fortran/nf_dynbuf.f90 nf_types.mod nf_dynbuf_cl.mod fstarpu_mod.mod
  877. $(AM_V_FC)$(FC) $(native_fortran_nf_dynbuf_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_dynbuf.f90' || echo '$(srcdir)/'`native_fortran/nf_dynbuf.f90
  878. nf_varbuf_cl.o: $(top_srcdir)/examples/native_fortran/nf_varbuf_cl.f90 nf_types.mod fstarpu_mod.mod
  879. $(AM_V_FC)$(FC) $(native_fortran_nf_varbuf_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_varbuf_cl.f90' || echo '$(srcdir)/'`native_fortran/nf_varbuf_cl.f90
  880. nf_varbuf.o: $(top_srcdir)/examples/native_fortran/nf_varbuf.f90 nf_types.mod nf_varbuf_cl.mod fstarpu_mod.mod
  881. $(AM_V_FC)$(FC) $(native_fortran_nf_varbuf_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_varbuf.f90' || echo '$(srcdir)/'`native_fortran/nf_varbuf.f90
  882. nf_partition_cl.o: $(top_srcdir)/examples/native_fortran/nf_partition_cl.f90 nf_types.mod fstarpu_mod.mod
  883. $(AM_V_FC)$(FC) $(native_fortran_nf_partition_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_partition_cl.f90' || echo '$(srcdir)/'`native_fortran/nf_partition_cl.f90
  884. nf_partition.o: $(top_srcdir)/examples/native_fortran/nf_partition.f90 nf_types.mod nf_partition_cl.mod fstarpu_mod.mod
  885. $(AM_V_FC)$(FC) $(native_fortran_nf_partition_FCFLAGS) $(FCFLAGS) -c -o $@ `test -f 'native_fortran/nf_partition.f90' || echo '$(srcdir)/'`native_fortran/nf_partition.f90
  886. endif