Makefile.am 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2012 Université de Bordeaux 1
  4. # Copyright (C) 2010, 2011, 2012 Centre National de la Recherche Scientifique
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. CC=$(MPICC)
  17. CCLD=$(MPICC)
  18. if STARPU_MPI_CHECK
  19. if STARPU_HAVE_AM111
  20. LOG_COMPILER = $(MPIEXEC) -np 2
  21. else
  22. TESTS_ENVIRONMENT = $(MPIEXEC) -np 2
  23. endif
  24. TESTS = $(check_PROGRAMS)
  25. endif
  26. check_PROGRAMS =
  27. BUILT_SOURCES =
  28. CLEANFILES = *.gcno *.gcda *.linkinfo
  29. EXTRA_DIST = \
  30. examples/mpi_lu/mpi_lu-float.h \
  31. examples/mpi_lu/mpi_lu-double.h \
  32. examples/mpi_lu/plu_example.c \
  33. examples/mpi_lu/plu_solve.c \
  34. examples/mpi_lu/pxlu.h \
  35. examples/mpi_lu/pxlu.c \
  36. examples/mpi_lu/pxlu_kernels.h \
  37. examples/mpi_lu/pxlu_kernels.c \
  38. examples/cholesky/mpi_cholesky.h \
  39. examples/cholesky/mpi_cholesky_models.h \
  40. examples/cholesky/mpi_cholesky_codelets.h \
  41. tests/helper.h
  42. pkgconfigdir = $(libdir)/pkgconfig
  43. pkgconfig_DATA = libstarpumpi.pc starpumpi-1.0.pc
  44. examplebindir = $(libdir)/starpu/examples/mpi
  45. examplebin_PROGRAMS =
  46. if STARPU_USE_CUDA
  47. # TODO define NVCCFLAGS
  48. NVCC ?= nvcc
  49. NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_builddir)/include
  50. .cu.cubin:
  51. $(MKDIR_P) `dirname $@`
  52. $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS)
  53. .cu.o:
  54. $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS) -I$(top_srcdir)/include/ -I$(top_builddir)/include/
  55. endif
  56. AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS)
  57. LIBS = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la @LIBS@ $(FXT_LIBS) $(MAGMA_LIBS)
  58. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/mpi/ -I$(top_srcdir)/src/ -I$(top_srcdir)/examples/ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_srcdir)/mpi/include -I$(top_srcdir)/mpi/src
  59. AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS)
  60. lib_LTLIBRARIES = libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  61. libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la
  62. libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS = $(ldflags) -no-undefined \
  63. -version-info $(LIBSTARPUMPI_INTERFACE_CURRENT):$(LIBSTARPUMPI_INTERFACE_REVISION):$(LIBSTARPUMPI_INTERFACE_AGE) \
  64. $(MPICC_LDFLAGS)
  65. noinst_HEADERS = \
  66. src/starpu_mpi_private.h \
  67. src/starpu_mpi_fxt.h \
  68. src/starpu_mpi_stats.h \
  69. src/starpu_mpi_datatype.h
  70. versincludedir = $(includedir)/starpu/$(STARPU_EFFECTIVE_VERSION)
  71. versinclude_HEADERS = \
  72. include/starpu_mpi.h
  73. libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_SOURCES = \
  74. src/starpu_mpi.c \
  75. src/starpu_mpi_helper.c \
  76. src/starpu_mpi_datatype.c \
  77. src/starpu_mpi_insert_task.c \
  78. src/starpu_mpi_collective.c \
  79. src/starpu_mpi_stats.c
  80. ###################
  81. # Stencil example #
  82. ###################
  83. if BUILD_EXAMPLES
  84. examplebin_PROGRAMS += \
  85. examples/stencil/stencil5
  86. examples_stencil_stencil5_LDADD = \
  87. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  88. check_PROGRAMS += \
  89. examples/stencil/stencil5
  90. ##################
  91. # MPI LU example #
  92. ##################
  93. if !NO_BLAS_LIB
  94. examplebin_PROGRAMS += \
  95. examples/mpi_lu/plu_example_float \
  96. examples/mpi_lu/plu_example_double
  97. examples_mpi_lu_plu_example_float_LDADD = \
  98. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  99. $(STARPU_LIBNUMA_LDFLAGS) \
  100. $(STARPU_BLAS_LDFLAGS)
  101. examples_mpi_lu_plu_example_float_SOURCES = \
  102. examples/mpi_lu/plu_example_float.c \
  103. examples/mpi_lu/plu_solve_float.c \
  104. examples/mpi_lu/pslu_kernels.c \
  105. examples/mpi_lu/pslu.c \
  106. $(top_srcdir)/examples/common/blas.c
  107. examples_mpi_lu_plu_example_double_LDADD = \
  108. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  109. $(STARPU_LIBNUMA_LDFLAGS) \
  110. $(STARPU_BLAS_LDFLAGS)
  111. examples_mpi_lu_plu_example_double_SOURCES = \
  112. examples/mpi_lu/plu_example_double.c \
  113. examples/mpi_lu/plu_solve_double.c \
  114. examples/mpi_lu/pdlu_kernels.c \
  115. examples/mpi_lu/pdlu.c \
  116. $(top_srcdir)/examples/common/blas.c
  117. endif
  118. ########################
  119. # MPI Cholesky example #
  120. ########################
  121. if !NO_BLAS_LIB
  122. examplebin_PROGRAMS += \
  123. examples/cholesky/mpi_cholesky \
  124. examples/cholesky/mpi_cholesky_distributed
  125. examples_cholesky_mpi_cholesky_SOURCES = \
  126. examples/cholesky/mpi_cholesky.c \
  127. examples/cholesky/mpi_cholesky_models.c \
  128. examples/cholesky/mpi_cholesky_kernels.c \
  129. examples/cholesky/mpi_cholesky_codelets.c \
  130. $(top_srcdir)/examples/common/blas.c
  131. examples_cholesky_mpi_cholesky_LDADD = \
  132. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  133. $(STARPU_BLAS_LDFLAGS)
  134. examples_cholesky_mpi_cholesky_distributed_SOURCES = \
  135. examples/cholesky/mpi_cholesky_distributed.c \
  136. examples/cholesky/mpi_cholesky_models.c \
  137. examples/cholesky/mpi_cholesky_kernels.c \
  138. examples/cholesky/mpi_cholesky_codelets.c \
  139. $(top_srcdir)/examples/common/blas.c
  140. examples_cholesky_mpi_cholesky_distributed_LDADD = \
  141. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  142. $(STARPU_BLAS_LDFLAGS)
  143. check_PROGRAMS += \
  144. examples/cholesky/mpi_cholesky \
  145. examples/cholesky/mpi_cholesky_distributed
  146. endif
  147. ########################
  148. # Scatter Gather #
  149. ########################
  150. examplebin_PROGRAMS += \
  151. examples/scatter_gather/mpi_scatter_gather
  152. examples_scatter_gather_mpi_scatter_gather_LDADD = \
  153. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  154. check_PROGRAMS += \
  155. examples/scatter_gather/mpi_scatter_gather
  156. ###################
  157. # Reduction #
  158. ###################
  159. examplebin_PROGRAMS += \
  160. examples/reduction/mpi_reduction
  161. examples_reduction_mpi_reduction_SOURCES = \
  162. examples/reduction/mpi_reduction.c \
  163. examples/reduction/mpi_reduction_kernels.c
  164. examples_reduction_mpi_reduction_LDADD = \
  165. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  166. check_PROGRAMS += \
  167. examples/reduction/mpi_reduction
  168. ###################
  169. # complex example #
  170. ###################
  171. examplebin_PROGRAMS += \
  172. examples/complex/mpi_complex
  173. examples_complex_mpi_complex_SOURCES = \
  174. examples/complex/mpi_complex.c \
  175. ../examples/interface/complex_interface.c
  176. examples_complex_mpi_complex_LDADD = \
  177. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  178. check_PROGRAMS += \
  179. examples/complex/mpi_complex
  180. endif
  181. ########################
  182. # Unit testcases #
  183. ########################
  184. check_PROGRAMS += \
  185. tests/pingpong \
  186. tests/mpi_test \
  187. tests/mpi_isend \
  188. tests/mpi_irecv \
  189. tests/mpi_isend_detached \
  190. tests/mpi_irecv_detached \
  191. tests/mpi_detached_tag \
  192. tests/ring \
  193. tests/ring_async \
  194. tests/ring_async_implicit \
  195. tests/block_interface \
  196. tests/block_interface_pinned \
  197. tests/insert_task \
  198. tests/insert_task_cache \
  199. tests/insert_task_block \
  200. tests/insert_task_owner \
  201. tests/insert_task_owner2 \
  202. tests/insert_task_owner_data \
  203. tests/multiple_send
  204. noinst_PROGRAMS = \
  205. tests/pingpong \
  206. tests/mpi_test \
  207. tests/mpi_isend \
  208. tests/mpi_irecv \
  209. tests/mpi_isend_detached \
  210. tests/mpi_irecv_detached \
  211. tests/mpi_detached_tag \
  212. tests/ring \
  213. tests/ring_async \
  214. tests/ring_async_implicit \
  215. tests/block_interface \
  216. tests/block_interface_pinned \
  217. tests/insert_task \
  218. tests/insert_task_cache \
  219. tests/insert_task_block \
  220. tests/insert_task_owner \
  221. tests/insert_task_owner2 \
  222. tests/insert_task_owner_data \
  223. tests/multiple_send
  224. tests_mpi_isend_LDADD = \
  225. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  226. tests_mpi_irecv_LDADD = \
  227. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  228. tests_mpi_isend_detached_LDADD = \
  229. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  230. tests_mpi_irecv_detached_LDADD = \
  231. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  232. tests_mpi_detached_tag_LDADD = \
  233. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  234. tests_pingpong_LDADD = \
  235. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  236. tests_mpi_test_LDADD = \
  237. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  238. tests_ring_LDADD = \
  239. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  240. tests_ring_async_LDADD = \
  241. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  242. tests_ring_async_implicit_LDADD = \
  243. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  244. tests_block_interface_LDADD = \
  245. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  246. tests_block_interface_pinned_LDADD = \
  247. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  248. tests_insert_task_LDADD = \
  249. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  250. tests_insert_task_cache_LDADD = \
  251. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  252. tests_insert_task_block_LDADD = \
  253. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  254. tests_insert_task_owner_LDADD = \
  255. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  256. tests_insert_task_owner2_LDADD = \
  257. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  258. tests_insert_task_owner_data_LDADD = \
  259. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  260. tests_multiple_send_LDADD = \
  261. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  262. tests_ring_SOURCES = tests/ring.c
  263. tests_ring_async_SOURCES = tests/ring_async.c
  264. tests_ring_async_implicit_SOURCES = tests/ring_async_implicit.c
  265. if STARPU_USE_CUDA
  266. tests_ring_SOURCES += tests/ring_kernel.cu
  267. tests_ring_async_SOURCES += tests/ring_kernel.cu
  268. tests_ring_async_implicit_SOURCES += tests/ring_kernel.cu
  269. endif
  270. showcheck:
  271. -cat $(TEST_LOGS) /dev/null