From: barate Date: Wed, 15 Jun 2011 14:10:40 +0000 (+0000) Subject: Fixed bug with Slurm considering long finished jobs as errors X-Git-Tag: V1_3_1rc1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=107cb7969a4d2afa738192573957c924202db8ed;p=tools%2Flibbatch.git Fixed bug with Slurm considering long finished jobs as errors --- 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;