Makefile.am 27 KB

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