]> SALOME platform Git repositories - modules/parametric.git/commitdiff
Salome HOME
Fix distribution of computations in batch jobs
authorRenaud Barate <renaud.barate@edf.fr>
Thu, 25 Apr 2013 15:44:42 +0000 (17:44 +0200)
committerRenaud Barate <renaud.barate@edf.fr>
Thu, 25 Apr 2013 15:44:42 +0000 (17:44 +0200)
idl/PARAMETRIC_Gen.idl
src/PARAMETRIC/PARAMETRIC.py
src/PARAMETRICGUI/PARAMETRICGUI.py
src/salome/parametric/genjob.py

index 7531ac2f05e4bfd6602d90e09f8ec7b11406ef8f..6d24fbd34aa64ec7634421302f1f80e36b23a9e8 100644 (file)
@@ -40,7 +40,8 @@ interface PARAMETRIC_Gen : Engines::EngineComponent, SALOMEDS::Driver
       raises (SALOME::SALOME_Exception);
 
     void RunStudy(in long salomeStudyID,
-                  in SALOMEDS::ID entry)
+                  in SALOMEDS::ID entry,
+                  in boolean localOnly)
       raises (SALOME::SALOME_Exception);
 
     void ExportToCSV(in long salomeStudyID,
index 39f18dfc80b4122645f4e67978efc3258e25a3c9..f5ea47fae079884f4f337f9228503a83fe7ad8fd 100644 (file)
@@ -171,7 +171,7 @@ class PARAMETRIC(PARAMETRIC_ORB__POA.PARAMETRIC_Gen, SALOME_ComponentPy_i, SALOM
       self.salome_runtime.addCatalog(self.session_catalog)
     return self.salome_runtime
 
-  def RunStudy(self, salomeStudyID, entry):
+  def RunStudy(self, salomeStudyID, entry, localOnly):
     try:
       self.beginService("PARAMETRIC.RunStudy")
 
@@ -196,7 +196,8 @@ class PARAMETRIC(PARAMETRIC_ORB__POA.PARAMETRIC_Gen, SALOME_ComponentPy_i, SALOM
       proc.edAddChild(foreach)
       
       distrib_container = proc.createContainer("DistribContainer")
-      distrib_container.setProperty("hostname", "localhost")
+      if localOnly:
+        distrib_container.setProperty("hostname", "localhost")
 
       if param_study.solver_code_type == ParametricStudy.SALOME_COMPONENT:
         solver_code = param_study.salome_component_name
index c7cbcc217a93ca79af4ce8340aab4b9946faf1fc..a0ddcf4fc45ea2d25150e55a89d433bc2ad07bd3 100644 (file)
@@ -202,7 +202,7 @@ def run_study():
     ed = ParametricStudyEditor()
     entry = salome.sg.getSelected(0)
     engine = ed.find_or_create_engine()
-    engine.RunStudy(ed.study_id, entry)
+    engine.RunStudy(ed.study_id, entry, True)
     qapp.restoreOverrideCursor()
   except SALOME.SALOME_Exception, exc:
     qapp.restoreOverrideCursor()
index 04c0aa06961b32896896e842142cd9fd82f48995..63a81118e6d38416ff3e433776c8dadd850da92a 100644 (file)
@@ -43,7 +43,7 @@ ed.loadComponentEngine(scomp, "ParametricContainer")
 comp = scomp.GetObject()
 
 # run parametric study
-comp.RunStudy(study._get_StudyId(), "%(param_entry)s")
+comp.RunStudy(study._get_StudyId(), "%(param_entry)s", False)
 
 # save study
 salome.myStudyManager.SaveAs("%(output_study)s", study, False)