From: secher Date: Thu, 10 Sep 2009 13:12:54 +0000 (+0000) Subject: simplification of API of MPI object X-Git-Tag: V5_1_3rc1~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8934276521252448a380ac47dec7a8aab8effdec;p=modules%2Fkernel.git simplification of API of MPI object --- diff --git a/src/MPIContainer/MPIObject_i.cxx b/src/MPIContainer/MPIObject_i.cxx index af78c0f2c..075a0b16e 100644 --- a/src/MPIContainer/MPIObject_i.cxx +++ b/src/MPIContainer/MPIObject_i.cxx @@ -124,7 +124,7 @@ void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_ptr pobj, bool } #ifdef HAVE_MPI2 -void MPIObject_i::remoteMPI2Connect(bool high, string service) +void MPIObject_i::remoteMPI2Connect(string service) { int i; char port_name[MPI_MAX_PORT_NAME]; @@ -192,8 +192,8 @@ void MPIObject_i::remoteMPI2Connect(bool high, string service) else MPI_Comm_connect(port_name_clt, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &(_icom[service]) ); - /* create global communicator */ - MPI_Intercomm_merge(_icom[service],high,&(_gcom[service])); + /* create global communicator: servers have low index in global communicator*/ + MPI_Intercomm_merge(_icom[service],!_srv[service],&(_gcom[service])); /* only rank 0 can be server for unpublish name */ if(_numproc != 0) _srv[service] = false; diff --git a/src/MPIContainer/MPIObject_i.hxx b/src/MPIContainer/MPIObject_i.hxx index 66d24f58d..9b07b25b2 100644 --- a/src/MPIContainer/MPIObject_i.hxx +++ b/src/MPIContainer/MPIObject_i.hxx @@ -60,7 +60,7 @@ class MPIObject_i: public POA_Engines::MPIObject void BCastIOR(CORBA::ORB_ptr orb,Engines::MPIObject_ptr pobj,bool amiCont); #ifdef HAVE_MPI2 // MPI2 connection - void remoteMPI2Connect(bool high, std::string service); + void remoteMPI2Connect(std::string service); // MPI2 disconnection void remoteMPI2Disconnect(std::string service); #endif