Makefile.am 29 KB

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