]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
gestion parallelisme sur CCRT
authorsecher <secher>
Wed, 28 Jan 2004 13:39:32 +0000 (13:39 +0000)
committersecher <secher>
Wed, 28 Jan 2004 13:39:32 +0000 (13:39 +0000)
configure.in.base
salome_adm/unix/config_files/check_mpi.m4 [new file with mode: 0644]
salome_adm/unix/make_commence.in
src/MPIContainer/Makefile.in
src/Makefile.in

index f946353c74ba171f61ea1cf7246e355d0725e106..08f6fe1c177aaa1a2ea2794270c3e64dc45b9a4b 100644 (file)
@@ -144,6 +144,7 @@ dnl testing MPICH
 dnl ---------------------------------------------
 dnl
 
+CHECK_MPI
 CHECK_MPICH
 
 echo
@@ -305,7 +306,7 @@ echo ---------------------------------------------
 echo
 
 echo Configure
-variables="cc_ok mpich_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok"
+variables="cc_ok mpi_ok mpich_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok"
 
 AC_SUBST(pyqt_ok)
  
diff --git a/salome_adm/unix/config_files/check_mpi.m4 b/salome_adm/unix/config_files/check_mpi.m4
new file mode 100644 (file)
index 0000000..51f271a
--- /dev/null
@@ -0,0 +1,70 @@
+dnl  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+dnl 
+dnl  This library is free software; you can redistribute it and/or 
+dnl  modify it under the terms of the GNU Lesser General Public 
+dnl  License as published by the Free Software Foundation; either 
+dnl  version 2.1 of the License. 
+dnl 
+dnl  This library is distributed in the hope that it will be useful, 
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+dnl  Lesser General Public License for more details. 
+dnl 
+dnl  You should have received a copy of the GNU Lesser General Public 
+dnl  License along with this library; if not, write to the Free Software 
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+dnl 
+dnl  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+dnl
+dnl
+dnl
+
+AC_DEFUN([CHECK_MPI],[
+
+AC_REQUIRE([AC_PROG_CC])dnl
+
+AC_ARG_WITH(mpi,
+           --with-mpi=DIR root directory path of MPICH installation,
+           WITHMPI="yes",WITHMPI="no")
+
+MPI_INCLUDES=""
+MPI_LIBS=""
+if test "$WITHMPI" = yes; then
+
+  echo
+  echo ---------------------------------------------
+  echo testing mpi
+  echo ---------------------------------------------
+  echo
+
+  if test "x$withval" != "xyes"; then
+    MPI_HOME=$withval
+    MPI_INCLUDES="-I$MPI_HOME/include"
+    MPI_LIBS="-L$MPI_HOME/lib"
+  fi
+
+  CPPFLAGS_old="$CPPFLAGS"
+  CPPFLAGS="$MPI_INCLUDES $CPPFLAGS"
+  AC_CHECK_HEADER(mpi.h,WITHMPI="yes",WITHMPI="no")
+  CPPFLAGS="$CPPFLAGS_old"
+
+  if test "$WITHMPI" = "yes";then
+    LDFLAGS_old="$LDFLAGS"
+    LDFLAGS="$MPI_LIBS $LDFLAGS"
+    AC_CHECK_LIB(elan,elan_init,MPI_LIBS="$MPI_LIBS -lelan")
+    AC_CHECK_LIB(mpi,MPI_Init,WITHMPI="yes",WITHMPI="no")
+    LDFLAGS="$LDFLAGS_old"
+  fi
+
+  if test "$WITHMPI" = "yes";then
+    mpi_ok=yes
+    MPI_LIBS="$MPI_LIBS -lmpi"
+  fi
+
+fi
+AC_SUBST(MPI_INCLUDES)
+AC_SUBST(MPI_LIBS)
+AC_SUBST(WITHMPI)
+
+])dnl
index 608947b34993247898eb1a2bb3b742ca42cba123..f54cc072e0a3434f7ebc33c4f8dc3110c8daa98e 100644 (file)
@@ -112,8 +112,12 @@ OCC_VIEWER_LIBS=@CAS_VIEWER@
 OCC_MODELER_LIBS=@CAS_MODELER@
 OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@
 OCC_LIBS=@CAS_LDFLAGS@
-# MPICH
 
+# MPI
+MPI_INCLUDES=@MPI_INCLUDES@
+MPI_LIBS=@MPI_LIBS@
+
+# MPICH
 MPICH_INCLUDES=@MPICH_INCLUDES@
 MPICH_LIBS=@MPICH_LIBS@
 
index 3c582f71997c82c70775a05d93e2ad8b5e1294b6..9295763aa0d9cfa2ee428ddd43784617525889b1 100644 (file)
@@ -51,8 +51,17 @@ BIN = SALOME_MPIContainer
 BIN_SRC = 
 BIN_SERVER_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl
 
-CXXFLAGS+=${MPICH_INCLUDES}
-CXX_DEPEND_FLAG+=${MPICH_INCLUDES}
-LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil ${MPICH_LIBS} 
+LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil
+ifeq (@WITHMPICH@,yes)
+  CXXFLAGS+=${MPICH_INCLUDES}
+  CXX_DEPEND_FLAG+=${MPICH_INCLUDES}
+  LDFLAGS+= ${MPICH_LIBS}
+endif
+
+ifeq (@WITHMPI@,yes)
+  CXXFLAGS+=${MPI_INCLUDES}
+  CXX_DEPEND_FLAG+=${MPI_INCLUDES}
+  LDFLAGS+= ${MPI_LIBS}
+endif
 
 @CONCLUDE@
index 6bdf3f75d0334ba872baf8f001118fd6bd070620..a6ddad5ace76e3f620cc5ce749bd248705cebe04 100644 (file)
@@ -38,6 +38,10 @@ SUBDIRS = MSG2QM Logger Utils PatchQt NamingService Registry ModuleCatalog DataT
          SALOME_SWIG TOOLSGUI SALOME_PY RegistryDisplay ModuleGenerator \
          SALOME_PYQT Loader
 
+ifeq (@WITHMPI@,yes)
+  SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer
+endif
+
 ifeq (@WITHMPICH@,yes)
   SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer
 endif