# production.m4
AC_ENABLE_DEBUG(no)
AC_ENABLE_PRODUCTION(no)
+AC_ENABLE_MPI_SEQ_CONTAINER(no)
echo
echo ---------------------------------------------
# AC_DISABLE_DEBUG - set the default flag to --disable-debug
AC_DEFUN([AC_DISABLE_DEBUG], [AC_ENABLE_DEBUG(no)])
+
+dnl AC_ENABLE_MPI_SEQ_CONTAINER
+dnl
+dnl This macro enables mpi into the sequential container
+dnl default = not enabled
+dnl
+AC_DEFUN([AC_ENABLE_MPI_SEQ_CONTAINER],
+ [define([AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT], ifelse($1, no, no, yes))dnl
+ AC_ARG_ENABLE([mpi-seq-container],
+ [AC_HELP_STRING([--enable-mpi-seq-container],
+ [enable mpi into seq container @<:@default=]AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT[@:>@])],
+ [
+ enable_mpi_seq_container=$enableval
+ ],
+ [enable_mpi_seq_container=]AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT)
+
+if test "X$enable_mpi_seq_container" = "Xyes"; then
+ CFLAGS="$CFLAGS -D_MPI_SEQ_CONTAINER_ "
+ CXXFLAGS="$CXXFLAGS -D_MPI_SEQ_CONTAINER_ "
+fi
+AM_CONDITIONAL([WITH_MPI_SEQ_CONTAINER], [test "x$enable_mpi_seq_container" = "xyes"])
+])
# This local variable defines the list of CPPFLAGS common to all target in this package.
COMMON_CPPFLAGS=\
@PYTHON_INCLUDES@ \
- @MPI_INCLUDES@ \
@HDF5_INCLUDES@ \
-I$(srcdir)/../Batch \
-I$(srcdir)/../Basics \
../HDFPersist/libSalomeHDFPersist.la \
../Batch/libSalomeBatch.la \
$(top_builddir)/idl/libSalomeIDLKernel.la \
- @MPI_LIBS@ \
@CORBA_LIBS@ \
$(PYTHON_LIBS)
+if WITH_MPI_SEQ_CONTAINER
+COMMON_CPPFLAGS += @MPI_INCLUDES@
+COMMON_LIBS += @MPI_LIBS@
+endif
+
#
# ===============================================================
# Libraries targets
libSalomeContainer.la \
../Basics/libSALOMEBasics.la \
$(HDF5_LIBS) \
- $(MPI_LIBS) \
$(CORBA_LIBS) \
$(PYTHON_LIBS)
+if WITH_MPI_SEQ_CONTAINER
+SALOME_Container_LDADD += $(MPI_LIBS)
+endif
+
SALOME_Container_LDFLAGS =\
-Xlinker -export-dynamic
libSalomeContainer.la \
../Basics/libSALOMEBasics.la \
$(HDF5_LIBS) \
- $(MPI_LIBS) \
$(CORBA_LIBS) \
$(PYTHON_LIBS)
+
// Module : SALOME
// $Header$
//
-#ifdef HAVE_MPI2
+#ifdef _MPI_SEQ_CONTAINER_
+ #ifdef HAVE_MPI2
#include <mpi.h>
+ #endif
#endif
#include <iostream>
int main(int argc, char* argv[])
{
-#ifdef HAVE_MPI2
+#ifdef _MPI_SEQ_CONTAINER_
+ #ifdef HAVE_MPI2
MPI_Init(&argc,&argv);
-#endif
+ #endif
+#endif
#ifndef WIN32
if(getenv ("DEBUGGER"))
INFOS("Caught unknown exception.");
}
-#ifdef HAVE_MPI2
+#ifdef _MPI_SEQ_CONTAINER_
+ #ifdef HAVE_MPI2
MPI_Finalize();
-#endif
+ #endif
+#endif
//END_OF(argv[0]);
//LocalTraceBufferPool* bp1 = LocalTraceBufferPool::instance();