Makefile.am 26 KB

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