Salome HOME
Allow 'module' macro of EDF clusters
authorNicolas Geimer <nicolas.geimer@edf.fr>
Tue, 3 Jan 2017 09:13:45 +0000 (10:13 +0100)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Tue, 3 Jan 2017 15:11:17 +0000 (16:11 +0100)
The 'module' macro is used to load libraries and compiler environments
for EDF clusters. This macro is defined in profile so we need a
complete login shell (bash -l) instead of a minimal shell (sh -f).

Signed-off-by: Ovidiu Mircescu <ovidiu.mircescu@edf.fr>
src/Slurm/BatchManager_Slurm.cxx

index 8199cb572387b74abec794b4c4ce9c9584266d48..b7683863d8e9b2142ad26f79e6e6d1d2edf90ed8 100644 (file)
@@ -124,7 +124,7 @@ namespace Batch {
     ofstream tempOutputFile;
     string tmpFileName = Utils::createAndOpenTemporaryFile("slurm-script", tempOutputFile);
 
-    tempOutputFile << "#!/bin/sh -f" << endl;
+    tempOutputFile << "#!/bin/bash -l" << endl;
     tempOutputFile << "#SBATCH --output=" << workDir << "/logs/output.log." << rootNameToExecute << endl;
     tempOutputFile << "#SBATCH --error=" << workDir << "/logs/error.log." << rootNameToExecute << endl;