From 107cb7969a4d2afa738192573957c924202db8ed Mon Sep 17 00:00:00 2001 From: barate Date: Wed, 15 Jun 2011 14:10:40 +0000 Subject: [PATCH] Fixed bug with Slurm considering long finished jobs as errors --- src/Slurm/Batch_BatchManager_eSlurm.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Slurm/Batch_BatchManager_eSlurm.cxx b/src/Slurm/Batch_BatchManager_eSlurm.cxx index e20775b..c6bcbc8 100644 --- a/src/Slurm/Batch_BatchManager_eSlurm.cxx +++ b/src/Slurm/Batch_BatchManager_eSlurm.cxx @@ -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; -- 2.30.2