Makefile.am 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166
  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 !STARPU_NO_BLAS_LIB
  137. SHELL_TESTS += mult/sgemm.sh
  138. endif
  139. endif
  140. check_PROGRAMS = $(STARPU_EXAMPLES)
  141. noinst_PROGRAMS =
  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. noinst_PROGRAMS += loader
  150. else
  151. LOADER =
  152. LOADER_BIN = $(top_builddir)/examples/loader-cross.sh
  153. endif
  154. if STARPU_USE_MPI_MASTER_SLAVE
  155. LOADER_BIN2 = $(MPI_LAUNCHER) $(LOADER_BIN)
  156. else
  157. LOADER_BIN2 = $(LOADER_BIN)
  158. endif
  159. if STARPU_HAVE_AM111
  160. TESTS_ENVIRONMENT = $(MPI_RUN_ARGS) top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  161. LOG_COMPILER = $(LOADER_BIN2)
  162. else
  163. TESTS_ENVIRONMENT = $(MPI_RUN_ARGS) top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN2)
  164. endif
  165. endif
  166. # STARPU_EXAMPLES list all applications which have to be compiled and checked
  167. # Applications which should only be compiled are added directly in examplebin_PROGRAMS
  168. # see for instance mandelbrot/mandelbrot
  169. STARPU_EXAMPLES =
  170. STARPU_EXAMPLES += \
  171. sched_ctx/prio \
  172. scheduler/dummy_sched \
  173. scheduler/dummy_modular_sched \
  174. worker_collections/worker_list_example \
  175. api/bcsr_data_interface \
  176. api/block_data_interface \
  177. api/coo_data_interface \
  178. api/csr_data_interface \
  179. api/matrix_data_interface \
  180. api/multiformat_data_interface \
  181. api/variable_data_interface \
  182. api/vector_data_interface \
  183. api/void_data_interface
  184. if !STARPU_SIMGRID
  185. STARPU_EXAMPLES += \
  186. basic_examples/hello_world \
  187. basic_examples/topology \
  188. basic_examples/vector_scal \
  189. basic_examples/mult \
  190. basic_examples/block \
  191. basic_examples/variable \
  192. basic_examples/multiformat \
  193. basic_examples/dynamic_handles \
  194. basic_examples/task_insert_color \
  195. mlr/mlr \
  196. cpp/incrementer_cpp \
  197. cpp/add_vectors \
  198. cpp/add_vectors_interface \
  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_CXX11
  244. STARPU_EXAMPLES += \
  245. cpp/add_vectors_cpp11
  246. endif
  247. if STARPU_HAVE_F77
  248. if STARPU_HAVE_F77_H
  249. STARPU_EXAMPLES += \
  250. fortran/hello
  251. endif
  252. STARPU_EXAMPLES += \
  253. basic_examples/vector_scal_fortran
  254. endif
  255. if STARPU_HAVE_FC
  256. if !STARPU_SANITIZE
  257. STARPU_EXAMPLES += \
  258. fortran90/f90_example \
  259. native_fortran/nf_vector \
  260. native_fortran/nf_matrix \
  261. native_fortran/nf_example \
  262. native_fortran/nf_dynbuf \
  263. native_fortran/nf_varbuf \
  264. native_fortran/nf_sched_ctx \
  265. native_fortran/nf_partition
  266. endif
  267. endif
  268. endif
  269. if !STARPU_NO_BLAS_LIB
  270. STARPU_EXAMPLES += \
  271. mult/sgemm \
  272. mult/dgemm \
  273. lu/lu_example_float \
  274. lu/lu_example_double \
  275. lu/lu_implicit_example_float \
  276. lu/lu_implicit_example_double \
  277. cholesky/cholesky_tag \
  278. cholesky/cholesky_tile_tag \
  279. cholesky/cholesky_implicit \
  280. cholesky/cholesky_compil
  281. if !STARPU_SIMGRID
  282. STARPU_EXAMPLES += \
  283. axpy/axpy \
  284. cholesky/cholesky_grain_tag \
  285. heat/heat \
  286. cg/cg \
  287. pipeline/pipeline
  288. if !STARPU_USE_MPI_MASTER_SLAVE
  289. SHELL_TESTS += \
  290. heat/heat.sh \
  291. lu/lu.sh
  292. endif
  293. endif
  294. if STARPU_SIMGRID
  295. if !STARPU_QUICK_CHECK
  296. SHELL_TESTS += \
  297. cholesky/cholesky.sh
  298. endif
  299. endif
  300. endif
  301. if !STARPU_SIMGRID
  302. if STARPU_MKL_BLAS_LIB
  303. STARPU_EXAMPLES += \
  304. lu/lu_example_complex_float \
  305. lu/lu_example_complex_double \
  306. lu/lu_implicit_example_complex_float \
  307. lu/lu_implicit_example_complex_double
  308. endif
  309. if STARPU_HAVE_CBLAS_H
  310. STARPU_EXAMPLES += \
  311. spmv/dw_block_spmv
  312. endif
  313. if !STARPU_SIMGRID
  314. if STARPU_HAVE_F77
  315. if STARPU_HAVE_F77_H
  316. STARPU_EXAMPLES += \
  317. fortran/hello
  318. endif
  319. STARPU_EXAMPLES += \
  320. basic_examples/vector_scal_fortran
  321. endif
  322. endif
  323. if STARPU_HAVE_OPENMP
  324. STARPU_EXAMPLES += \
  325. openmp/vector_scal_omp \
  326. sched_ctx/sched_ctx_without_sched_policy\
  327. sched_ctx/nested_sched_ctxs \
  328. sched_ctx/sched_ctx_without_sched_policy_awake\
  329. sched_ctx/parallel_tasks_reuse_handle \
  330. sched_ctx/parallel_code
  331. if STARPU_HAVE_HWLOC
  332. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  333. STARPU_EXAMPLES += \
  334. sched_ctx/parallel_tasks_with_cluster_api
  335. endif
  336. endif
  337. endif
  338. endif !STARPU_SIMGRID
  339. if STARPU_USE_CUDA
  340. STARPU_EXAMPLES += \
  341. sched_ctx/gpu_partition
  342. sched_ctx_gpu_partition_SOURCES = \
  343. sched_ctx/gpu_partition.c \
  344. sched_ctx/axpy_partition_gpu.cu
  345. endif
  346. ##################
  347. # Basic examples #
  348. ##################
  349. basic_examples_vector_scal_SOURCES = \
  350. basic_examples/vector_scal.c \
  351. basic_examples/vector_scal_cpu.c
  352. if STARPU_HAVE_ICC
  353. if STARPU_CROSS_COMPILING
  354. 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 $@
  355. else
  356. basic_examples_vector_scal_SOURCES += \
  357. basic_examples/vector_scal_cpu_icc.icc
  358. 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 $@
  359. endif
  360. else
  361. 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 $@
  362. endif
  363. if STARPU_USE_CUDA
  364. basic_examples_vector_scal_SOURCES += \
  365. basic_examples/vector_scal_cuda.cu
  366. endif
  367. if STARPU_USE_OPENCL
  368. basic_examples_vector_scal_SOURCES += \
  369. basic_examples/vector_scal_opencl.c
  370. nobase_STARPU_OPENCL_DATA_DATA += \
  371. basic_examples/vector_scal_opencl_kernel.cl
  372. endif
  373. if STARPU_HAVE_F77
  374. basic_examples_vector_scal_fortran_SOURCES = \
  375. basic_examples/vector_scal_fortran.F \
  376. basic_examples/vector_scal_c.c \
  377. basic_examples/vector_scal_cpu.c
  378. if STARPU_USE_CUDA
  379. basic_examples_vector_scal_fortran_SOURCES += \
  380. basic_examples/vector_scal_cuda.cu
  381. basic_examples_vector_scal_fortran_LDADD = \
  382. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  383. endif
  384. if STARPU_HAVE_F77_H
  385. fortran_hello_SOURCES = \
  386. fortran/hello_c.c \
  387. fortran/hello.F \
  388. fortran/StarPU_fortran.h
  389. endif
  390. endif
  391. if STARPU_HAVE_FC
  392. fortran90_f90_example_SOURCES = \
  393. fortran90/mod_types.f90 \
  394. fortran90/starpu_mod.f90 \
  395. fortran90/mod_interface.f90 \
  396. fortran90/mod_compute.f90 \
  397. fortran90/marshalling.c \
  398. fortran90/f90_example.f90
  399. native_fortran_nf_vector_SOURCES = \
  400. native_fortran/nf_codelets.f90 \
  401. native_fortran/fstarpu_mod.f90 \
  402. native_fortran/nf_vector.f90
  403. native_fortran_nf_matrix_SOURCES = \
  404. native_fortran/nf_codelets.f90 \
  405. native_fortran/fstarpu_mod.f90 \
  406. native_fortran/nf_matrix.f90
  407. native_fortran_nf_example_SOURCES = \
  408. native_fortran/nf_types.f90 \
  409. native_fortran/nf_compute.f90 \
  410. native_fortran/fstarpu_mod.f90 \
  411. native_fortran/nf_example.f90
  412. native_fortran_nf_dynbuf_SOURCES = \
  413. native_fortran/nf_dynbuf_cl.f90 \
  414. native_fortran/fstarpu_mod.f90 \
  415. native_fortran/nf_dynbuf.f90
  416. native_fortran_nf_varbuf_SOURCES = \
  417. native_fortran/nf_varbuf_cl.f90 \
  418. native_fortran/fstarpu_mod.f90 \
  419. native_fortran/nf_varbuf.f90
  420. native_fortran_nf_sched_ctx_SOURCES = \
  421. native_fortran/nf_sched_ctx_cl.f90 \
  422. native_fortran/fstarpu_mod.f90 \
  423. native_fortran/nf_sched_ctx.f90
  424. native_fortran_nf_partition_SOURCES = \
  425. native_fortran/nf_partition_cl.f90 \
  426. native_fortran/fstarpu_mod.f90 \
  427. native_fortran/nf_partition.f90
  428. endif
  429. #######################
  430. # Multiformat example #
  431. #######################
  432. basic_examples_multiformat_SOURCES = \
  433. basic_examples/multiformat.c \
  434. basic_examples/multiformat_conversion_codelets.c
  435. if STARPU_USE_CUDA
  436. basic_examples_multiformat_SOURCES += \
  437. basic_examples/multiformat_cuda.cu \
  438. basic_examples/multiformat_conversion_codelets_cuda.cu
  439. endif
  440. if STARPU_USE_OPENCL
  441. basic_examples_multiformat_SOURCES += \
  442. basic_examples/multiformat_opencl.c \
  443. basic_examples/multiformat_conversion_codelets_opencl.c
  444. nobase_STARPU_OPENCL_DATA_DATA += \
  445. basic_examples/multiformat_opencl_kernel.cl \
  446. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  447. endif
  448. #################
  449. # block example #
  450. #################
  451. basic_examples_block_SOURCES = \
  452. basic_examples/block.c \
  453. basic_examples/block_cpu.c
  454. if STARPU_USE_CUDA
  455. basic_examples_block_SOURCES += \
  456. basic_examples/block_cuda.cu
  457. endif
  458. if STARPU_USE_OPENCL
  459. basic_examples_block_SOURCES += \
  460. basic_examples/block_opencl.c
  461. nobase_STARPU_OPENCL_DATA_DATA += \
  462. basic_examples/block_opencl_kernel.cl
  463. endif
  464. ####################
  465. # Variable example #
  466. ####################
  467. basic_examples_variable_SOURCES = \
  468. basic_examples/variable.c \
  469. basic_examples/variable_kernels_cpu.c
  470. if STARPU_USE_CUDA
  471. basic_examples_variable_SOURCES += \
  472. basic_examples/variable_kernels.cu
  473. endif
  474. if STARPU_USE_OPENCL
  475. basic_examples_variable_SOURCES += \
  476. basic_examples/variable_kernels_opencl.c
  477. nobase_STARPU_OPENCL_DATA_DATA += \
  478. basic_examples/variable_kernels_opencl_kernel.cl
  479. endif
  480. ###########
  481. # Filters #
  482. ###########
  483. filters_fblock_SOURCES = \
  484. filters/fblock.c \
  485. filters/fblock_cpu.c
  486. if STARPU_USE_CUDA
  487. filters_fblock_SOURCES += \
  488. filters/fblock_cuda.cu
  489. endif
  490. if STARPU_USE_OPENCL
  491. filters_fblock_SOURCES += \
  492. filters/fblock_opencl.c
  493. nobase_STARPU_OPENCL_DATA_DATA += \
  494. filters/fblock_opencl_kernel.cl
  495. endif
  496. filters_fmultiple_manual_SOURCES = \
  497. filters/fmultiple_manual.c
  498. if STARPU_USE_CUDA
  499. filters_fmultiple_manual_SOURCES += \
  500. filters/fmultiple_cuda.cu
  501. endif
  502. filters_fmultiple_submit_SOURCES = \
  503. filters/fmultiple_submit.c
  504. if STARPU_USE_CUDA
  505. filters_fmultiple_submit_SOURCES += \
  506. filters/fmultiple_cuda.cu
  507. endif
  508. filters_fmultiple_submit_readonly_SOURCES = \
  509. filters/fmultiple_submit_readonly.c
  510. if STARPU_USE_CUDA
  511. filters_fmultiple_submit_readonly_SOURCES += \
  512. filters/fmultiple_cuda.cu
  513. endif
  514. filters_fmultiple_submit_implicit_SOURCES = \
  515. filters/fmultiple_submit_implicit.c
  516. if STARPU_USE_CUDA
  517. filters_fmultiple_submit_implicit_SOURCES += \
  518. filters/fmultiple_cuda.cu
  519. endif
  520. examplebin_PROGRAMS += \
  521. filters/shadow \
  522. filters/shadow2d \
  523. filters/shadow3d
  524. #############################
  525. # Custom multiformat filter #
  526. #############################
  527. #TODO: see why the application is failing
  528. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  529. examplebin_PROGRAMS += \
  530. filters/custom_mf/custom_mf_filter
  531. filters_custom_mf_custom_mf_filter_SOURCES=\
  532. filters/custom_mf/custom_mf_filter.c \
  533. filters/custom_mf/custom_interface.c \
  534. filters/custom_mf/custom_conversion_codelets.c
  535. if STARPU_USE_CUDA
  536. filters_custom_mf_custom_mf_filter_SOURCES += \
  537. filters/custom_mf/conversion.cu \
  538. filters/custom_mf/cuda.cu
  539. endif
  540. if STARPU_USE_OPENCL
  541. filters_custom_mf_custom_mf_filter_SOURCES += \
  542. filters/custom_mf/conversion_opencl.c \
  543. filters/custom_mf/custom_opencl.c
  544. nobase_STARPU_OPENCL_DATA_DATA += \
  545. filters/custom_mf/conversion_opencl.cl \
  546. filters/custom_mf/custom_opencl.cl
  547. endif
  548. ################
  549. # AXPY example #
  550. ################
  551. if !STARPU_NO_BLAS_LIB
  552. axpy_axpy_SOURCES = \
  553. axpy/axpy.c \
  554. common/blas.c
  555. if STARPU_USE_OPENCL
  556. axpy_axpy_SOURCES += \
  557. axpy/axpy_opencl.c
  558. nobase_STARPU_OPENCL_DATA_DATA += \
  559. axpy/axpy_opencl_kernel.cl
  560. endif
  561. axpy_axpy_LDADD = \
  562. $(STARPU_BLAS_LDFLAGS)
  563. endif
  564. ################
  565. # Mult example #
  566. ################
  567. if !STARPU_NO_BLAS_LIB
  568. mult_sgemm_SOURCES = \
  569. mult/sgemm.c \
  570. common/blas.c
  571. mult_sgemm_LDADD = \
  572. $(STARPU_BLAS_LDFLAGS)
  573. mult_dgemm_SOURCES = \
  574. mult/dgemm.c \
  575. common/blas.c
  576. mult_dgemm_LDADD = \
  577. $(STARPU_BLAS_LDFLAGS)
  578. endif
  579. ####################
  580. # Cholesky example #
  581. ####################
  582. if !STARPU_NO_BLAS_LIB
  583. cholesky_cholesky_tag_SOURCES = \
  584. cholesky/cholesky_tag.c \
  585. cholesky/cholesky_models.c \
  586. cholesky/cholesky_kernels.c \
  587. common/blas.c
  588. cholesky_cholesky_tag_LDADD = \
  589. $(STARPU_BLAS_LDFLAGS)
  590. cholesky_cholesky_tile_tag_SOURCES = \
  591. cholesky/cholesky_tile_tag.c \
  592. cholesky/cholesky_models.c \
  593. cholesky/cholesky_kernels.c \
  594. common/blas.c
  595. cholesky_cholesky_tile_tag_LDADD = \
  596. $(STARPU_BLAS_LDFLAGS)
  597. cholesky_cholesky_grain_tag_SOURCES = \
  598. cholesky/cholesky_grain_tag.c \
  599. cholesky/cholesky_models.c \
  600. cholesky/cholesky_kernels.c \
  601. common/blas.c
  602. cholesky_cholesky_grain_tag_LDADD = \
  603. $(STARPU_BLAS_LDFLAGS)
  604. cholesky_cholesky_implicit_SOURCES = \
  605. cholesky/cholesky_implicit.c \
  606. cholesky/cholesky_models.c \
  607. cholesky/cholesky_kernels.c \
  608. sched_ctx_utils/sched_ctx_utils.c \
  609. common/blas.c
  610. cholesky_cholesky_implicit_LDADD = \
  611. $(STARPU_BLAS_LDFLAGS)
  612. cholesky_cholesky_compil_SOURCES = \
  613. cholesky/cholesky_compil.c \
  614. cholesky/cholesky_models.c \
  615. cholesky/cholesky_kernels.c \
  616. sched_ctx_utils/sched_ctx_utils.c \
  617. common/blas.c
  618. cholesky_cholesky_compil_LDADD = \
  619. $(STARPU_BLAS_LDFLAGS)
  620. endif
  621. ##############
  622. # LU example #
  623. ##############
  624. if !STARPU_NO_BLAS_LIB
  625. lu_lu_example_float_SOURCES = \
  626. lu/lu_example_float.c \
  627. lu/slu.c \
  628. lu/slu_pivot.c \
  629. lu/slu_kernels.c \
  630. common/blas.c
  631. lu_lu_example_float_LDADD = \
  632. $(STARPU_BLAS_LDFLAGS)
  633. lu_lu_example_double_SOURCES = \
  634. lu/lu_example_double.c \
  635. lu/dlu.c \
  636. lu/dlu_pivot.c \
  637. lu/dlu_kernels.c \
  638. common/blas.c
  639. lu_lu_example_double_LDADD = \
  640. $(STARPU_BLAS_LDFLAGS)
  641. lu_lu_implicit_example_float_SOURCES = \
  642. lu/lu_example_float.c \
  643. lu/slu_implicit.c \
  644. lu/slu_implicit_pivot.c \
  645. lu/slu_kernels.c \
  646. common/blas.c
  647. lu_lu_implicit_example_float_LDADD = \
  648. $(STARPU_BLAS_LDFLAGS)
  649. lu_lu_implicit_example_double_SOURCES = \
  650. lu/lu_example_double.c \
  651. lu/dlu_implicit.c \
  652. lu/dlu_implicit_pivot.c \
  653. lu/dlu_kernels.c \
  654. common/blas.c
  655. lu_lu_implicit_example_double_LDADD = \
  656. $(STARPU_BLAS_LDFLAGS)
  657. if STARPU_MKL_BLAS_LIB
  658. lu_lu_example_complex_float_SOURCES = \
  659. lu/lu_example_complex_float.c \
  660. lu/clu.c \
  661. lu/clu_pivot.c \
  662. lu/clu_kernels.c \
  663. lu/blas_complex.c \
  664. common/blas.c
  665. lu_lu_example_complex_float_LDADD = \
  666. $(STARPU_BLAS_LDFLAGS)
  667. lu_lu_implicit_example_complex_float_SOURCES = \
  668. lu/lu_example_complex_float.c \
  669. lu/clu_implicit.c \
  670. lu/clu_implicit_pivot.c \
  671. lu/clu_kernels.c \
  672. lu/blas_complex.c \
  673. common/blas.c
  674. lu_lu_implicit_example_complex_float_LDADD = \
  675. $(STARPU_BLAS_LDFLAGS)
  676. lu_lu_example_complex_double_SOURCES = \
  677. lu/lu_example_complex_double.c \
  678. lu/zlu.c \
  679. lu/zlu_pivot.c \
  680. lu/zlu_kernels.c \
  681. lu/blas_complex.c \
  682. common/blas.c
  683. lu_lu_example_complex_double_LDADD = \
  684. $(STARPU_BLAS_LDFLAGS)
  685. lu_lu_implicit_example_complex_double_SOURCES = \
  686. lu/lu_example_complex_double.c \
  687. lu/zlu_implicit.c \
  688. lu/zlu_implicit_pivot.c \
  689. lu/zlu_kernels.c \
  690. lu/blas_complex.c \
  691. common/blas.c
  692. lu_lu_implicit_example_complex_double_LDADD = \
  693. $(STARPU_BLAS_LDFLAGS)
  694. endif
  695. endif
  696. ################
  697. # Heat example #
  698. ################
  699. if !STARPU_NO_BLAS_LIB
  700. heat_heat_SOURCES = \
  701. heat/heat.c \
  702. heat/dw_factolu.c \
  703. heat/dw_factolu_tag.c \
  704. heat/dw_factolu_grain.c \
  705. heat/dw_sparse_cg.c \
  706. heat/heat_display.c \
  707. heat/lu_kernels_model.c \
  708. heat/dw_sparse_cg_kernels.c \
  709. heat/dw_factolu_kernels.c \
  710. common/blas.c
  711. heat_heat_LDADD = \
  712. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  713. $(STARPU_BLAS_LDFLAGS)
  714. endif
  715. ##############
  716. # CG example #
  717. ##############
  718. if !STARPU_NO_BLAS_LIB
  719. cg_cg_SOURCES = \
  720. cg/cg.c \
  721. cg/cg_kernels.c \
  722. common/blas.c
  723. cg_cg_LDADD = \
  724. $(STARPU_BLAS_LDFLAGS)
  725. endif
  726. ################
  727. # SPMD example #
  728. ################
  729. spmd_vector_scal_spmd_SOURCES = \
  730. spmd/vector_scal_spmd.c
  731. ################
  732. # SpMV example #
  733. ################
  734. spmv_spmv_SOURCES = \
  735. spmv/spmv.c \
  736. spmv/spmv_kernels.c
  737. if STARPU_USE_CUDA
  738. spmv_spmv_SOURCES += \
  739. spmv/spmv_cuda.cu
  740. endif
  741. spmv_dw_block_spmv_SOURCES = \
  742. spmv/dw_block_spmv.c \
  743. spmv/dw_block_spmv_kernels.c \
  744. spmv/matrix_market/mm_to_bcsr.c \
  745. spmv/matrix_market/mmio.c
  746. spmv_dw_block_spmv_LDADD = \
  747. $(STARPU_BLAS_LDFLAGS)
  748. ###########################
  749. # C++ Incrementer example #
  750. ###########################
  751. cpp_incrementer_cpp_SOURCES = \
  752. cpp/incrementer_cpp.cpp
  753. if STARPU_USE_CUDA
  754. cpp_incrementer_cpp_SOURCES += \
  755. incrementer/incrementer_kernels.cu
  756. endif
  757. if STARPU_USE_OPENCL
  758. cpp_incrementer_cpp_SOURCES += \
  759. incrementer/incrementer_kernels_opencl.c
  760. endif
  761. ###########################
  762. # C++ Add vectors example #
  763. ###########################
  764. cpp_add_vectors_SOURCES = \
  765. cpp/add_vectors.cpp
  766. cpp_add_vectors_interface_SOURCES = \
  767. cpp/add_vectors_interface.cpp
  768. if STARPU_HAVE_CXX11
  769. cpp_add_vectors_cpp11_SOURCES = \
  770. cpp/add_vectors_cpp11.cpp
  771. endif
  772. #######################
  773. # Incrementer example #
  774. #######################
  775. incrementer_incrementer_SOURCES = \
  776. incrementer/incrementer.c
  777. if STARPU_USE_CUDA
  778. incrementer_incrementer_SOURCES += \
  779. incrementer/incrementer_kernels.cu
  780. endif
  781. if STARPU_USE_OPENCL
  782. incrementer_incrementer_SOURCES += \
  783. incrementer/incrementer_kernels_opencl.c
  784. nobase_STARPU_OPENCL_DATA_DATA += \
  785. incrementer/incrementer_kernels_opencl_kernel.cl
  786. endif
  787. ##################
  788. # Binary example #
  789. ##################
  790. binary_binary_SOURCES = \
  791. binary/binary.c
  792. if STARPU_USE_OPENCL
  793. binary_binary_SOURCES += \
  794. incrementer/incrementer_kernels_opencl.c
  795. endif
  796. #####################
  797. # interface example #
  798. #####################
  799. interface_complex_SOURCES = \
  800. interface/complex.c \
  801. interface/complex_interface.c \
  802. interface/complex_filters.c
  803. if STARPU_USE_CUDA
  804. interface_complex_SOURCES += \
  805. interface/complex_kernels.cu
  806. endif
  807. if STARPU_USE_OPENCL
  808. interface_complex_SOURCES +=\
  809. interface/complex_kernels_opencl.c
  810. nobase_STARPU_OPENCL_DATA_DATA += \
  811. interface/complex_kernels.cl
  812. endif
  813. ######################
  814. # matVecMult example #
  815. ######################
  816. if STARPU_USE_OPENCL
  817. nobase_STARPU_OPENCL_DATA_DATA += \
  818. matvecmult/matvecmult_kernel.cl
  819. endif
  820. #######################
  821. # dot_product example #
  822. #######################
  823. reductions_dot_product_SOURCES = \
  824. reductions/dot_product.c
  825. if STARPU_USE_CUDA
  826. reductions_dot_product_SOURCES += \
  827. reductions/dot_product_kernels.cu
  828. endif
  829. if STARPU_USE_OPENCL
  830. nobase_STARPU_OPENCL_DATA_DATA += \
  831. reductions/dot_product_opencl_kernels.cl
  832. endif
  833. ##################
  834. # Mandelbrot Set #
  835. ##################
  836. examplebin_PROGRAMS += \
  837. mandelbrot/mandelbrot
  838. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  839. if STARPU_HAVE_X11
  840. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  841. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
  842. endif
  843. ####################
  844. # Image downscaler #
  845. ####################
  846. examplebin_PROGRAMS += \
  847. ppm_downscaler/ppm_downscaler \
  848. ppm_downscaler/yuv_downscaler
  849. ######
  850. # Pi #
  851. ######
  852. if !STARPU_HAVE_WINDOWS
  853. examplebin_PROGRAMS += \
  854. pi/pi \
  855. pi/pi_redux
  856. pi_pi_SOURCES = \
  857. pi/pi.c \
  858. pi/SobolQRNG/sobol_gold.c \
  859. pi/SobolQRNG/sobol_primitives.c
  860. if STARPU_USE_CUDA
  861. pi_pi_SOURCES += \
  862. pi/pi_kernel.cu \
  863. pi/SobolQRNG/sobol_gpu.cu
  864. endif
  865. pi_pi_redux_SOURCES = \
  866. pi/pi_redux.c
  867. if STARPU_USE_CUDA
  868. pi_pi_redux_SOURCES += \
  869. pi/pi_redux_kernel.cu
  870. pi_pi_redux_LDADD = \
  871. $(STARPU_CURAND_LDFLAGS)
  872. endif
  873. endif
  874. ###########################
  875. # OpenGL interoperability #
  876. ###########################
  877. if STARPU_HAVE_OPENGL
  878. examplebin_PROGRAMS += \
  879. gl_interop/gl_interop \
  880. gl_interop/gl_interop_idle
  881. gl_interop_gl_interop_SOURCES = \
  882. gl_interop/gl_interop.c
  883. gl_interop_gl_interop_LDADD = \
  884. $(STARPU_OPENGL_RENDER_LDFLAGS)
  885. gl_interop_gl_interop_idle_SOURCES = \
  886. gl_interop/gl_interop_idle.c
  887. gl_interop_gl_interop_idle_LDADD = \
  888. $(STARPU_OPENGL_RENDER_LDFLAGS)
  889. endif
  890. ####################
  891. # pipeline example #
  892. ####################
  893. if !STARPU_NO_BLAS_LIB
  894. pipeline_pipeline_SOURCES = \
  895. pipeline/pipeline.c \
  896. common/blas.c
  897. pipeline_pipeline_LDADD = \
  898. $(STARPU_BLAS_LDFLAGS)
  899. endif
  900. ##################
  901. # openmp example #
  902. ##################
  903. if STARPU_HAVE_OPENMP
  904. openmp_vector_scal_omp_CFLAGS = \
  905. $(AM_CFLAGS) -fopenmp
  906. sched_ctx_parallel_code_CFLAGS = \
  907. $(AM_CFLAGS) -fopenmp
  908. sched_ctx_sched_ctx_without_sched_policy_CFLAGS = \
  909. $(AM_CFLAGS) -fopenmp
  910. sched_ctx_nested_sched_ctxs_CFLAGS = \
  911. $(AM_CFLAGS) -fopenmp
  912. sched_ctx_parallel_tasks_reuse_handle_CFLAGS = \
  913. $(AM_CFLAGS) -fopenmp
  914. endif
  915. # - link over source file to build our own object
  916. fortran90/starpu_mod.f90:
  917. @$(MKDIR_P) $(dir $@)
  918. $(V_ln) $(LN_S) $(abs_top_srcdir)/include/$(notdir $@) $@
  919. native_fortran/fstarpu_mod.f90:
  920. @$(MKDIR_P) $(dir $@)
  921. $(V_ln) $(LN_S) $(abs_top_srcdir)/include/$(notdir $@) $@
  922. if STARPU_HAVE_FC
  923. # Fortran90 example
  924. # - express the creation of .mod along .o
  925. starpu_mod.mod: fortran90/starpu_mod.o
  926. mod_types.mod: fortran90/mod_types.o
  927. mod_compute.mod: fortran90/mod_compute.o
  928. mod_interface.mod: fortran90/mod_interface.o
  929. # - list explicit dependences to control proper module files dependencies
  930. fortran90/mod_compute.o: mod_types.mod mod_interface.mod starpu_mod.mod
  931. fortran90/f90_example.o: mod_types.mod mod_interface.mod mod_compute.mod starpu_mod.mod
  932. # Native Fortran example
  933. # - express the creation of .mod along .o
  934. fstarpu_mod.mod: native_fortran/fstarpu_mod.o
  935. nf_codelets.mod: native_fortran/nf_codelets.o
  936. nf_compute.mod: native_fortran/nf_compute.o
  937. nf_dynbuf_cl.mod: native_fortran/nf_dynbuf_cl.o
  938. nf_partition_cl.mod: native_fortran/nf_partition_cl.o
  939. nf_sched_ctx_cl.mod: native_fortran/nf_sched_ctx_cl.o
  940. nf_types.mod: native_fortran/nf_types.o
  941. nf_varbuf_cl.mod: native_fortran/nf_varbuf_cl.o
  942. # - list explicit dependences to control proper module files dependencies
  943. native_fortran/nf_codelets.o: fstarpu_mod.mod
  944. native_fortran/nf_compute.o: nf_types.mod fstarpu_mod.mod
  945. native_fortran/nf_dynbuf_cl.o: fstarpu_mod.mod
  946. native_fortran/nf_dynbuf.o: nf_dynbuf_cl.mod fstarpu_mod.mod
  947. native_fortran/nf_example.o: nf_types.mod nf_compute.mod fstarpu_mod.mod
  948. native_fortran/nf_matrix.o: nf_codelets.mod fstarpu_mod.mod
  949. native_fortran/nf_partition_cl.o: fstarpu_mod.mod
  950. native_fortran/nf_partition.o: nf_partition_cl.mod fstarpu_mod.mod
  951. native_fortran/nf_sched_ctx_cl.o: fstarpu_mod.mod
  952. native_fortran/nf_sched_ctx.o: nf_sched_ctx_cl.mod fstarpu_mod.mod
  953. native_fortran/nf_varbuf_cl.o: fstarpu_mod.mod
  954. native_fortran/nf_varbuf.o: nf_varbuf_cl.mod fstarpu_mod.mod
  955. native_fortran/nf_vector.o: nf_codelets.mod fstarpu_mod.mod
  956. endif