From: secher Date: Mon, 31 Aug 2009 12:42:14 +0000 (+0000) Subject: launch ompi-server with salome, and kill it at the end of Salome X-Git-Tag: V5_1_3rc1~78 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1e3ace0c14f46ab1eef51fbb3e52aa23ba97f435;p=modules%2Fkernel.git launch ompi-server with salome, and kill it at the end of Salome --- diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index a110ba69d..84900334d 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -81,6 +81,19 @@ SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb, PortableSer _NS->Register(refContMan,_ContainerManagerNameInNS); _isAppliSalomeDefined = (getenv("APPLI") != 0); + +#ifdef HAVE_MPI2 + if( getenv("OMPI_URI_FILE") != NULL ){ + system("killall ompi-server"); + string command; + command = "ompi-server -r "; + command += getenv("OMPI_URI_FILE"); + int status=system(command.c_str()); + if(status!=0) + throw SALOME_Exception("Error when launching ompi-server"); + } +#endif + MESSAGE("constructor end"); } @@ -93,6 +106,10 @@ SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb, PortableSer SALOME_ContainerManager::~SALOME_ContainerManager() { MESSAGE("destructor"); +#ifdef HAVE_MPI2 + if( getenv("OMPI_URI_FILE") != NULL ) + system("killall ompi-server"); +#endif } //=============================================================================