From: secher Date: Wed, 10 Mar 2004 11:30:52 +0000 (+0000) Subject: mise a jour suite a test de composants NP X-Git-Tag: BSEC_br1_20040313 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b22c3242e16f2ec4f2c349ed8f2997421cf9e419;p=modules%2Fkernel.git mise a jour suite a test de composants NP --- diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index fb2265131..760857dd9 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -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 ]) ; diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index 53df81a85..ad729c45a 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -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()"); diff --git a/src/MPIContainer/MPIContainer_i.hxx b/src/MPIContainer/MPIContainer_i.hxx index 01fe9f895..7d9ddc9a2 100644 --- a/src/MPIContainer/MPIContainer_i.hxx +++ b/src/MPIContainer/MPIContainer_i.hxx @@ -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(); diff --git a/src/MPIContainer/MPIObject_i.cxx b/src/MPIContainer/MPIObject_i.cxx index 581a85e79..177a61ffb 100644 --- a/src/MPIContainer/MPIObject_i.cxx +++ b/src/MPIContainer/MPIObject_i.cxx @@ -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); + }