Makefile.am 28 KB

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