Makefile.am 28 KB

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