return false;
}
+int InlineNode::getMaxLevelOfParallelism() const
+{
+ if(!isDeployable())
+ return 1;
+ if(!_container)
+ return 1;
+ std::map<std::string,std::string> props(_container->getProperties());
+ std::map<std::string,std::string>::iterator it(props.find(std::string("nb_proc_per_node")));
+ if(it==props.end())
+ return 1;
+ if((*it).second.empty())
+ return 1;
+ std::istringstream iss((*it).second);
+ int ret(1); iss >> ret;
+ return ret;
+}
+
void performDuplicationOfPlacement(const Node& other);
void performShallowDuplicationOfPlacement(const Node& other);
bool isDeployable() const;
+ int getMaxLevelOfParallelism() const;
public:
static const char LOCAL_STR[];
static const char REMOTE_STR[];
ex.RunW(n0,0)
self.assertEqual(n0.getState(),pilot.DONE)
pass
+
+ def test18(self):
+ SALOMERuntime.RuntimeSALOME_setRuntime()
+ r=pilot.getRuntime()
+ p=r.createProc("prTest18")
+ n00=r.createScriptNode("Salome","n00")
+ self.assertEqual(n00.getMaxLevelOfParallelism(),1)
+ n00.setExecutionMode("remote")
+ self.assertEqual(n00.getMaxLevelOfParallelism(),1)
+ cont=p.createContainer("gg","Salome")
+ n00.setContainer(cont)
+ self.assertEqual(n00.getMaxLevelOfParallelism(),1)
+ cont.setProperty("nb_proc_per_nod","6")
+ self.assertEqual(n00.getMaxLevelOfParallelism(),1)
+ cont.setProperty("nb_proc_per_node","7") # <- here
+ self.assertEqual(n00.getMaxLevelOfParallelism(),7) # <- here
+ pass
pass