Makefile.am 25 KB

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