Makefile.am 29 KB

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