]> SALOME platform Git repositories - modules/jobmanager.git/commitdiff
Salome HOME
WIP agy/yn_200121
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 20 Jan 2021 06:21:27 +0000 (07:21 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 20 Jan 2021 06:21:27 +0000 (07:21 +0100)
src/engine/BL_Job.hxx
src/engine/BL_SALOMEServices.cxx
src/genericgui/BL_CreateJobWizard.cxx
src/genericgui/BL_CreateJobWizard.hxx
src/genericgui/BL_JobsManager_QT.cxx
src/genericgui/ResourceRequirementsWizardPage.ui

index b57dd1998012cfd2d4e59857b93b5234a073bad8..2b91b1c108d598bbc459f7085d7b46f9ce2012b6 100644 (file)
@@ -72,6 +72,7 @@ namespace BL{
         MemReqType mem_req_type;
         int nb_proc;
         int nb_node;
+        int nb_proc_per_node;
         bool exclusive;
 
         // Parameters for COORM
index 331040c39362dee1fd02e11f591278501d08c9f2..dd33eb77a1271330296010b4284b13734ed4078a 100644 (file)
@@ -328,11 +328,16 @@ BL::SALOMEServices::create_job(BL::Job * job)
   BL::Job::BatchParam cpp_batch_params =  job->getBatchParameters();
   job_parameters->work_directory = CORBA::string_dup(cpp_batch_params.batch_directory.c_str());
 
+  // Unused parameters
+  job_parameters->resource_required.nb_proc_per_node = -1;
+  job_parameters->resource_required.cpu_clock = -1;
+
   // Resource
   job_parameters->maximum_duration = CORBA::string_dup(cpp_batch_params.maximum_duration.c_str());
   job_parameters->resource_required.name = CORBA::string_dup(job->getResource().c_str());
   job_parameters->resource_required.nb_proc = cpp_batch_params.nb_proc;
   job_parameters->resource_required.nb_node = cpp_batch_params.nb_node;
+  job_parameters->resource_required.nb_proc_per_node = cpp_batch_params.nb_proc_per_node;
   job_parameters->queue = CORBA::string_dup(job->getBatchQueue().c_str());
   job_parameters->partition = CORBA::string_dup(job->getBatchPartition().c_str());
   job_parameters->exclusive = cpp_batch_params.exclusive;
@@ -354,9 +359,6 @@ BL::SALOMEServices::create_job(BL::Job * job)
     throw Exception("Unknown memory requirement, unable to create job");
   }
 
-  // Unused parameters
-  job_parameters->resource_required.nb_proc_per_node = -1;
-  job_parameters->resource_required.cpu_clock = -1;
 
   // Parameters for COORM
   job_parameters->launcher_file = CORBA::string_dup(cpp_batch_params.launcher_file.c_str());
@@ -655,6 +657,7 @@ BL::SALOMEServices::get_new_job(int job_number)
     batch_param.maximum_duration = job_parameters->maximum_duration.in();
     batch_param.nb_proc = job_parameters->resource_required.nb_proc;
     batch_param.nb_node = job_parameters->resource_required.nb_node;
+    batch_param.nb_proc_per_node = job_parameters->resource_required.nb_proc_per_node;
     batch_param.exclusive = job_parameters->exclusive;
 
     if (job_parameters->mem_per_cpu != 0)
index 039303a22c2105cf1d561a30d98293c9db00a8b3..b56a602bcf32b295d5b0816ed1da859c46c0bc00 100644 (file)
@@ -69,6 +69,7 @@ BL::CreateJobWizard::CreateJobWizard(BL::JobsManager_QT * jobs_manager, BL::SALO
   mem_req_type = BL::Job::MEM_PER_NODE;
   nb_proc = 1;
   nb_node = 0;
+  nb_proc_per_node = 0;
 
   // Parameters for COORM
   launcher_file = "";
@@ -196,6 +197,10 @@ BL::CreateJobWizard::clone(const std::string & name)
     node_value.setNum(batch_params.nb_node);
     setField("node_value", node_value);
 
+    QString proc_per_node_value;
+    proc_per_node_value.setNum(batch_params.nb_proc_per_node);
+    setField("proc_per_node_value", proc_per_node_value);
+
     setField("exclusive", batch_params.exclusive);
 
     if (batch_params.maximum_duration == "")
@@ -376,6 +381,7 @@ BL::CreateJobWizard::end(int result)
 
     nb_proc = field("proc_value").toInt();
     nb_node = field("node_value").toInt();
+    nb_proc_per_node = field("proc_per_node_value").toInt();
     exclusive = field("exclusive").toBool();
 
     // Files Panel
@@ -815,6 +821,7 @@ BatchParametersPage::BatchParametersPage(QWidget * parent, SALOMEServices * salo
   registerField("mem_value", ui->spin_memory);
   registerField("proc_value", ui->spin_proc);
   registerField("node_value", ui->spin_node);
+  registerField("proc_per_node_value", ui->spin_proc_per_node);
   registerField("exclusive", ui->check_exclusive);
   registerField("default_time", ui->rb_default_time);
   registerField("user_time", ui->rb_user_time);
index e88c82ba5cb92e0f9b0007eb1baf9619975dc853..67b026a998b98c94ad0b11e9d0be74b7fcff1b1d 100644 (file)
@@ -91,6 +91,7 @@ namespace BL {
       BL::Job::MemReqType mem_req_type;
       int nb_proc;
       int nb_node;
+      int nb_proc_per_node;
       bool exclusive;
 
       // Parameters for COORM
index c01040073c9a3c32cf19f302feaad19aabfd9cf3..baad6f248bddc4e4510935f2dd8af06e24a7fd7d 100644 (file)
@@ -333,6 +333,7 @@ BL::JobsManager_QT::create_job_with_wizard(BL::CreateJobWizard & wizard)
   param.mem_req_type = wizard.mem_req_type;
   param.nb_proc = wizard.nb_proc;
   param.nb_node = wizard.nb_node;
+  param.nb_proc_per_node = wizard.nb_proc_per_node;
   param.exclusive = wizard.exclusive;
 
   // Parameters for COORM
index c6f11c3f6242f51327239d690f720195832db8c3..aee352a51dd5f6f2f1155b0ac6bf768ba47153ae 100644 (file)
          </widget>
         </item>
        </layout>
+      </item>
+            <item>
+       <layout class="QHBoxLayout" name="hl_proc_per_node">
+        <item>
+         <widget class="QLabel" name="label_proc_per_node">
+          <property name="text">
+           <string>Number proc per node (0 for unspecified) :</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spin_proc_per_node">
+          <property name="minimum">
+           <number>0</number>
+          </property>
+          <property name="maximum">
+           <number>1000000000</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
       </item>
       <item>
        <widget class="QCheckBox" name="check_exclusive">