From 839127cca1017c43ba6272dfb8800e13626f75cb Mon Sep 17 00:00:00 2001 From: barate Date: Tue, 17 May 2011 07:58:15 +0000 Subject: [PATCH] Fixed bug for Slurm (job failed when job name contained spaces) --- src/Slurm/Batch_BatchManager_eSlurm.cxx | 2 +- src/Slurm/Test/Test_eSlurm.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Slurm/Batch_BatchManager_eSlurm.cxx b/src/Slurm/Batch_BatchManager_eSlurm.cxx index f05628e..e20775b 100644 --- a/src/Slurm/Batch_BatchManager_eSlurm.cxx +++ b/src/Slurm/Batch_BatchManager_eSlurm.cxx @@ -144,7 +144,7 @@ namespace Batch { tempOutputFile << "#SBATCH --error=" << workDir << "/logs/error.log." << rootNameToExecute << endl; if (params.find(NAME) != params.end()) - tempOutputFile << "#SBATCH --job-name=" << params[NAME] << endl; + tempOutputFile << "#SBATCH --job-name=\"" << params[NAME] << "\"" << endl; // Optional parameters int nbproc = 1; diff --git a/src/Slurm/Test/Test_eSlurm.cxx b/src/Slurm/Test/Test_eSlurm.cxx index 82abe61..1726db7 100644 --- a/src/Slurm/Test/Test_eSlurm.cxx +++ b/src/Slurm/Test/Test_eSlurm.cxx @@ -90,7 +90,7 @@ int main(int argc, char** argv) // ... and its parameters ... Parametre p; p[EXECUTABLE] = "./test-script.sh"; - p[NAME] = string("Test_eSlurm_") + argv[1]; + p[NAME] = string("Test eSLURM ") + argv[1]; p[WORKDIR] = homedir + "/tmp/Batch"; p[INFILE] = Couple("seta.sh", "tmp/Batch/seta.sh"); p[INFILE] += Couple("setb.sh", "tmp/Batch/setb.sh"); -- 2.39.2