]> SALOME platform Git repositories - tools/libbatch.git/commitdiff
Salome HOME
Fixed bug with Slurm considering long finished jobs as errors
authorbarate <barate>
Wed, 15 Jun 2011 14:10:40 +0000 (14:10 +0000)
committerbarate <barate>
Wed, 15 Jun 2011 14:10:40 +0000 (14:10 +0000)
src/Slurm/Batch_BatchManager_eSlurm.cxx

index e20775bfda15b181d47993e74e022a466131af08..c6bcbc8f486203a543baddcb0db70c6de347f50f 100644 (file)
@@ -242,9 +242,10 @@ namespace Batch {
     command += " > ";
     command += logFile;
     cerr << command.c_str() << endl;
-    int status = system(command.c_str());
-    if (status != 0)
-      throw EmulationException("Can't query job " + jobid.getReference());
+    system(command.c_str());
+    // We don't test the return code here because with jobs finished since a long time Slurm
+    // returns an error and a message like "slurm_load_jobs error: Invalid job id specified".
+    // So we consider that the job is finished when we get an error.
 
     JobInfo_eSlurm jobinfo = JobInfo_eSlurm(jobid.getReference(), logFile);
     return jobinfo;