Makefile.am 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. mpi_lu/mpi_lu-float.h \
  31. mpi_lu/mpi_lu-double.h \
  32. mpi_lu/plu_example.c \
  33. mpi_lu/plu_solve.c \
  34. mpi_lu/pxlu.h \
  35. mpi_lu/pxlu.c \
  36. mpi_lu/pxlu_kernels.h \
  37. mpi_lu/pxlu_kernels.c \
  38. cholesky/mpi_cholesky.h \
  39. cholesky/mpi_cholesky_models.h \
  40. cholesky/mpi_cholesky_codelets.h \
  41. ../tests/helper.h
  42. examplebindir = $(libdir)/starpu/mpi
  43. examplebin_PROGRAMS =
  44. if STARPU_USE_CUDA
  45. # TODO define NVCCFLAGS
  46. NVCC ?= nvcc
  47. NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_builddir)/include
  48. .cu.cubin:
  49. $(MKDIR_P) `dirname $@`
  50. $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS)
  51. .cu.o:
  52. $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS) -I$(top_srcdir)/include/ -I$(top_builddir)/include/
  53. endif
  54. AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS)
  55. LIBS = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la @LIBS@ $(FXT_LIBS) $(MAGMA_LIBS)
  56. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include -I$(top_srcdir)/mpi/include
  57. AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS)
  58. ###################
  59. # Stencil example #
  60. ###################
  61. if BUILD_EXAMPLES
  62. examplebin_PROGRAMS += \
  63. stencil/stencil5
  64. stencil_stencil5_LDADD = \
  65. ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  66. check_PROGRAMS += \
  67. stencil/stencil5
  68. ##################
  69. # MPI LU example #
  70. ##################
  71. if !NO_BLAS_LIB
  72. examplebin_PROGRAMS += \
  73. mpi_lu/plu_example_float \
  74. mpi_lu/plu_example_double
  75. mpi_lu_plu_example_float_LDADD = \
  76. ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  77. $(STARPU_LIBNUMA_LDFLAGS) \
  78. $(STARPU_BLAS_LDFLAGS)
  79. mpi_lu_plu_example_float_SOURCES = \
  80. mpi_lu/plu_example_float.c \
  81. mpi_lu/plu_solve_float.c \
  82. mpi_lu/pslu_kernels.c \
  83. mpi_lu/pslu.c \
  84. $(top_srcdir)/examples/common/blas.c
  85. mpi_lu_plu_example_double_LDADD = \
  86. ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  87. $(STARPU_LIBNUMA_LDFLAGS) \
  88. $(STARPU_BLAS_LDFLAGS)
  89. mpi_lu_plu_example_double_SOURCES = \
  90. mpi_lu/plu_example_double.c \
  91. mpi_lu/plu_solve_double.c \
  92. mpi_lu/pdlu_kernels.c \
  93. mpi_lu/pdlu.c \
  94. $(top_srcdir)/examples/common/blas.c
  95. endif
  96. ########################
  97. # MPI Cholesky example #
  98. ########################
  99. if !NO_BLAS_LIB
  100. examplebin_PROGRAMS += \
  101. cholesky/mpi_cholesky \
  102. cholesky/mpi_cholesky_distributed
  103. cholesky_mpi_cholesky_SOURCES = \
  104. cholesky/mpi_cholesky.c \
  105. cholesky/mpi_cholesky_models.c \
  106. cholesky/mpi_cholesky_kernels.c \
  107. cholesky/mpi_cholesky_codelets.c \
  108. $(top_srcdir)/examples/common/blas.c
  109. cholesky_mpi_cholesky_LDADD = \
  110. ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  111. $(STARPU_BLAS_LDFLAGS)
  112. cholesky_mpi_cholesky_distributed_SOURCES = \
  113. cholesky/mpi_cholesky_distributed.c \
  114. cholesky/mpi_cholesky_models.c \
  115. cholesky/mpi_cholesky_kernels.c \
  116. cholesky/mpi_cholesky_codelets.c \
  117. $(top_srcdir)/examples/common/blas.c
  118. cholesky_mpi_cholesky_distributed_LDADD = \
  119. ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la \
  120. $(STARPU_BLAS_LDFLAGS)
  121. check_PROGRAMS += \
  122. cholesky/mpi_cholesky \
  123. cholesky/mpi_cholesky_distributed
  124. endif
  125. ########################
  126. # Scatter Gather #
  127. ########################
  128. examplebin_PROGRAMS += \
  129. scatter_gather/mpi_scatter_gather
  130. scatter_gather_mpi_scatter_gather_LDADD = \
  131. ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  132. check_PROGRAMS += \
  133. scatter_gather/mpi_scatter_gather
  134. ###################
  135. # Reduction #
  136. ###################
  137. examplebin_PROGRAMS += \
  138. reduction/mpi_reduction
  139. reduction_mpi_reduction_SOURCES = \
  140. reduction/mpi_reduction.c \
  141. reduction/mpi_reduction_kernels.c
  142. reduction_mpi_reduction_LDADD = \
  143. ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  144. check_PROGRAMS += \
  145. reduction/mpi_reduction
  146. ###################
  147. # complex example #
  148. ###################
  149. examplebin_PROGRAMS += \
  150. complex/mpi_complex
  151. complex_mpi_complex_SOURCES = \
  152. complex/mpi_complex.c \
  153. $(top_srcdir)/examples/interface/complex_interface.c
  154. complex_mpi_complex_LDADD = \
  155. ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  156. check_PROGRAMS += \
  157. complex/mpi_complex
  158. endif
  159. showcheck:
  160. -cat $(TEST_LOGS) /dev/null