]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
mise a jour suite a test de composants NP BSEC_br1_20040313
authorsecher <secher>
Wed, 10 Mar 2004 11:30:52 +0000 (11:30 +0000)
committersecher <secher>
Wed, 10 Mar 2004 11:30:52 +0000 (11:30 +0000)
src/Container/Container_i.cxx
src/MPIContainer/MPIContainer_i.cxx
src/MPIContainer/MPIContainer_i.hxx
src/MPIContainer/MPIObject_i.cxx

index fb22651319acfe6bb9ffb220d4c5a274949967e6..760857dd9a203836b48f0b304713e7ca530c8bcd 100644 (file)
@@ -52,6 +52,11 @@ char ** _ArgV ;
 extern "C" {void ActSigIntHandler() ; }
 extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; }
 
+Engines_Container_i::Engines_Container_i () :
+ _numInstance(0)
+{
+}
+
 Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, 
                                          PortableServer::POA_ptr poa,
                                          char *containerName ,
@@ -61,7 +66,8 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb,
  _numInstance(0)
 {
 
-  ActSigIntHandler() ;
+  if(regist)
+    ActSigIntHandler() ;
 
   _ArgC = argc ;
   _ArgV = argv ;
@@ -78,7 +84,7 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb,
   }
   string hostname = GetHostname();
   MESSAGE(hostname << " " << getpid() << " Engines_Container_i starting argc "
-          << _argc << " Thread " << pthread_self() ) ;
+         << _argc << " Thread " << pthread_self() ) ;
   i = 0 ;
   while ( _argv[ i ] ) {
     MESSAGE("           argv" << i << " " << _argv[ i ]) ;
index 53df81a85ea36ab9f0c90b717378651690596a02..ad729c45ae07eaf880699114ef8356a2c294fb27 100644 (file)
@@ -63,6 +63,11 @@ Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc,
   BCastIOR(_orb,pobj,true);
 }
 
+Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc) 
+  : Engines_Container_i(), MPIObject_i(nbproc,numproc)
+{
+}
+
 Engines_MPIContainer_i::~Engines_MPIContainer_i(void)
 {
   MESSAGE("[" << _numproc << "] Engines_MPIContainer_i::~Engines_MPIContainer_i()");
index 01fe9f89524faf92797e90939ece4448e78ec2bc..7d9ddc9a26425bdea04da91a5f1e32785462a0a8 100644 (file)
@@ -44,6 +44,7 @@ class Engines_MPIContainer_i : public POA_Engines::MPIContainer,
                          PortableServer::POA_ptr poa,
                          char * containerName,
                          int argc, char *argv[]);
+  Engines_MPIContainer_i(int nbproc, int numproc);
   // Destructor
   ~Engines_MPIContainer_i();
 
index 581a85e79015b56552a20f104d184267ac55d9fe..177a61ffb0e15e7619244e9d5efe95bee7ce2c53 100644 (file)
@@ -109,18 +109,21 @@ void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_var pobj,
   }
   else{
     // On envoie l'IOR au process 0
-    n = strlen((char*)sior);
+    ior = sior._retn();
+    n = strlen(ior) + 1;
     err = MPI_Send(&n,1,MPI_INTEGER,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(ior,n,MPI_CHARACTER,0,2*_numproc,MPI_COMM_WORLD);
     if(err){
       MESSAGE("[" << _numproc << "] MPI_SEND error");
       exit(1);
     }
   }
 
+  MPI_Barrier(MPI_COMM_WORLD);
+
 }