From 80db67dc64b10b63a88b06bb05559a0b8415f360 Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 27 Nov 2006 12:15:18 +0000 Subject: [PATCH] The modfications sent by Jean are for the use of Salome on a batch cluster like CCRT. --- .../SALOME_ResourcesCatalog_Handler.cxx | 22 +++++++++++++++++-- .../SALOME_ResourcesManager.cxx | 18 +++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index 8575f1b1c..53162f87c 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -230,8 +230,26 @@ endElement(const QString&, if ((qName.compare(QString(test_modules)) == 0)) _resource.ModulesPath[previous_module_name] = previous_module_path; - if ((qName.compare(QString(test_machine)) == 0)) - _resources_list[_resource.DataForSort._hostName] = _resource; + if ((qName.compare(QString(test_machine)) == 0)){ + int nbnodes = _resource.DataForSort._nbOfNodes; + if( nbnodes > 1 ){ + string clusterNode = _resource.DataForSort._hostName ; + for(int i=0;i 1 + int cpt=0; + for (map::const_iterator iter = _resourcesList.begin(); iter != _resourcesList.end(); iter++){ + if( (*iter).second.DataForSort._nbOfNodes > 1 ){ + if( strncmp(hostname,(*iter).first.c_str(),strlen(hostname)) == 0 ){ + ret.push_back((*iter).first.c_str()); + //cout << "SALOME_ResourcesManager::GetFittingResources vector[" + // << cpt << "] = " << (*iter).first.c_str() << endl ; + cpt++; + } + } + } + if(cpt==0){ // --- user specified an unknown hostame so notify him. - MESSAGE("ResourcesManager::GetFittingResources : SALOME_Exception"); - throw SALOME_Exception("unknown host"); + MESSAGE("ResourcesManager::GetFittingResources : SALOME_Exception"); + throw SALOME_Exception("unknown host"); + } } } -- 2.39.2