From: Renaud Barate Date: Tue, 7 Oct 2014 15:23:24 +0000 (+0200) Subject: Add possibility to specify extra parameters (Slurm and CCC) X-Git-Tag: V2_2_0~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=22b8c6a9a8030bc96d3b61d222b231ba77be8bc5;p=tools%2Flibbatch.git Add possibility to specify extra parameters (Slurm and CCC) --- diff --git a/src/CCC/BatchManager_CCC.cxx b/src/CCC/BatchManager_CCC.cxx index eaea332..c4f5bc5 100644 --- a/src/CCC/BatchManager_CCC.cxx +++ b/src/CCC/BatchManager_CCC.cxx @@ -229,6 +229,9 @@ namespace Batch { tempOutputFile << "#MSUB -o " << baseDir << "/logs/output.log." << rootNameToExecute << endl ; tempOutputFile << "#MSUB -e " << baseDir << "/logs/error.log." << rootNameToExecute << endl ; + if (params.find(EXTRAPARAMS) != params.end()) + tempOutputFile << params[EXTRAPARAMS] << endl; + tempOutputFile << "cd " << workDir << endl ; // generate nodes file diff --git a/src/Core/Constants.cxx b/src/Core/Constants.cxx index 607b536..1b27c7d 100644 --- a/src/Core/Constants.cxx +++ b/src/Core/Constants.cxx @@ -51,6 +51,7 @@ namespace Batch { def_Constant(EXCLUSIVE); def_Constant(MEMPERCPU); def_Constant(WCKEY); + def_Constant(EXTRAPARAMS); // Parameters for COORM def_Constant(LAUNCHER_FILE); diff --git a/src/Core/Constants.hxx b/src/Core/Constants.hxx index cf2b0ca..ba62694 100644 --- a/src/Core/Constants.hxx +++ b/src/Core/Constants.hxx @@ -62,6 +62,7 @@ namespace Batch { decl_extern_Constant(EXCLUSIVE); decl_extern_Constant(MEMPERCPU); decl_extern_Constant(WCKEY); + decl_extern_Constant(EXTRAPARAMS); // Parameters for COORM decl_extern_Constant(LAUNCHER_FILE); diff --git a/src/Core/ParameterTypeMap.cxx b/src/Core/ParameterTypeMap.cxx index 60c1434..0b5c0df 100644 --- a/src/Core/ParameterTypeMap.cxx +++ b/src/Core/ParameterTypeMap.cxx @@ -64,6 +64,7 @@ namespace Batch { addParameter("EXCLUSIVE", BOOL, 1); addParameter("MEMPERCPU", LONG, 1); addParameter("WCKEY", STRING, 1); + addParameter("EXTRAPARAMS", 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 0fe20d0..17a7773 100644 --- a/src/Slurm/BatchManager_Slurm.cxx +++ b/src/Slurm/BatchManager_Slurm.cxx @@ -154,6 +154,8 @@ namespace Batch { tempOutputFile << "#SBATCH --partition=" << params[QUEUE] << endl; if (params.find(WCKEY) != params.end()) tempOutputFile << "#SBATCH --wckey=" << params[WCKEY] << endl; + if (params.find(EXTRAPARAMS) != params.end()) + tempOutputFile << params[EXTRAPARAMS] << endl; // Define environment for the job Environnement env = job.getEnvironnement();