Makefile.am 28 KB

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