Makefile.am 9.2 KB

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