Makefile.am 28 KB

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