]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
*** empty log message ***
authorageay <ageay>
Fri, 17 Sep 2004 13:34:34 +0000 (13:34 +0000)
committerageay <ageay>
Fri, 17 Sep 2004 13:34:34 +0000 (13:34 +0000)
13 files changed:
configure.in.base
salome_adm/unix/config_files/check_lam.m4
salome_adm/unix/config_files/check_mpi.m4
salome_adm/unix/config_files/check_mpich.m4
salome_adm/unix/make_commence.in
src/Communication/Makefile.in
src/Communication/ReceiverFactory.cxx
src/Communication/SenderFactory.cxx
src/Container/Makefile.in
src/MPIContainer/MPIContainer_i.cxx
src/MPIContainer/MPIObject_i.cxx
src/MPIContainer/Makefile.in
src/Makefile.in

index 5186e98a86c043ab7c01ccdc240d94a19afda6ab..20e060fd8f394415d780ccde79ddb9350dc33808 100644 (file)
@@ -135,19 +135,11 @@ ENABLE_PTHREADS
 
 dnl
 dnl ---------------------------------------------
-dnl testing MPICH
+dnl testing MPI
 dnl ---------------------------------------------
 dnl
 
-CHECK_MPICH
-
-dnl
-dnl ---------------------------------------------
-dnl testing LAM
-dnl ---------------------------------------------
-dnl
-
-CHECK_LAM
+CHECK_MPI
 
 dnl
 dnl ---------------------------------------------
@@ -308,7 +300,7 @@ echo ---------------------------------------------
 echo
 
 echo Configure
-variables="cc_ok boost_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 boost_ok lex_yacc_ok mpi_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"
  
 for var in $variables
 do
index 070c5daeb135cec8301b1bbdc61f5c4f90258a5c..4991a540e04ac937e95dc437bef1ad7f3cf702a9 100644 (file)
@@ -28,8 +28,8 @@ AC_ARG_WITH(lam,
            --with-lam=DIR root directory path of LAM installation,
            WITHLAM="yes",WITHLAM="no")
 
-LAM_INCLUDES=""
-LAM_LIBS=""
+MPI_INCLUDES=""
+MPI_LIBS=""
 if test "$WITHLAM" = yes; then
 
   echo
@@ -40,12 +40,12 @@ if test "$WITHLAM" = yes; then
   LAM_HOME=$withval
 
   if test "$LAM_HOME"; then
-    LAM_INCLUDES="-I$LAM_HOME/include"
-    LAM_LIBS="-L$LAM_HOME/lib"
+    MPI_INCLUDES="-I$LAM_HOME/include"
+    MPI_LIBS="-L$LAM_HOME/lib"
   fi
 
   CPPFLAGS_old="$CPPFLAGS"
-  CPPFLAGS="$LAM_INCLUDES $CPPFLAGS"
+  CPPFLAGS="$MPI_INCLUDES $CPPFLAGS"
   AC_CHECK_HEADER(mpi.h,WITHLAM="yes",WITHLAM="no")
   CPPFLAGS="$CPPFLAGS_old"
 
@@ -53,7 +53,7 @@ if test "$WITHLAM" = yes; then
     AC_CHECK_LIB(util,openpty,,WITHLAM="no")
     LIBS_old="$LIBS"
     LDFLAGS_old="$LDFLAGS"
-    LDFLAGS="$LAM_LIBS $LDFLAGS"
+    LDFLAGS="$MPI_LIBS $LDFLAGS"
     AC_CHECK_LIB(lam,lam_mp_init,,WITHLAM="no")
     AC_CHECK_LIB(mpi,MPI_Init,WITHLAM="yes",WITHLAM="no")
     AC_CHECK_LIB(mpi,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no")
@@ -62,20 +62,11 @@ if test "$WITHLAM" = yes; then
   fi
 
   if test "$WITHLAM" = "yes";then
-    lam_ok=yes
-    LAM_LIBS="$LAM_LIBS -lmpi -llam"
-  fi
-
-  if test "$WITHMPI2" = "yes";then
-    CPPFLAGS="-DHAVE_MPI2 $CPPFLAGS"
-    CORBA_IDLCXXFLAGS="-DHAVE_MPI2 $CORBA_IDLCXXFLAGS"
-    CORBA_IDLPYFLAGS="-DHAVE_MPI2 $CORBA_IDLPYFLAGS"
+     mpi_ok=yes
+     MPI_LIBS="$MPI_LIBS -lmpi -llam"
   fi
 
 fi
-AC_SUBST(LAM_INCLUDES)
-AC_SUBST(LAM_LIBS)
-AC_SUBST(WITHLAM)
-AC_SUBST(WITHMPI2)
+
 
 ])dnl
index 51f271a9f16f30f5ebfdf469228005f5006c8a84..82371c547160eeff51c0a5705cdc19e99ef5d653 100644 (file)
@@ -50,11 +50,14 @@ if test "$WITHMPI" = yes; then
   CPPFLAGS="$CPPFLAGS_old"
 
   if test "$WITHMPI" = "yes";then
+    LIBS_old="$LIBS"
     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")
+    AC_CHECK_LIB(mpi,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no")
     LDFLAGS="$LDFLAGS_old"
+    LIBS="$LIBS_old"
   fi
 
   if test "$WITHMPI" = "yes";then
@@ -63,8 +66,36 @@ if test "$WITHMPI" = yes; then
   fi
 
 fi
+
+if test "$WITHMPI" = no; then
+dnl
+dnl ---------------------------------------------
+dnl testing MPICH
+dnl ---------------------------------------------
+dnl
+
+  CHECK_MPICH
+
+  if test "$WITHMPICH" = no; then
+dnl
+dnl ---------------------------------------------
+dnl testing LAM
+dnl ---------------------------------------------
+dnl
+
+    CHECK_LAM
+
+  fi
+
+fi
+
+if test "$WITHMPI2" = "yes";then
+  CPPFLAGS="-DHAVE_MPI2 $CPPFLAGS"
+  CORBA_IDLCXXFLAGS="-DHAVE_MPI2 $CORBA_IDLCXXFLAGS"
+  CORBA_IDLPYFLAGS="-DHAVE_MPI2 $CORBA_IDLPYFLAGS"
+fi
+
 AC_SUBST(MPI_INCLUDES)
 AC_SUBST(MPI_LIBS)
-AC_SUBST(WITHMPI)
-
+AC_SUBST(mpi_ok)
 ])dnl
index cb4af538888fde4bb42c47a31994a28888b5b102..eff3fa199e4608cc6a3e262f3b02b87687fa1cb1 100644 (file)
@@ -28,8 +28,8 @@ AC_ARG_WITH(mpich,
            --with-mpich=DIR root directory path of MPICH installation,
            WITHMPICH="yes",WITHMPICH="no")
 
-MPICH_INCLUDES=""
-MPICH_LIBS=""
+MPI_INCLUDES=""
+MPI_LIBS=""
 if test "$WITHMPICH" = yes; then
 
   echo
@@ -40,29 +40,30 @@ if test "$WITHMPICH" = yes; then
   MPICH_HOME=$withval
 
   if test "$MPICH_HOME"; then
-    MPICH_INCLUDES="-I$MPICH_HOME/include"
-    MPICH_LIBS="-L$MPICH_HOME/lib"
+    MPI_INCLUDES="-I$MPICH_HOME/include"
+    MPI_LIBS="-L$MPICH_HOME/lib"
   fi
 
   CPPFLAGS_old="$CPPFLAGS"
-  CPPFLAGS="$MPICH_INCLUDES $CPPFLAGS"
+  CPPFLAGS="$MPI_INCLUDES $CPPFLAGS"
   AC_CHECK_HEADER(mpi.h,WITHMPICH="yes",WITHMPICH="no")
   CPPFLAGS="$CPPFLAGS_old"
 
   if test "$WITHMPICH" = "yes";then
     LDFLAGS_old="$LDFLAGS"
-    LDFLAGS="$MPICH_LIBS $LDFLAGS"
+    LDFLAGS="$MPI_LIBS $LDFLAGS"
     AC_CHECK_LIB(mpich,MPI_Init,
                AC_CHECK_LIB(pmpich, PMPI_Init,WITHMPICH="yes",WITHMPICH="no"),
                WITHMPICH="no")
+    AC_CHECK_LIB(mpich,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no")
     LDFLAGS="$LDFLAGS_old"
   fi
 
-  MPICH_LIBS="$MPICH_LIBS -lpmpich -lmpich"
+  if test "$WITHMPICH" = "yes";then
+     mpi_ok=yes
+     MPI_LIBS="$MPI_LIBS -lpmpich -lmpich"
+  fi
 
 fi
-AC_SUBST(MPICH_INCLUDES)
-AC_SUBST(MPICH_LIBS)
-AC_SUBST(WITHMPICH)
 
 ])dnl
index 0ab4e98ebee1e9b52ee7927274a7f1c772f2fa98..0c4f7c26a904b3b2485010b533466151c1d75c07 100644 (file)
@@ -117,15 +117,10 @@ CAS_MODELER=@CAS_MODELER@
 CAS_DATAEXCHANGE=@CAS_DATAEXCHANGE@
 CAS_LDPATH=@CAS_LDPATH@
 
-# MPICH
+# MPI
 
-MPICH_INCLUDES=@MPICH_INCLUDES@
-MPICH_LIBS=@MPICH_LIBS@
-
-# LAM
-
-LAM_INCLUDES=@LAM_INCLUDES@
-LAM_LIBS=@LAM_LIBS@
+MPI_INCLUDES=@MPI_INCLUDES@
+MPI_LIBS=@MPI_LIBS@
 
 # Swig C++ Python
 
index 81e5c43369c334f7779e6966342b93fc40045e99..736fbe560d54a7cd2d8823f50b0ec2fea3f38190 100644 (file)
@@ -25,10 +25,10 @@ BIN =
 BIN_SRC =
 BIN_SERVER_IDL = 
 
-CPPFLAGS+= $(PYTHON_INCLUDES)  $(LAM_INCLUDES) 
+CPPFLAGS+= $(PYTHON_INCLUDES)  $(MPI_INCLUDES) 
 
 LDFLAGS+= -lOpUtil -lSALOMELocalTrace
 
-LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS) $(LAM_LIBS)
+LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS) $(MPI_LIBS)
 
 @CONCLUDE@
index 5f448902dad53dbd679c12118b54c9b8db233560..781a37417d49f0d64a3e369de8b808764daa4b96 100644 (file)
@@ -29,6 +29,7 @@ void *ReceiverFactory::getValue(SALOME::Sender_ptr sender,long &size)throw(Multi
   catch(MultiCommException&)
     {
       SALOME::Sender_ptr newSender=sender->buildOtherWithProtocol(SALOME::CORBA_);
+      MESSAGE("PROTOCOL CHANGED TO CORBA");
       sender->release();
       CORBA::release(sender);
       ret=getValueOneShot(newSender,size);
index 2e3fea4a0e6204a340ef5fe05382fc31d69c2e2a..35b4af0b91e2307a7e9cae39c745039a5220d47e 100644 (file)
@@ -1,4 +1,5 @@
 #include "SenderFactory.hxx"
+#include "utilities.h"
 #include "SALOMEMultiComm.hxx"
 #include "SALOME_Comm_i.hxx"
 
@@ -39,6 +40,7 @@ SALOME::Sender_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommunicator
     default:
       {
        multiCommunicator.setProtocol(SALOME::CORBA_);
+       MESSAGE("PROTOCOL CHANGED TO CORBA");
        SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr);
        return retc->_this();
       }
index 5b9b44d7f05aba9168d774e298e4e0f7732875e4..2a7d7ad874638305a1d55af400b3c1be10dccebc 100644 (file)
@@ -51,10 +51,10 @@ BIN = SALOME_Container
 BIN_SRC =
 BIN_SERVER_IDL = SALOME_Component.idl
 
-CPPFLAGS+= $(PYTHON_INCLUDES) $(LAM_INCLUDES)
+CPPFLAGS+= $(PYTHON_INCLUDES) $(MPI_INCLUDE)
 
 LDFLAGS+= -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace
 
-LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS) $(LAM_LIBS)
+LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS) $(MPI_LIBS)
 
 @CONCLUDE@
index 22ba51053497cb1bcafe0af1c44a28c0ec562c31..b3fb62e6bb2162abdb544dd2b57781003ee05e92 100644 (file)
@@ -35,7 +35,7 @@ MPIContainer_i::MPIContainer_i(int nbproc, int numproc,
                               CORBA::ORB_ptr orb, 
                               PortableServer::POA_ptr poa,
                               char * containerName) 
-  : Engines_Container_i(orb,poa,containerName,0), MPIObject_i(nbproc,numproc)
+  : Engines_Container_i(orb,poa,containerName,0,0), MPIObject_i(nbproc,numproc)
 {
   _id = _poa->activate_object(this);
 
index 218c01c9db9326679fd7824f88a1b76188ac9236..7f9324a9fdf905dada3b3d08c58ed044957453b0 100644 (file)
@@ -85,14 +85,14 @@ void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_var pobj,
 
     // Process 0 recupere les ior de l'object sur les autres process
     for(ip=1;ip<_nbproc;ip++){
-      err = MPI_Recv(&n,1,MPI_INTEGER,ip,ip,MPI_COMM_WORLD,&status);
+      err = MPI_Recv(&n,1,MPI_INT,ip,ip,MPI_COMM_WORLD,&status);
       if(err){
        MESSAGE("[" << _numproc << "] MPI_RECV error");
        exit(1);
       }
       // Allocation de la chaine de longueur n
       ior = (char*)calloc(n,sizeof(char));
-      err = MPI_Recv(ior,n,MPI_CHARACTER,ip,2*ip,MPI_COMM_WORLD,&status);
+      err = MPI_Recv(ior,n,MPI_CHAR,ip,2*ip,MPI_COMM_WORLD,&status);
       if(err){
        MESSAGE("[" << _numproc << "] MPI_RECV error");
        exit(1);
@@ -110,12 +110,12 @@ void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_var pobj,
   else{
     // On envoie l'IOR au process 0
     n = strlen((char*)sior);
-    err = MPI_Send(&n,1,MPI_INTEGER,0,_numproc,MPI_COMM_WORLD);
+    err = MPI_Send(&n,1,MPI_INT,0,_numproc,MPI_COMM_WORLD);
     if(err){
       MESSAGE("[" << _numproc << "] MPI_SEND error");
       exit(1);
     }
-    err = MPI_Send((char*)sior,n,MPI_CHARACTER,0,2*_numproc,MPI_COMM_WORLD);
+    err = MPI_Send((char*)sior,n,MPI_CHAR,0,2*_numproc,MPI_COMM_WORLD);
     if(err){
       MESSAGE("[" << _numproc << "] MPI_SEND error");
       exit(1);
index da4e295d95186e4f043a718bddbfcd47a69d1bb4..5576a570a74a10c5631626393929a250a962d51e 100644 (file)
@@ -51,8 +51,8 @@ BIN = SALOME_MPIContainer
 BIN_SRC = 
 BIN_SERVER_IDL = TypeData.idl MPIObject.idl MPIContainer.idl
 
-CXXFLAGS+=${MPICH_INCLUDES}
-CXX_DEPEND_FLAG+=${MPICH_INCLUDES}
-LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil ${MPICH_LIBS} 
+CXXFLAGS+=${MPI_INCLUDES}
+CXX_DEPEND_FLAG+=${MPI_INCLUDES}
+LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil ${MPI_LIBS} 
 
 @CONCLUDE@
index 87c3899745d10f6db9ca61577103416cb43c04b5..19ce24abaf9370aeb011149a6b5fa24ab7ffb0cb 100644 (file)
@@ -44,7 +44,7 @@ SUBDIRS = MSG2QM SALOMELocalTrace Logger SALOMELogger Utils PatchQt \
          Session SALOME_SWIG TOOLSGUI SALOME_PY \
           RegistryDisplay ModuleGenerator SALOME_PYQT Loader Communication
 
-ifeq (@WITHMPICH@,yes)
+ifeq (@mpi_ok@,yes)
   SUBDIRS+= MPIContainer
 endif