From: Anthony Geay Date: Wed, 20 Jan 2021 06:21:27 +0000 (+0100) Subject: WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b73602ce104a3cf131932939682e680ae74f4ae9;p=modules%2Fjobmanager.git WIP --- diff --git a/src/engine/BL_Job.hxx b/src/engine/BL_Job.hxx index b57dd19..2b91b1c 100644 --- a/src/engine/BL_Job.hxx +++ b/src/engine/BL_Job.hxx @@ -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 diff --git a/src/engine/BL_SALOMEServices.cxx b/src/engine/BL_SALOMEServices.cxx index 331040c..dd33eb7 100644 --- a/src/engine/BL_SALOMEServices.cxx +++ b/src/engine/BL_SALOMEServices.cxx @@ -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) diff --git a/src/genericgui/BL_CreateJobWizard.cxx b/src/genericgui/BL_CreateJobWizard.cxx index 039303a..b56a602 100644 --- a/src/genericgui/BL_CreateJobWizard.cxx +++ b/src/genericgui/BL_CreateJobWizard.cxx @@ -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); diff --git a/src/genericgui/BL_CreateJobWizard.hxx b/src/genericgui/BL_CreateJobWizard.hxx index e88c82b..67b026a 100644 --- a/src/genericgui/BL_CreateJobWizard.hxx +++ b/src/genericgui/BL_CreateJobWizard.hxx @@ -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 diff --git a/src/genericgui/BL_JobsManager_QT.cxx b/src/genericgui/BL_JobsManager_QT.cxx index c010400..baad6f2 100644 --- a/src/genericgui/BL_JobsManager_QT.cxx +++ b/src/genericgui/BL_JobsManager_QT.cxx @@ -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 diff --git a/src/genericgui/ResourceRequirementsWizardPage.ui b/src/genericgui/ResourceRequirementsWizardPage.ui index c6f11c3..aee352a 100644 --- a/src/genericgui/ResourceRequirementsWizardPage.ui +++ b/src/genericgui/ResourceRequirementsWizardPage.ui @@ -64,6 +64,27 @@ + + + + + + + Number proc per node (0 for unspecified) : + + + + + + + 0 + + + 1000000000 + + + +