Makefile.am 28 KB

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