Makefile.am 28 KB

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