From ee9996b5b0ee1f30b48eccca4b52f0b29e381af7 Mon Sep 17 00:00:00 2001 From: secher Date: Thu, 30 Jun 2011 12:49:43 +0000 Subject: [PATCH] reserve on processor for salome on CCRT beside containers --- src/Container/SALOME_ContainerManager.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 141c15dcf..6f2e8ccac 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -314,8 +314,18 @@ SALOME_ContainerManager::GiveContainer(const Engines::ContainerParameters& param nbproc = 1; else nbproc = params.nb_proc; - if( getenv("LIBBATCH_NODEFILE") != NULL ) - machFile = machinesFile(nbproc); + try + { + if( getenv("LIBBATCH_NODEFILE") != NULL ) + machFile = machinesFile(nbproc); + } + catch(const SALOME_Exception & ex) + { + std::string err_msg = ex.what(); + err_msg += params.container_name; + INFOS(err_msg.c_str()); + return ret; + } // A mpi parallel container register on zero node in NS containerNameInNS = _NS->BuildContainerNameForNS(params, GetMPIZeroNode(hostname,machFile).c_str()); } @@ -1101,7 +1111,7 @@ std::string SALOME_ContainerManager::machinesFile(const int nbproc) if( fpi >> tmp ) fpo << tmp << std::endl; else - throw SALOME_Exception("You ask more processes than batch session have allocated!"); + throw SALOME_Exception("You need more processors than batch session have allocated for you! Unable to launch the mpi container: "); _nbprocUsed += nbproc; fpi.close(); -- 2.39.2