From: mkr Date: Mon, 27 Nov 2006 12:15:18 +0000 (+0000) Subject: The modfications sent by Jean are for the use of Salome on a batch X-Git-Tag: V3_2_3pre4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=80db67dc64b10b63a88b06bb05559a0b8415f360;p=modules%2Fkernel.git The modfications sent by Jean are for the use of Salome on a batch cluster like CCRT. --- 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"); + } } }