]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
simplification of API of MPI object
authorsecher <secher>
Thu, 10 Sep 2009 13:12:54 +0000 (13:12 +0000)
committersecher <secher>
Thu, 10 Sep 2009 13:12:54 +0000 (13:12 +0000)
src/MPIContainer/MPIObject_i.cxx
src/MPIContainer/MPIObject_i.hxx

index af78c0f2c39e1e70a9161751fbcfcd2ae2141421..075a0b16e289f1a064d1edb8e122aeba0681b100 100644 (file)
@@ -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;
index 66d24f58d43592195457339114d579e85edab84a..9b07b25b2001373a6b50209dfa095796af8e8436 100644 (file)
@@ -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