From: Ovidiu Mircescu Date: Tue, 23 Jan 2018 14:01:08 +0000 (+0100) Subject: Add parameters PARTITION and NBNODE for slurm. X-Git-Tag: V2_4_0~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fomu%2Fevol2.4;p=tools%2Flibbatch.git Add parameters PARTITION and NBNODE for slurm. --- diff --git a/src/Core/Constants.cxx b/src/Core/Constants.cxx index 480919f..124bbb7 100644 --- a/src/Core/Constants.cxx +++ b/src/Core/Constants.cxx @@ -53,6 +53,8 @@ namespace Batch { def_Constant(WCKEY); def_Constant(EXTRAPARAMS); def_Constant(PREPROCESS); + def_Constant(PARTITION); + def_Constant(NBNODE); // Parameters for COORM def_Constant(LAUNCHER_FILE); diff --git a/src/Core/Constants.hxx b/src/Core/Constants.hxx index ac07e1d..2e9f71b 100644 --- a/src/Core/Constants.hxx +++ b/src/Core/Constants.hxx @@ -64,6 +64,8 @@ namespace Batch { decl_extern_Constant(WCKEY); decl_extern_Constant(EXTRAPARAMS); decl_extern_Constant(PREPROCESS); + decl_extern_Constant(PARTITION); + decl_extern_Constant(NBNODE); // Parameters for COORM decl_extern_Constant(LAUNCHER_FILE); diff --git a/src/Core/ParameterTypeMap.cxx b/src/Core/ParameterTypeMap.cxx index 8b23095..426d8ef 100644 --- a/src/Core/ParameterTypeMap.cxx +++ b/src/Core/ParameterTypeMap.cxx @@ -66,6 +66,8 @@ namespace Batch { addParameter("WCKEY", STRING, 1); addParameter("EXTRAPARAMS", STRING, 1); addParameter("PREPROCESS", STRING, 1); + addParameter("PARTITION", STRING, 1); + addParameter("NBNODE", LONG, 1); // Parameters for COORM addParameter("LAUNCHER_FILE", STRING, 1); diff --git a/src/Slurm/BatchManager_Slurm.cxx b/src/Slurm/BatchManager_Slurm.cxx index 4bb013d..25bbc34 100644 --- a/src/Slurm/BatchManager_Slurm.cxx +++ b/src/Slurm/BatchManager_Slurm.cxx @@ -149,8 +149,12 @@ namespace Batch { tempOutputFile << "#SBATCH --mem-per-cpu=" << params[MEMPERCPU] << endl; if (params.find(QUEUE) != params.end()) tempOutputFile << "#SBATCH --qos=" << params[QUEUE] << endl; + if (params.find(PARTITION) != params.end()) + tempOutputFile << "#SBATCH --partition=" << params[PARTITION] << endl; if (params.find(WCKEY) != params.end()) tempOutputFile << "#SBATCH --wckey=" << params[WCKEY] << endl; + if (params.find(NBNODE) != params.end()) + tempOutputFile << "#SBATCH --nodes=" << params[NBNODE] << endl; if (params.find(EXTRAPARAMS) != params.end()) tempOutputFile << params[EXTRAPARAMS] << endl;