From 1e3ace0c14f46ab1eef51fbb3e52aa23ba97f435 Mon Sep 17 00:00:00 2001 From: secher Date: Mon, 31 Aug 2009 12:42:14 +0000 Subject: [PATCH] launch ompi-server with salome, and kill it at the end of Salome --- src/Container/SALOME_ContainerManager.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 } //============================================================================= -- 2.39.2