Makefile.am 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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. tests/helper.h
  41. pkgconfigdir = $(libdir)/pkgconfig
  42. pkgconfig_DATA = libstarpumpi.pc starpumpi-1.0.pc
  43. examplebindir = $(libdir)/starpu/examples/mpi
  44. examplebin_PROGRAMS =
  45. if STARPU_USE_CUDA
  46. # TODO define NVCCFLAGS
  47. NVCC ?= nvcc
  48. NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_builddir)/include
  49. .cu.cubin:
  50. $(MKDIR_P) `dirname $@`
  51. $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS)
  52. .cu.o:
  53. $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS) -I$(top_srcdir)/include/ -I$(top_builddir)/include/
  54. endif
  55. AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS)
  56. LIBS = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la @LIBS@ $(FXT_LIBS) $(MAGMA_LIBS)
  57. 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
  58. AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS)
  59. lib_LTLIBRARIES = libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  60. libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la
  61. libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS = $(ldflags) -no-undefined \
  62. -version-info $(LIBSTARPUMPI_INTERFACE_CURRENT):$(LIBSTARPUMPI_INTERFACE_REVISION):$(LIBSTARPUMPI_INTERFACE_AGE)
  63. noinst_HEADERS = \
  64. src/starpu_mpi_private.h \
  65. src/starpu_mpi_fxt.h \
  66. src/starpu_mpi_stats.h \
  67. src/starpu_mpi_datatype.h
  68. versincludedir = $(includedir)/starpu/$(STARPU_EFFECTIVE_VERSION)
  69. versinclude_HEADERS = \
  70. include/starpu_mpi.h
  71. libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_SOURCES = \
  72. src/starpu_mpi.c \
  73. src/starpu_mpi_helper.c \
  74. src/starpu_mpi_datatype.c \
  75. src/starpu_mpi_insert_task.c \
  76. src/starpu_mpi_collective.c \
  77. src/starpu_mpi_stats.c
  78. ###################
  79. # Stencil example #
  80. ###################
  81. if BUILD_EXAMPLES
  82. examplebin_PROGRAMS += \
  83. examples/stencil/stencil5
  84. examples_stencil_stencil5_LDADD = \
  85. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  86. check_PROGRAMS += \
  87. examples/stencil/stencil5
  88. ##################
  89. # MPI LU example #
  90. ##################
  91. if !NO_BLAS_LIB
  92. examplebin_PROGRAMS += \
  93. examples/mpi_lu/plu_example_float \
  94. examples/mpi_lu/plu_example_double
  95. examples_mpi_lu_plu_example_float_LDADD = \
  96. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  97. $(STARPU_LIBNUMA_LDFLAGS) \
  98. $(STARPU_BLAS_LDFLAGS)
  99. examples_mpi_lu_plu_example_float_SOURCES = \
  100. examples/mpi_lu/plu_example_float.c \
  101. examples/mpi_lu/plu_solve_float.c \
  102. examples/mpi_lu/pslu_kernels.c \
  103. examples/mpi_lu/pslu.c \
  104. $(top_srcdir)/examples/common/blas.c
  105. examples_mpi_lu_plu_example_double_LDADD = \
  106. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  107. $(STARPU_LIBNUMA_LDFLAGS) \
  108. $(STARPU_BLAS_LDFLAGS)
  109. examples_mpi_lu_plu_example_double_SOURCES = \
  110. examples/mpi_lu/plu_example_double.c \
  111. examples/mpi_lu/plu_solve_double.c \
  112. examples/mpi_lu/pdlu_kernels.c \
  113. examples/mpi_lu/pdlu.c \
  114. $(top_srcdir)/examples/common/blas.c
  115. endif
  116. ########################
  117. # MPI Cholesky example #
  118. ########################
  119. if !NO_BLAS_LIB
  120. examplebin_PROGRAMS += \
  121. examples/cholesky/mpi_cholesky \
  122. examples/cholesky/mpi_cholesky_distributed
  123. examples_cholesky_mpi_cholesky_SOURCES = \
  124. examples/cholesky/mpi_cholesky.c \
  125. examples/cholesky/mpi_cholesky_models.c \
  126. examples/cholesky/mpi_cholesky_kernels.c \
  127. $(top_srcdir)/examples/common/blas.c
  128. examples_cholesky_mpi_cholesky_LDADD = \
  129. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  130. $(STARPU_BLAS_LDFLAGS)
  131. examples_cholesky_mpi_cholesky_distributed_SOURCES = \
  132. examples/cholesky/mpi_cholesky_distributed.c \
  133. examples/cholesky/mpi_cholesky_models.c \
  134. examples/cholesky/mpi_cholesky_kernels.c \
  135. $(top_srcdir)/examples/common/blas.c
  136. examples_cholesky_mpi_cholesky_distributed_LDADD = \
  137. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  138. $(STARPU_BLAS_LDFLAGS)
  139. check_PROGRAMS += \
  140. examples/cholesky/mpi_cholesky \
  141. examples/cholesky/mpi_cholesky_distributed
  142. endif
  143. ########################
  144. # Scatter Gather #
  145. ########################
  146. examplebin_PROGRAMS += \
  147. examples/scatter_gather/mpi_scatter_gather
  148. examples_scatter_gather_mpi_scatter_gather_LDADD = \
  149. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  150. check_PROGRAMS += \
  151. examples/scatter_gather/mpi_scatter_gather
  152. ###################
  153. # Reduction #
  154. ###################
  155. examplebin_PROGRAMS += \
  156. examples/reduction/mpi_reduction
  157. examples_reduction_mpi_reduction_SOURCES = \
  158. examples/reduction/mpi_reduction.c \
  159. examples/reduction/mpi_reduction_kernels.c
  160. examples_reduction_mpi_reduction_LDADD = \
  161. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  162. check_PROGRAMS += \
  163. examples/reduction/mpi_reduction
  164. ###################
  165. # complex example #
  166. ###################
  167. examplebin_PROGRAMS += \
  168. examples/complex/mpi_complex
  169. examples_complex_mpi_complex_SOURCES = \
  170. examples/complex/mpi_complex.c \
  171. ../examples/interface/complex_interface.c
  172. examples_complex_mpi_complex_LDADD = \
  173. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  174. check_PROGRAMS += \
  175. examples/complex/mpi_complex
  176. endif
  177. ########################
  178. # Unit testcases #
  179. ########################
  180. check_PROGRAMS += \
  181. tests/pingpong \
  182. tests/mpi_test \
  183. tests/mpi_isend \
  184. tests/mpi_irecv \
  185. tests/mpi_isend_detached \
  186. tests/mpi_irecv_detached \
  187. tests/mpi_detached_tag \
  188. tests/ring \
  189. tests/ring_async \
  190. tests/ring_async_implicit \
  191. tests/block_interface \
  192. tests/block_interface_pinned \
  193. tests/insert_task \
  194. tests/insert_task_cache \
  195. tests/insert_task_block \
  196. tests/insert_task_owner \
  197. tests/insert_task_owner2 \
  198. tests/insert_task_owner_data \
  199. tests/multiple_send
  200. noinst_PROGRAMS = \
  201. tests/pingpong \
  202. tests/mpi_test \
  203. tests/mpi_isend \
  204. tests/mpi_irecv \
  205. tests/mpi_isend_detached \
  206. tests/mpi_irecv_detached \
  207. tests/mpi_detached_tag \
  208. tests/ring \
  209. tests/ring_async \
  210. tests/ring_async_implicit \
  211. tests/block_interface \
  212. tests/block_interface_pinned \
  213. tests/insert_task \
  214. tests/insert_task_cache \
  215. tests/insert_task_block \
  216. tests/insert_task_owner \
  217. tests/insert_task_owner2 \
  218. tests/insert_task_owner_data \
  219. tests/multiple_send
  220. tests_mpi_isend_LDADD = \
  221. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  222. tests_mpi_irecv_LDADD = \
  223. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  224. tests_mpi_isend_detached_LDADD = \
  225. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  226. tests_mpi_irecv_detached_LDADD = \
  227. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  228. tests_mpi_detached_tag_LDADD = \
  229. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  230. tests_pingpong_LDADD = \
  231. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  232. tests_mpi_test_LDADD = \
  233. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  234. tests_ring_LDADD = \
  235. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  236. tests_ring_async_LDADD = \
  237. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  238. tests_ring_async_implicit_LDADD = \
  239. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  240. tests_block_interface_LDADD = \
  241. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  242. tests_block_interface_pinned_LDADD = \
  243. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  244. tests_insert_task_LDADD = \
  245. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  246. tests_insert_task_cache_LDADD = \
  247. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  248. tests_insert_task_block_LDADD = \
  249. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  250. tests_insert_task_owner_LDADD = \
  251. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  252. tests_insert_task_owner2_LDADD = \
  253. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  254. tests_insert_task_owner_data_LDADD = \
  255. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  256. tests_multiple_send_LDADD = \
  257. libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  258. tests_ring_SOURCES = tests/ring.c
  259. tests_ring_async_SOURCES = tests/ring_async.c
  260. tests_ring_async_implicit_SOURCES = tests/ring_async_implicit.c
  261. if STARPU_USE_CUDA
  262. tests_ring_SOURCES += tests/ring_kernel.cu
  263. tests_ring_async_SOURCES += tests/ring_kernel.cu
  264. tests_ring_async_implicit_SOURCES += tests/ring_kernel.cu
  265. endif
  266. showcheck:
  267. -cat $(TEST_LOGS) /dev/null