]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
improvement for NP component
authorsecher <secher>
Fri, 27 May 2005 11:13:08 +0000 (11:13 +0000)
committersecher <secher>
Fri, 27 May 2005 11:13:08 +0000 (11:13 +0000)
resources/CatalogResources.xml
src/Container/Component_i.cxx
src/Container/SALOME_Component_i.hxx
src/Container/SALOME_Container_i.hxx
src/ResourcesManager/SALOME_ResourcesManager.cxx

index 985ea985888aab820ebb42cc2158d8399e87ca4b..445cb9d55f6a14cb6c4f06650590ecd83196f3e8 100644 (file)
@@ -2,17 +2,17 @@
 <resources>
 <machine protocol="r" nbOfNodes="1" mode="i" OS="LINUX" CPUFreqMHz="2992" memInMB="1024" preReqFilePath="/home/secher/SALOME2_INSTALL/KERNEL_INSTALL/salome.sh" nbOfProcPerNode="1" alias="is111790" hostname="is111790" >
 <modules modulePath="/home/secher/SALOME2_INSTALL/KERNEL_INSTALL" moduleName="KERNEL" />
-  <modules modulePath="/export/home/LGLS/Products/MED_2.2.2" moduleName="MED" />   <modules modulePath="/export/home/LGLS/Products/GEOM_2.2.2" moduleName="GEOM" />   <modules modulePath="/export/home/LGLS/Products/SMESH_2.2.2" moduleName="SMESH" />   <modules modulePath="/export/home/LGLS/Products/SUPERV_2.2.2" moduleName="SUPERV" />   <modules modulePath="/export/home/LGLS/Products/VISU_2.2.2" moduleName="VISU" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYCOMPO_INSTALL" moduleName="MYCOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYMPICOMPO_INSTALL" moduleName="MYMPICOMPO" /> </machine>
+  <modules modulePath="/export/home/LGLS/Products/MED_2.2.2" moduleName="MED" />   <modules modulePath="/export/home/LGLS/Products/GEOM_2.2.2" moduleName="GEOM" />   <modules modulePath="/export/home/LGLS/Products/SMESH_2.2.2" moduleName="SMESH" />   <modules modulePath="/export/home/LGLS/Products/SUPERV_2.2.2" moduleName="SUPERV" />   <modules modulePath="/export/home/LGLS/Products/VISU_2.2.2" moduleName="VISU" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYCOMPO_INSTALL" moduleName="MYCOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYMPICOMPO_INSTALL" moduleName="MYMPICOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYNPCOMPO_INSTALL" moduleName="MYNPCOMPO" /> </machine>
 
 <machine protocol="r" nbOfNodes="1" mode="i" OS="LINUX" CPUFreqMHz="2992" memInMB="1024" preReqFilePath="/home/secher/SALOME2_INSTALL/KERNEL_INSTALL/salome.sh" nbOfProcPerNode="1" alias="is111915" hostname="is111915" >
 <modules modulePath="/home/secher/SALOME2_INSTALL/KERNEL_INSTALL" moduleName="KERNEL" />
-  <modules modulePath="/export/home/LGLS/Products/MED_2.2.2" moduleName="MED" />   <modules modulePath="/export/home/LGLS/Products/GEOM_2.2.2" moduleName="GEOM" />   <modules modulePath="/export/home/LGLS/Products/SMESH_2.2.2" moduleName="SMESH" />   <modules modulePath="/export/home/LGLS/Products/SUPERV_2.2.2" moduleName="SUPERV" />   <modules modulePath="/export/home/LGLS/Products/VISU_2.2.2" moduleName="VISU" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYCOMPO_INSTALL" moduleName="MYCOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYMPICOMPO_INSTALL" moduleName="MYMPICOMPO" /> </machine>
+  <modules modulePath="/export/home/LGLS/Products/MED_2.2.2" moduleName="MED" />   <modules modulePath="/export/home/LGLS/Products/GEOM_2.2.2" moduleName="GEOM" />   <modules modulePath="/export/home/LGLS/Products/SMESH_2.2.2" moduleName="SMESH" />   <modules modulePath="/export/home/LGLS/Products/SUPERV_2.2.2" moduleName="SUPERV" />   <modules modulePath="/export/home/LGLS/Products/VISU_2.2.2" moduleName="VISU" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYCOMPO_INSTALL" moduleName="MYCOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYMPICOMPO_INSTALL" moduleName="MYMPICOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYNPCOMPO_INSTALL" moduleName="MYNPCOMPO" /> </machine>
 
 <machine protocol="r" nbOfNodes="1" mode="i" OS="LINUX" CPUFreqMHz="2992" memInMB="1024" preReqFilePath="/home/secher/SALOME2_INSTALL/KERNEL_INSTALL/salome.sh" nbOfProcPerNode="1" alias="is111918" hostname="is111918" >
 <modules modulePath="/home/secher/SALOME2_INSTALL/KERNEL_INSTALL" moduleName="KERNEL" />
-  <modules modulePath="/export/home/LGLS/Products/MED_2.2.2" moduleName="MED" />   <modules modulePath="/export/home/LGLS/Products/GEOM_2.2.2" moduleName="GEOM" />   <modules modulePath="/export/home/LGLS/Products/SMESH_2.2.2" moduleName="SMESH" />   <modules modulePath="/export/home/LGLS/Products/SUPERV_2.2.2" moduleName="SUPERV" />   <modules modulePath="/export/home/LGLS/Products/VISU_2.2.2" moduleName="VISU" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYCOMPO_INSTALL" moduleName="MYCOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYMPICOMPO_INSTALL" moduleName="MYMPICOMPO" /> </machine>
+  <modules modulePath="/export/home/LGLS/Products/MED_2.2.2" moduleName="MED" />   <modules modulePath="/export/home/LGLS/Products/GEOM_2.2.2" moduleName="GEOM" />   <modules modulePath="/export/home/LGLS/Products/SMESH_2.2.2" moduleName="SMESH" />   <modules modulePath="/export/home/LGLS/Products/SUPERV_2.2.2" moduleName="SUPERV" />   <modules modulePath="/export/home/LGLS/Products/VISU_2.2.2" moduleName="VISU" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYCOMPO_INSTALL" moduleName="MYCOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYMPICOMPO_INSTALL" moduleName="MYMPICOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYNPCOMPO_INSTALL" moduleName="MYNPCOMPO" /> </machine>
 
 <machine protocol="r" nbOfNodes="1" mode="i" OS="LINUX" CPUFreqMHz="2992" memInMB="1024" preReqFilePath="/home/secher/SALOME2_INSTALL/KERNEL_INSTALL/salome.sh" nbOfProcPerNode="1" alias="is111996" hostname="is111996" >
 <modules modulePath="/home/secher/SALOME2_INSTALL/KERNEL_INSTALL" moduleName="KERNEL" />
-  <modules modulePath="/export/home/LGLS/Products/MED_2.2.2" moduleName="MED" />   <modules modulePath="/export/home/LGLS/Products/GEOM_2.2.2" moduleName="GEOM" />   <modules modulePath="/export/home/LGLS/Products/SMESH_2.2.2" moduleName="SMESH" />   <modules modulePath="/export/home/LGLS/Products/SUPERV_2.2.2" moduleName="SUPERV" />   <modules modulePath="/export/home/LGLS/Products/VISU_2.2.2" moduleName="VISU" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYCOMPO_INSTALL" moduleName="MYCOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYMPICOMPO_INSTALL" moduleName="MYMPICOMPO" /> </machine>
+  <modules modulePath="/export/home/LGLS/Products/MED_2.2.2" moduleName="MED" />   <modules modulePath="/export/home/LGLS/Products/GEOM_2.2.2" moduleName="GEOM" />   <modules modulePath="/export/home/LGLS/Products/SMESH_2.2.2" moduleName="SMESH" />   <modules modulePath="/export/home/LGLS/Products/SUPERV_2.2.2" moduleName="SUPERV" />   <modules modulePath="/export/home/LGLS/Products/VISU_2.2.2" moduleName="VISU" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYCOMPO_INSTALL" moduleName="MYCOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYMPICOMPO_INSTALL" moduleName="MYMPICOMPO" /> <modules modulePath="/home/secher/SALOME2_INSTALL/MYNPCOMPO_INSTALL" moduleName="MYNPCOMPO" /> </machine>
 </resources>
index 7bde5d8fc107af34b4121cc4897ca6902cab7500..68c235ceae82853c8e355ae1c28cc2282994df0c 100644 (file)
@@ -125,11 +125,15 @@ void Engines_Component_i::destroy()
 
 Engines::Container_ptr Engines_Component_i::GetContainerRef()
 {
-  MESSAGE("Engines_Component_i::GetContainerRef");
   CORBA::Object_ptr o = _poa->id_to_reference(*_contId) ;
   return Engines::Container::_narrow(o);
 }
 
+Engines_Container_i *Engines_Component_i::GetContainerPtr()
+{
+  return dynamic_cast<Engines_Container_i*>(_poa->id_to_servant(*_contId)) ;
+}
+
 PortableServer::ObjectId * Engines_Component_i::getId()
 {
 //  MESSAGE("PortableServer::ObjectId * Engines_Component_i::getId()");
index 65e0ae77d3cf8e6488d32b6c861ace2afbf93eb7..d639bf6aaa613a49270e9a2e82275f01ad2a6a36 100644 (file)
@@ -41,6 +41,7 @@
 #include "NOTIFICATION.hxx"
 
 class RegistryConnexion;
+class Engines_Container_i;
 
 class Engines_Component_i: public virtual POA_Engines::Component,
                           public virtual PortableServer::RefCountServantBase
@@ -71,6 +72,7 @@ public:
   void ping();
 
   Engines::Container_ptr GetContainerRef();
+  Engines_Container_i *GetContainerPtr();
   PortableServer::ObjectId * getId(); 
 
   void setProperties(const Engines::FieldsDict& dico);
index c9272b5bb5a4a9357e390020a8fac95a86c71c28..0bae4db322df8393677da564aab9537b2ef4fc36 100644 (file)
@@ -79,6 +79,9 @@ public:
   CORBA::Long getPID();
   static bool isPythonContainer(const char* ContainerName);
 
+  int getArgc() { return _argc; }
+  char **getArgv() { return _argv; }
+
 protected:
 
   SALOME_NamingService *_NS ;
index 89c34e8d09481053967afdc2dce3d8c5a8e360a4..545c3dd1ef27ec63f05df31c933c645db38ac75a 100644 (file)
@@ -362,21 +362,23 @@ void SALOME_ResourcesManager::SelectOnlyResourcesWithOS(vector<string>& hosts,co
 {
   string base(OS);
   for(map<string, ParserResourcesType>::const_iterator iter=_resourcesList.begin();iter!=_resourcesList.end();iter++)
+    {
     if((*iter).second.OS==base)
-      hosts.push_back((*iter).first);
+      hosts.push_back((*iter).first); 
+    }
 }
 
 //Warning need an updated parsed list : _resourcesList
 void SALOME_ResourcesManager::KeepOnlyResourcesWithModule(vector<string>& hosts,const char *moduleName) const throw(SALOME_Exception)
 {
-   for(vector<string>::iterator iter=hosts.begin();iter!=hosts.end();iter++)
+   for(vector<string>::iterator iter=hosts.begin();iter!=hosts.end();)
      {
        MapOfParserResourcesType::const_iterator it=_resourcesList.find(*iter);
        const map<string,string>& mapOfModulesOfCurrentHost=(((*it).second).ModulesPath);
        if(mapOfModulesOfCurrentHost.find(moduleName)==mapOfModulesOfCurrentHost.end())
-        {
-          hosts.erase(iter);
-        }
+        hosts.erase(iter);
+       else
+        iter++;
      }
 }