Explorar o código

Makefile: fix detection of MPI

Nathalie Furmento %!s(int64=7) %!d(string=hai) anos
pai
achega
bb2d57f6f1
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 1 0
      configure.ac
  2. 2 2
      examples/stencil/Makefile.am

+ 1 - 0
configure.ac

@@ -602,6 +602,7 @@ fi
 AC_MSG_CHECKING(whether the StarPU MPI library should be generated)
 AC_MSG_RESULT($build_mpi_lib)
 
+AM_CONDITIONAL(USE_MPI, test x$build_mpi_lib = xyes -o x$build_nmad_lib = xyes)
 if test x$build_mpi_lib = xyes -o x$build_nmad_lib = xyes ; then
 	AC_DEFINE(STARPU_USE_MPI,[1],[whether the StarPU MPI library is available])
 	if test x$build_mpi_lib = xyes ; then

+ 2 - 2
examples/stencil/Makefile.am

@@ -27,7 +27,7 @@ LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(HWLOC_LIBS) @LIBS@ $(FXT_LIBS)
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@ $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
 
-if STARPU_USE_MPI
+if USE_MPI
 LIBS += $(top_builddir)/mpi/src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
 AM_CPPFLAGS += -I$(top_srcdir)/mpi/include
 endif
@@ -64,7 +64,7 @@ check_PROGRAMS	=	$(LOADER) $(STARPU_EXAMPLES)
 endif
 
 if !STARPU_SIMGRID
-if STARPU_USE_MPI
+if USE_MPI
 if STARPU_MPI_CHECK
 TESTS		=	$(STARPU_EXAMPLES)
 endif