From: Renaud Barate Date: Mon, 6 Oct 2014 16:01:27 +0000 (+0200) Subject: Add wckey parameter for Slurm X-Git-Tag: V2_2_0~2^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=30668f281258d672a46de02fb6375492567d0cb7;p=tools%2Flibbatch.git Add wckey parameter for Slurm --- diff --git a/src/Core/Constants.cxx b/src/Core/Constants.cxx index d2d0e74..607b536 100644 --- a/src/Core/Constants.cxx +++ b/src/Core/Constants.cxx @@ -50,6 +50,7 @@ namespace Batch { def_Constant(WORKDIR); def_Constant(EXCLUSIVE); def_Constant(MEMPERCPU); + def_Constant(WCKEY); // Parameters for COORM def_Constant(LAUNCHER_FILE); diff --git a/src/Core/Constants.hxx b/src/Core/Constants.hxx index 8a08098..cf2b0ca 100644 --- a/src/Core/Constants.hxx +++ b/src/Core/Constants.hxx @@ -61,6 +61,7 @@ namespace Batch { decl_extern_Constant(WORKDIR); decl_extern_Constant(EXCLUSIVE); decl_extern_Constant(MEMPERCPU); + decl_extern_Constant(WCKEY); // Parameters for COORM decl_extern_Constant(LAUNCHER_FILE); diff --git a/src/Core/ParameterTypeMap.cxx b/src/Core/ParameterTypeMap.cxx index c20ad71..60c1434 100644 --- a/src/Core/ParameterTypeMap.cxx +++ b/src/Core/ParameterTypeMap.cxx @@ -63,6 +63,7 @@ namespace Batch { addParameter("WORKDIR", STRING, 1); addParameter("EXCLUSIVE", BOOL, 1); addParameter("MEMPERCPU", LONG, 1); + addParameter("WCKEY", STRING, 1); // Parameters for COORM addParameter("LAUNCHER_FILE", STRING, 1); diff --git a/src/Slurm/BatchManager_Slurm.cxx b/src/Slurm/BatchManager_Slurm.cxx index 9d62def..0fe20d0 100644 --- a/src/Slurm/BatchManager_Slurm.cxx +++ b/src/Slurm/BatchManager_Slurm.cxx @@ -152,6 +152,8 @@ namespace Batch { tempOutputFile << "#SBATCH --mem-per-cpu=" << params[MEMPERCPU] << endl; if (params.find(QUEUE) != params.end()) tempOutputFile << "#SBATCH --partition=" << params[QUEUE] << endl; + if (params.find(WCKEY) != params.end()) + tempOutputFile << "#SBATCH --wckey=" << params[WCKEY] << endl; // Define environment for the job Environnement env = job.getEnvironnement();