From 5d927ec432dbff6e1372f101a980d63f082783cf Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 17 Sep 2004 13:34:34 +0000 Subject: [PATCH] *** empty log message *** --- configure.in.base | 14 ++------- salome_adm/unix/config_files/check_lam.m4 | 27 ++++++---------- salome_adm/unix/config_files/check_mpi.m4 | 35 +++++++++++++++++++-- salome_adm/unix/config_files/check_mpich.m4 | 21 +++++++------ salome_adm/unix/make_commence.in | 11 ++----- src/Communication/Makefile.in | 4 +-- src/Communication/ReceiverFactory.cxx | 1 + src/Communication/SenderFactory.cxx | 2 ++ src/Container/Makefile.in | 4 +-- src/MPIContainer/MPIContainer_i.cxx | 2 +- src/MPIContainer/MPIObject_i.cxx | 8 ++--- src/MPIContainer/Makefile.in | 6 ++-- src/Makefile.in | 2 +- 13 files changed, 75 insertions(+), 62 deletions(-) diff --git a/configure.in.base b/configure.in.base index 5186e98a8..20e060fd8 100644 --- a/configure.in.base +++ b/configure.in.base @@ -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 diff --git a/salome_adm/unix/config_files/check_lam.m4 b/salome_adm/unix/config_files/check_lam.m4 index 070c5daeb..4991a540e 100644 --- a/salome_adm/unix/config_files/check_lam.m4 +++ b/salome_adm/unix/config_files/check_lam.m4 @@ -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 diff --git a/salome_adm/unix/config_files/check_mpi.m4 b/salome_adm/unix/config_files/check_mpi.m4 index 51f271a9f..82371c547 100644 --- a/salome_adm/unix/config_files/check_mpi.m4 +++ b/salome_adm/unix/config_files/check_mpi.m4 @@ -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 diff --git a/salome_adm/unix/config_files/check_mpich.m4 b/salome_adm/unix/config_files/check_mpich.m4 index cb4af5388..eff3fa199 100644 --- a/salome_adm/unix/config_files/check_mpich.m4 +++ b/salome_adm/unix/config_files/check_mpich.m4 @@ -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 diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/make_commence.in index 0ab4e98eb..0c4f7c26a 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/make_commence.in @@ -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 diff --git a/src/Communication/Makefile.in b/src/Communication/Makefile.in index 81e5c4336..736fbe560 100644 --- a/src/Communication/Makefile.in +++ b/src/Communication/Makefile.in @@ -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@ diff --git a/src/Communication/ReceiverFactory.cxx b/src/Communication/ReceiverFactory.cxx index 5f448902d..781a37417 100644 --- a/src/Communication/ReceiverFactory.cxx +++ b/src/Communication/ReceiverFactory.cxx @@ -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); diff --git a/src/Communication/SenderFactory.cxx b/src/Communication/SenderFactory.cxx index 2e3fea4a0..35b4af0b9 100644 --- a/src/Communication/SenderFactory.cxx +++ b/src/Communication/SenderFactory.cxx @@ -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(); } diff --git a/src/Container/Makefile.in b/src/Container/Makefile.in index 5b9b44d7f..2a7d7ad87 100644 --- a/src/Container/Makefile.in +++ b/src/Container/Makefile.in @@ -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@ diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index 22ba51053..b3fb62e6b 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -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); diff --git a/src/MPIContainer/MPIObject_i.cxx b/src/MPIContainer/MPIObject_i.cxx index 218c01c9d..7f9324a9f 100644 --- a/src/MPIContainer/MPIObject_i.cxx +++ b/src/MPIContainer/MPIObject_i.cxx @@ -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); diff --git a/src/MPIContainer/Makefile.in b/src/MPIContainer/Makefile.in index da4e295d9..5576a570a 100644 --- a/src/MPIContainer/Makefile.in +++ b/src/MPIContainer/Makefile.in @@ -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@ diff --git a/src/Makefile.in b/src/Makefile.in index 87c389974..19ce24aba 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -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 -- 2.39.2