Makefile.am 27 KB

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