]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CCAR: initialize isMPI and nb_component_nodes in GetMachineParameters
authorcaremoli <caremoli>
Fri, 26 Sep 2008 14:57:53 +0000 (14:57 +0000)
committercaremoli <caremoli>
Fri, 26 Sep 2008 14:57:53 +0000 (14:57 +0000)
      add an entry with the real machine name when name is "localhost"

src/ResourcesManager/Makefile.am
src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx
src/ResourcesManager/SALOME_ResourcesManager.cxx

index b12707efa065b0c9988c964567ee54ef07da2e6c..db305442bc731dfafe6ef48c4177580427800192 100755 (executable)
@@ -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@
index 7d1c53e2a297de36fcf0acd717f796fb15255cca..7fe652fdb065740b0785d940803713635609995f 100755 (executable)
@@ -27,6 +27,7 @@
 //$Header$
 
 #include "SALOME_ResourcesCatalog_Handler.hxx"
+#include "OpUtil.hxx"
 #include <iostream>
 #include <map>
 #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;
     }
 
index 90f273d69221a71e5fc7080ea254cecb9e0d835a..f74d0a8770ea845d03184a46d5788c9151f604fc 100644 (file)
@@ -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;
 }