When I print the environment from my job epilog script, I don’t see either 
SLURM_JOB_DERIVED_EC or SLURM_JOB_EXIT_CODE.  There are about a dozen 
environment variables set, but nothing that suggests the exit code.  Any 
suggestions for how I can grab this value?  I am running slurm-2.3.5

My test (foo.py):

#!/usr/bin/env python
import sys
print ‘running a test’
sys.exit(1)

My epilog script (bar.py):

#!/usr/bin/env python
from os import environ as env
for k,v in env.iteritems():
    print k, ‘:’, v

My command line:
srun –n 1 –epilog=bar.py foo.py | grep SLURM

From: Lyn Gerner [mailto:[email protected]]
Sent: Wednesday, June 27, 2012 12:03 PM
To: slurm-dev
Subject: [slurm-dev] Re: exit code in epilog script?

Hi Sarah,

You can get this thru $SLURM_JOB_DERIVED_EC (highest exit code from the job; 
sorry, can't locate it in the docs right now).

Regards,
Lyn

On Wed, Jun 27, 2012 at 10:46 AM, Sarah Mulholland 
<[email protected]<mailto:[email protected]>> wrote:
I’m a newbie setting up slurm.  I found the example epilog script, and I 
grabbed the user id and job number in my epilog script.  I hunted through the 
documentation and source code, but I don’t see if it is possible to get the 
exit code of the job in the epilog script? Is it?

Thanks in advance,

Sarah
Error! Filename not specified.


<<inline: image001.jpg>>

Reply via email to