- Engines::ResourceList_var resourceList;
- resourceList = resManager->GetFittingResources(params);
- ret.reserve(resourceList->length());
- for(int i = 0; i<resourceList->length(); i++)
+ try
+ {
+ Engines::ResourceList_var resourceList;
+ resourceList = resManager->GetFittingResources(params);
+ ret.reserve(resourceList->length());
+ for(int i = 0; i<resourceList->length(); i++)
+ {
+ const char* resource_name = resourceList[i];
+ std::string std_resource_name = resource_name;
+ Engines::ResourceDefinition_var resource_definition
+ = resManager->GetResourceDefinition(resource_name);
+ int nb_cores = resource_definition->nb_node *
+ resource_definition->nb_proc_per_node;
+ ret.push_back(std::pair<std::string,int>(resource_name, nb_cores));
+ }
+ }
+ catch(SALOME::SALOME_Exception& e)