Makefile.am 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172
  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. 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. cg/cg_kernels.c \
  95. heat/lu_kernels_model.h \
  96. heat/dw_sparse_cg.h \
  97. heat/heat.h \
  98. heat/dw_factolu.h \
  99. lu/xlu.h \
  100. lu/xlu_kernels.h \
  101. lu/lu-float.h \
  102. lu/lu-double.h \
  103. lu/complex_float.h \
  104. lu/complex_double.h \
  105. lu/blas_complex.h \
  106. cholesky/cholesky.h \
  107. sched_ctx_utils/sched_ctx_utils.h \
  108. common/blas_model.h \
  109. common/blas.h \
  110. mult/simple.h \
  111. mult/double.h \
  112. fortran/StarPU_fortran.h \
  113. ppm_downscaler/ppm_downscaler.h \
  114. ppm_downscaler/yuv_downscaler.h \
  115. spmv/matrix_market/mmio.h \
  116. spmv/matrix_market/mm_to_bcsr.h \
  117. spmv/spmv.h \
  118. spmv/dw_block_spmv.h \
  119. basic_examples/multiformat_types.h \
  120. filters/custom_mf/custom_interface.h \
  121. filters/custom_mf/custom_types.h \
  122. interface/complex_interface.h \
  123. interface/complex_codelet.h \
  124. pi/pi.h \
  125. pi/SobolQRNG/sobol.h \
  126. pi/SobolQRNG/sobol_gold.h \
  127. pi/SobolQRNG/sobol_gpu.h \
  128. pi/SobolQRNG/sobol_primitives.h \
  129. reductions/dot_product.h \
  130. basic_examples/vector_scal_cpu_template.h \
  131. sched_ctx/axpy_partition_gpu.h
  132. #####################################
  133. # What to install and what to check #
  134. #####################################
  135. examplebin_PROGRAMS += $(STARPU_EXAMPLES)
  136. TESTS = $(SHELL_TESTS) $(STARPU_EXAMPLES)
  137. SHELL_TESTS =
  138. if !STARPU_USE_MPI_MASTER_SLAVE
  139. SHELL_TESTS += scheduler/schedulers.sh
  140. SHELL_TESTS += scheduler/schedulers_context.sh
  141. if !STARPU_NO_BLAS_LIB
  142. SHELL_TESTS += mult/sgemm.sh
  143. endif
  144. endif
  145. check_PROGRAMS = $(STARPU_EXAMPLES)
  146. noinst_PROGRAMS =
  147. if !STARPU_HAVE_WINDOWS
  148. ## test loader program
  149. if !STARPU_CROSS_COMPILING
  150. LOADER = loader
  151. loader_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/
  152. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  153. loader_SOURCES = ../tests/loader.c
  154. noinst_PROGRAMS += loader
  155. else
  156. LOADER =
  157. LOADER_BIN = $(top_builddir)/examples/loader-cross.sh
  158. endif
  159. if STARPU_USE_MPI_MASTER_SLAVE
  160. LOADER_BIN2 = $(MPI_LAUNCHER) $(LOADER_BIN)
  161. else
  162. LOADER_BIN2 = $(LOADER_BIN)
  163. endif
  164. if STARPU_HAVE_AM111
  165. TESTS_ENVIRONMENT = $(MPI_RUN_ARGS) top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  166. LOG_COMPILER = $(LOADER_BIN2)
  167. else
  168. TESTS_ENVIRONMENT = $(MPI_RUN_ARGS) top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN2)
  169. endif
  170. endif
  171. # STARPU_EXAMPLES list all applications which have to be compiled and checked
  172. # Applications which should only be compiled are added directly in examplebin_PROGRAMS
  173. # see for instance mandelbrot/mandelbrot
  174. STARPU_EXAMPLES =
  175. STARPU_EXAMPLES += \
  176. sched_ctx/prio \
  177. scheduler/dummy_sched \
  178. scheduler/dummy_modular_sched \
  179. worker_collections/worker_list_example \
  180. api/bcsr_data_interface \
  181. api/block_data_interface \
  182. api/coo_data_interface \
  183. api/csr_data_interface \
  184. api/matrix_data_interface \
  185. api/multiformat_data_interface \
  186. api/tensor_data_interface \
  187. api/variable_data_interface \
  188. api/vector_data_interface \
  189. api/void_data_interface
  190. if !STARPU_SIMGRID
  191. STARPU_EXAMPLES += \
  192. basic_examples/hello_world \
  193. basic_examples/topology \
  194. basic_examples/vector_scal \
  195. basic_examples/mult \
  196. basic_examples/block \
  197. basic_examples/variable \
  198. basic_examples/multiformat \
  199. basic_examples/dynamic_handles \
  200. basic_examples/task_insert_color \
  201. mlr/mlr \
  202. cpp/incrementer_cpp \
  203. cpp/add_vectors \
  204. cpp/add_vectors_interface \
  205. filters/fread \
  206. filters/fvector \
  207. filters/fblock \
  208. filters/fmatrix \
  209. filters/fmultiple_manual \
  210. filters/fmultiple_submit \
  211. filters/fmultiple_submit_readonly \
  212. filters/fmultiple_submit_implicit \
  213. filters/frecursive \
  214. filters/fplan_notautomatic \
  215. tag_example/tag_example \
  216. tag_example/tag_example2 \
  217. tag_example/tag_example3 \
  218. tag_example/tag_example4 \
  219. tag_example/tag_restartable \
  220. spmd/vector_scal_spmd \
  221. spmv/spmv \
  222. callback/callback \
  223. callback/prologue \
  224. incrementer/incrementer \
  225. binary/binary \
  226. interface/complex \
  227. matvecmult/matvecmult \
  228. profiling/profiling \
  229. perf_monitoring/perf_counters_01 \
  230. perf_monitoring/perf_counters_02 \
  231. perf_steering/perf_knobs_01 \
  232. perf_steering/perf_knobs_02 \
  233. perf_steering/perf_knobs_03 \
  234. scheduler/heteroprio_test \
  235. sched_ctx/sched_ctx \
  236. sched_ctx/sched_ctx_empty \
  237. sched_ctx/sched_ctx_delete \
  238. sched_ctx/two_cpu_contexts \
  239. sched_ctx/dummy_sched_with_ctx \
  240. worker_collections/worker_tree_example \
  241. reductions/dot_product \
  242. reductions/minmax_reduction \
  243. dependency/task_end_dep \
  244. dependency/task_end_dep_add \
  245. dependency/sequential_consistency
  246. endif
  247. if !STARPU_SIMGRID
  248. STARPU_EXAMPLES += \
  249. scheduler/dummy_sched
  250. if STARPU_HAVE_CXX11
  251. STARPU_EXAMPLES += \
  252. cpp/add_vectors_cpp11
  253. endif
  254. if STARPU_HAVE_F77
  255. if STARPU_HAVE_F77_H
  256. STARPU_EXAMPLES += \
  257. fortran/hello
  258. endif
  259. STARPU_EXAMPLES += \
  260. basic_examples/vector_scal_fortran
  261. endif
  262. if STARPU_HAVE_FC
  263. if !STARPU_SANITIZE
  264. STARPU_EXAMPLES += \
  265. fortran90/f90_example \
  266. native_fortran/nf_vector \
  267. native_fortran/nf_matrix \
  268. native_fortran/nf_example \
  269. native_fortran/nf_dynbuf \
  270. native_fortran/nf_varbuf \
  271. native_fortran/nf_sched_ctx \
  272. native_fortran/nf_partition
  273. endif
  274. endif
  275. endif
  276. if !STARPU_NO_BLAS_LIB
  277. STARPU_EXAMPLES += \
  278. mult/sgemm \
  279. mult/dgemm \
  280. lu/lu_example_float \
  281. lu/lu_example_double \
  282. lu/lu_implicit_example_float \
  283. lu/lu_implicit_example_double \
  284. cholesky/cholesky_tag \
  285. cholesky/cholesky_tile_tag \
  286. cholesky/cholesky_implicit \
  287. cholesky/cholesky_compil
  288. if !STARPU_SIMGRID
  289. STARPU_EXAMPLES += \
  290. axpy/axpy \
  291. cholesky/cholesky_grain_tag \
  292. heat/heat \
  293. cg/cg \
  294. pipeline/pipeline
  295. if !STARPU_USE_MPI_MASTER_SLAVE
  296. SHELL_TESTS += \
  297. heat/heat.sh \
  298. lu/lu.sh
  299. endif
  300. endif
  301. if STARPU_SIMGRID
  302. if !STARPU_QUICK_CHECK
  303. SHELL_TESTS += \
  304. cholesky/cholesky.sh
  305. endif
  306. endif
  307. endif
  308. if !STARPU_SIMGRID
  309. if STARPU_MKL_BLAS_LIB
  310. STARPU_EXAMPLES += \
  311. lu/lu_example_complex_float \
  312. lu/lu_example_complex_double \
  313. lu/lu_implicit_example_complex_float \
  314. lu/lu_implicit_example_complex_double
  315. endif
  316. if STARPU_HAVE_CBLAS_H
  317. STARPU_EXAMPLES += \
  318. spmv/dw_block_spmv
  319. endif
  320. if !STARPU_SIMGRID
  321. if STARPU_HAVE_F77
  322. if STARPU_HAVE_F77_H
  323. STARPU_EXAMPLES += \
  324. fortran/hello
  325. endif
  326. STARPU_EXAMPLES += \
  327. basic_examples/vector_scal_fortran
  328. endif
  329. endif
  330. if STARPU_HAVE_OPENMP
  331. STARPU_EXAMPLES += \
  332. openmp/vector_scal_omp \
  333. sched_ctx/sched_ctx_without_sched_policy\
  334. sched_ctx/nested_sched_ctxs \
  335. sched_ctx/sched_ctx_without_sched_policy_awake\
  336. sched_ctx/parallel_tasks_reuse_handle \
  337. sched_ctx/parallel_code
  338. if STARPU_HAVE_HWLOC
  339. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  340. STARPU_EXAMPLES += \
  341. sched_ctx/parallel_tasks_with_cluster_api
  342. endif
  343. endif
  344. endif
  345. endif !STARPU_SIMGRID
  346. if STARPU_USE_CUDA
  347. STARPU_EXAMPLES += \
  348. sched_ctx/gpu_partition
  349. sched_ctx_gpu_partition_SOURCES = \
  350. sched_ctx/gpu_partition.c \
  351. sched_ctx/axpy_partition_gpu.cu
  352. endif
  353. ##################
  354. # Basic examples #
  355. ##################
  356. basic_examples_vector_scal_SOURCES = \
  357. basic_examples/vector_scal.c \
  358. basic_examples/vector_scal_cpu.c
  359. if STARPU_HAVE_ICC
  360. if STARPU_CROSS_COMPILING
  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. else
  363. basic_examples_vector_scal_SOURCES += \
  364. basic_examples/vector_scal_cpu_icc.icc
  365. 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 $@
  366. endif
  367. else
  368. 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 $@
  369. endif
  370. if STARPU_USE_CUDA
  371. basic_examples_vector_scal_SOURCES += \
  372. basic_examples/vector_scal_cuda.cu
  373. endif
  374. if STARPU_USE_OPENCL
  375. basic_examples_vector_scal_SOURCES += \
  376. basic_examples/vector_scal_opencl.c
  377. nobase_STARPU_OPENCL_DATA_DATA += \
  378. basic_examples/vector_scal_opencl_kernel.cl
  379. endif
  380. if STARPU_HAVE_F77
  381. basic_examples_vector_scal_fortran_SOURCES = \
  382. basic_examples/vector_scal_fortran.F \
  383. basic_examples/vector_scal_c.c \
  384. basic_examples/vector_scal_cpu.c
  385. if STARPU_USE_CUDA
  386. basic_examples_vector_scal_fortran_SOURCES += \
  387. basic_examples/vector_scal_cuda.cu
  388. basic_examples_vector_scal_fortran_LDADD = \
  389. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  390. endif
  391. if STARPU_HAVE_F77_H
  392. fortran_hello_SOURCES = \
  393. fortran/hello_c.c \
  394. fortran/hello.F \
  395. fortran/StarPU_fortran.h
  396. endif
  397. endif
  398. if STARPU_HAVE_FC
  399. fortran90_f90_example_SOURCES = \
  400. fortran90/mod_types.f90 \
  401. fortran90/starpu_mod.f90 \
  402. fortran90/mod_interface.f90 \
  403. fortran90/mod_compute.f90 \
  404. fortran90/marshalling.c \
  405. fortran90/f90_example.f90
  406. native_fortran_nf_vector_SOURCES = \
  407. native_fortran/nf_codelets.f90 \
  408. native_fortran/fstarpu_mod.f90 \
  409. native_fortran/nf_vector.f90
  410. native_fortran_nf_matrix_SOURCES = \
  411. native_fortran/nf_codelets.f90 \
  412. native_fortran/fstarpu_mod.f90 \
  413. native_fortran/nf_matrix.f90
  414. native_fortran_nf_example_SOURCES = \
  415. native_fortran/nf_types.f90 \
  416. native_fortran/nf_compute.f90 \
  417. native_fortran/fstarpu_mod.f90 \
  418. native_fortran/nf_example.f90
  419. native_fortran_nf_dynbuf_SOURCES = \
  420. native_fortran/nf_dynbuf_cl.f90 \
  421. native_fortran/fstarpu_mod.f90 \
  422. native_fortran/nf_dynbuf.f90
  423. native_fortran_nf_varbuf_SOURCES = \
  424. native_fortran/nf_varbuf_cl.f90 \
  425. native_fortran/fstarpu_mod.f90 \
  426. native_fortran/nf_varbuf.f90
  427. native_fortran_nf_sched_ctx_SOURCES = \
  428. native_fortran/nf_sched_ctx_cl.f90 \
  429. native_fortran/fstarpu_mod.f90 \
  430. native_fortran/nf_sched_ctx.f90
  431. native_fortran_nf_partition_SOURCES = \
  432. native_fortran/nf_partition_cl.f90 \
  433. native_fortran/fstarpu_mod.f90 \
  434. native_fortran/nf_partition.f90
  435. endif
  436. #######################
  437. # Multiformat example #
  438. #######################
  439. basic_examples_multiformat_SOURCES = \
  440. basic_examples/multiformat.c \
  441. basic_examples/multiformat_conversion_codelets.c
  442. if STARPU_USE_CUDA
  443. basic_examples_multiformat_SOURCES += \
  444. basic_examples/multiformat_cuda.cu \
  445. basic_examples/multiformat_conversion_codelets_cuda.cu
  446. endif
  447. if STARPU_USE_OPENCL
  448. basic_examples_multiformat_SOURCES += \
  449. basic_examples/multiformat_opencl.c \
  450. basic_examples/multiformat_conversion_codelets_opencl.c
  451. nobase_STARPU_OPENCL_DATA_DATA += \
  452. basic_examples/multiformat_opencl_kernel.cl \
  453. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  454. endif
  455. #################
  456. # block example #
  457. #################
  458. basic_examples_block_SOURCES = \
  459. basic_examples/block.c \
  460. basic_examples/block_cpu.c
  461. if STARPU_USE_CUDA
  462. basic_examples_block_SOURCES += \
  463. basic_examples/block_cuda.cu
  464. endif
  465. if STARPU_USE_OPENCL
  466. basic_examples_block_SOURCES += \
  467. basic_examples/block_opencl.c
  468. nobase_STARPU_OPENCL_DATA_DATA += \
  469. basic_examples/block_opencl_kernel.cl
  470. endif
  471. ####################
  472. # Variable example #
  473. ####################
  474. basic_examples_variable_SOURCES = \
  475. basic_examples/variable.c \
  476. basic_examples/variable_kernels_cpu.c
  477. if STARPU_USE_CUDA
  478. basic_examples_variable_SOURCES += \
  479. basic_examples/variable_kernels.cu
  480. endif
  481. if STARPU_USE_OPENCL
  482. basic_examples_variable_SOURCES += \
  483. basic_examples/variable_kernels_opencl.c
  484. nobase_STARPU_OPENCL_DATA_DATA += \
  485. basic_examples/variable_kernels_opencl_kernel.cl
  486. endif
  487. ###########
  488. # Filters #
  489. ###########
  490. filters_fblock_SOURCES = \
  491. filters/fblock.c \
  492. filters/fblock_cpu.c
  493. if STARPU_USE_CUDA
  494. filters_fblock_SOURCES += \
  495. filters/fblock_cuda.cu
  496. endif
  497. if STARPU_USE_OPENCL
  498. filters_fblock_SOURCES += \
  499. filters/fblock_opencl.c
  500. nobase_STARPU_OPENCL_DATA_DATA += \
  501. filters/fblock_opencl_kernel.cl
  502. endif
  503. filters_fmultiple_manual_SOURCES = \
  504. filters/fmultiple_manual.c
  505. if STARPU_USE_CUDA
  506. filters_fmultiple_manual_SOURCES += \
  507. filters/fmultiple_cuda.cu
  508. endif
  509. filters_fmultiple_submit_SOURCES = \
  510. filters/fmultiple_submit.c
  511. if STARPU_USE_CUDA
  512. filters_fmultiple_submit_SOURCES += \
  513. filters/fmultiple_cuda.cu
  514. endif
  515. filters_fmultiple_submit_readonly_SOURCES = \
  516. filters/fmultiple_submit_readonly.c
  517. if STARPU_USE_CUDA
  518. filters_fmultiple_submit_readonly_SOURCES += \
  519. filters/fmultiple_cuda.cu
  520. endif
  521. filters_fmultiple_submit_implicit_SOURCES = \
  522. filters/fmultiple_submit_implicit.c
  523. if STARPU_USE_CUDA
  524. filters_fmultiple_submit_implicit_SOURCES += \
  525. filters/fmultiple_cuda.cu
  526. endif
  527. examplebin_PROGRAMS += \
  528. filters/shadow \
  529. filters/shadow2d \
  530. filters/shadow3d
  531. #############################
  532. # Custom multiformat filter #
  533. #############################
  534. #TODO: see why the application is failing
  535. #lt-custom_mf_filter: .../src/datawizard/malloc.c:784: starpu_free_on_node: Assertion `chunk != _starpu_chunk_list_end(chunks[dst_node])' failed.
  536. examplebin_PROGRAMS += \
  537. filters/custom_mf/custom_mf_filter
  538. filters_custom_mf_custom_mf_filter_SOURCES=\
  539. filters/custom_mf/custom_mf_filter.c \
  540. filters/custom_mf/custom_interface.c \
  541. filters/custom_mf/custom_conversion_codelets.c
  542. if STARPU_USE_CUDA
  543. filters_custom_mf_custom_mf_filter_SOURCES += \
  544. filters/custom_mf/conversion.cu \
  545. filters/custom_mf/cuda.cu
  546. endif
  547. if STARPU_USE_OPENCL
  548. filters_custom_mf_custom_mf_filter_SOURCES += \
  549. filters/custom_mf/conversion_opencl.c \
  550. filters/custom_mf/custom_opencl.c
  551. nobase_STARPU_OPENCL_DATA_DATA += \
  552. filters/custom_mf/conversion_opencl.cl \
  553. filters/custom_mf/custom_opencl.cl
  554. endif
  555. ################
  556. # AXPY example #
  557. ################
  558. if !STARPU_NO_BLAS_LIB
  559. axpy_axpy_SOURCES = \
  560. axpy/axpy.c \
  561. common/blas.c
  562. if STARPU_USE_OPENCL
  563. axpy_axpy_SOURCES += \
  564. axpy/axpy_opencl.c
  565. nobase_STARPU_OPENCL_DATA_DATA += \
  566. axpy/axpy_opencl_kernel.cl
  567. endif
  568. axpy_axpy_LDADD = \
  569. $(STARPU_BLAS_LDFLAGS)
  570. endif
  571. ################
  572. # Mult example #
  573. ################
  574. if !STARPU_NO_BLAS_LIB
  575. mult_sgemm_SOURCES = \
  576. mult/sgemm.c \
  577. common/blas.c
  578. mult_sgemm_LDADD = \
  579. $(STARPU_BLAS_LDFLAGS)
  580. mult_dgemm_SOURCES = \
  581. mult/dgemm.c \
  582. common/blas.c
  583. mult_dgemm_LDADD = \
  584. $(STARPU_BLAS_LDFLAGS)
  585. endif
  586. ####################
  587. # Cholesky example #
  588. ####################
  589. if !STARPU_NO_BLAS_LIB
  590. cholesky_cholesky_tag_SOURCES = \
  591. cholesky/cholesky_tag.c \
  592. cholesky/cholesky_models.c \
  593. cholesky/cholesky_kernels.c \
  594. common/blas.c
  595. cholesky_cholesky_tag_LDADD = \
  596. $(STARPU_BLAS_LDFLAGS)
  597. cholesky_cholesky_tile_tag_SOURCES = \
  598. cholesky/cholesky_tile_tag.c \
  599. cholesky/cholesky_models.c \
  600. cholesky/cholesky_kernels.c \
  601. common/blas.c
  602. cholesky_cholesky_tile_tag_LDADD = \
  603. $(STARPU_BLAS_LDFLAGS)
  604. cholesky_cholesky_grain_tag_SOURCES = \
  605. cholesky/cholesky_grain_tag.c \
  606. cholesky/cholesky_models.c \
  607. cholesky/cholesky_kernels.c \
  608. common/blas.c
  609. cholesky_cholesky_grain_tag_LDADD = \
  610. $(STARPU_BLAS_LDFLAGS)
  611. cholesky_cholesky_implicit_SOURCES = \
  612. cholesky/cholesky_implicit.c \
  613. cholesky/cholesky_models.c \
  614. cholesky/cholesky_kernels.c \
  615. sched_ctx_utils/sched_ctx_utils.c \
  616. common/blas.c
  617. cholesky_cholesky_implicit_LDADD = \
  618. $(STARPU_BLAS_LDFLAGS)
  619. cholesky_cholesky_compil_SOURCES = \
  620. cholesky/cholesky_compil.c \
  621. cholesky/cholesky_models.c \
  622. cholesky/cholesky_kernels.c \
  623. sched_ctx_utils/sched_ctx_utils.c \
  624. common/blas.c
  625. cholesky_cholesky_compil_LDADD = \
  626. $(STARPU_BLAS_LDFLAGS)
  627. endif
  628. ##############
  629. # LU example #
  630. ##############
  631. if !STARPU_NO_BLAS_LIB
  632. lu_lu_example_float_SOURCES = \
  633. lu/lu_example_float.c \
  634. lu/slu.c \
  635. lu/slu_pivot.c \
  636. lu/slu_kernels.c \
  637. common/blas.c
  638. lu_lu_example_float_LDADD = \
  639. $(STARPU_BLAS_LDFLAGS)
  640. lu_lu_example_double_SOURCES = \
  641. lu/lu_example_double.c \
  642. lu/dlu.c \
  643. lu/dlu_pivot.c \
  644. lu/dlu_kernels.c \
  645. common/blas.c
  646. lu_lu_example_double_LDADD = \
  647. $(STARPU_BLAS_LDFLAGS)
  648. lu_lu_implicit_example_float_SOURCES = \
  649. lu/lu_example_float.c \
  650. lu/slu_implicit.c \
  651. lu/slu_implicit_pivot.c \
  652. lu/slu_kernels.c \
  653. common/blas.c
  654. lu_lu_implicit_example_float_LDADD = \
  655. $(STARPU_BLAS_LDFLAGS)
  656. lu_lu_implicit_example_double_SOURCES = \
  657. lu/lu_example_double.c \
  658. lu/dlu_implicit.c \
  659. lu/dlu_implicit_pivot.c \
  660. lu/dlu_kernels.c \
  661. common/blas.c
  662. lu_lu_implicit_example_double_LDADD = \
  663. $(STARPU_BLAS_LDFLAGS)
  664. if STARPU_MKL_BLAS_LIB
  665. lu_lu_example_complex_float_SOURCES = \
  666. lu/lu_example_complex_float.c \
  667. lu/clu.c \
  668. lu/clu_pivot.c \
  669. lu/clu_kernels.c \
  670. lu/blas_complex.c \
  671. common/blas.c
  672. lu_lu_example_complex_float_LDADD = \
  673. $(STARPU_BLAS_LDFLAGS)
  674. lu_lu_implicit_example_complex_float_SOURCES = \
  675. lu/lu_example_complex_float.c \
  676. lu/clu_implicit.c \
  677. lu/clu_implicit_pivot.c \
  678. lu/clu_kernels.c \
  679. lu/blas_complex.c \
  680. common/blas.c
  681. lu_lu_implicit_example_complex_float_LDADD = \
  682. $(STARPU_BLAS_LDFLAGS)
  683. lu_lu_example_complex_double_SOURCES = \
  684. lu/lu_example_complex_double.c \
  685. lu/zlu.c \
  686. lu/zlu_pivot.c \
  687. lu/zlu_kernels.c \
  688. lu/blas_complex.c \
  689. common/blas.c
  690. lu_lu_example_complex_double_LDADD = \
  691. $(STARPU_BLAS_LDFLAGS)
  692. lu_lu_implicit_example_complex_double_SOURCES = \
  693. lu/lu_example_complex_double.c \
  694. lu/zlu_implicit.c \
  695. lu/zlu_implicit_pivot.c \
  696. lu/zlu_kernels.c \
  697. lu/blas_complex.c \
  698. common/blas.c
  699. lu_lu_implicit_example_complex_double_LDADD = \
  700. $(STARPU_BLAS_LDFLAGS)
  701. endif
  702. endif
  703. ################
  704. # Heat example #
  705. ################
  706. if !STARPU_NO_BLAS_LIB
  707. heat_heat_SOURCES = \
  708. heat/heat.c \
  709. heat/dw_factolu.c \
  710. heat/dw_factolu_tag.c \
  711. heat/dw_factolu_grain.c \
  712. heat/dw_sparse_cg.c \
  713. heat/heat_display.c \
  714. heat/lu_kernels_model.c \
  715. heat/dw_sparse_cg_kernels.c \
  716. heat/dw_factolu_kernels.c \
  717. common/blas.c
  718. heat_heat_LDADD = \
  719. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  720. $(STARPU_BLAS_LDFLAGS)
  721. endif
  722. ##############
  723. # CG example #
  724. ##############
  725. if !STARPU_NO_BLAS_LIB
  726. cg_cg_SOURCES = \
  727. cg/cg.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