From: caremoli Date: Fri, 26 Sep 2008 14:57:53 +0000 (+0000) Subject: CCAR: initialize isMPI and nb_component_nodes in GetMachineParameters X-Git-Tag: RELIQUAT_4x_25102008~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9e69358b376cd4d097b24e6019913587b6d3ddae;p=modules%2Fkernel.git CCAR: initialize isMPI and nb_component_nodes in GetMachineParameters add an entry with the real machine name when name is "localhost" --- diff --git a/src/ResourcesManager/Makefile.am b/src/ResourcesManager/Makefile.am index b12707efa..db305442b 100755 --- a/src/ResourcesManager/Makefile.am +++ b/src/ResourcesManager/Makefile.am @@ -91,8 +91,10 @@ libResourcesManager_la_SOURCES =\ libResourcesManager_la_CPPFLAGS =\ -I$(srcdir)/../Basics \ -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../Utils \ @LIBXML_INCLUDES@ libResourcesManager_la_LDFLAGS = -no-undefined -version-info=0:0:0 libResourcesManager_la_LIBADD =\ + ../Utils/libOpUtil.la \ @LIBXML_LIBS@ diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index 7d1c53e2a..7fe652fdb 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -27,6 +27,7 @@ //$Header$ #include "SALOME_ResourcesCatalog_Handler.hxx" +#include "OpUtil.hxx" #include #include #include "utilities.h" @@ -297,13 +298,17 @@ void SALOME_ResourcesCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) _resource.HostName = nodeName ; _resources_list[nodeName] = _resource; } - } - else - _resources_list[_resource.HostName] = _resource; - } - else - _resources_batch_list[_resource.HostName] = _resource; - } + } + else + { + _resources_list[_resource.HostName] = _resource; + if(_resource.HostName == "localhost") + _resources_list[GetHostname()] = _resource; + } + } + else + _resources_batch_list[_resource.HostName] = _resource; + } aCurNode = aCurNode->next; } diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index 90f273d69..f74d0a877 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -208,6 +208,7 @@ Engines::MachineParameters* SALOME_ResourcesManager::GetMachineParameters(const p_ptr->cpu_clock = resource.DataForSort._CPUFreqMHz; p_ptr->nb_proc_per_node = resource.DataForSort._nbOfProcPerNode; p_ptr->nb_node = resource.DataForSort._nbOfNodes; + if( resource.mpi == indif ) p_ptr->mpiImpl = "indif"; else if( resource.mpi == lam ) @@ -220,11 +221,18 @@ Engines::MachineParameters* SALOME_ResourcesManager::GetMachineParameters(const p_ptr->mpiImpl = "openmpi"; else if( resource.mpi == slurm ) p_ptr->mpiImpl = "slurm"; + + p_ptr->isMPI=false; + if(resource.mpi != indif ) + p_ptr->isMPI=true; + if( resource.Batch == pbs ) p_ptr->batch = "pbs"; else if( resource.Batch == lsf ) p_ptr->batch = "lsf"; + p_ptr->nb_component_nodes=1; + return p_ptr; }