I should say that I am generating my epilog script on the fly because it communicates back to another process using a process-specific xmlrpc port to report exit status. Thus a slurmctldepilog that is generically specified in the slurm.conf won’t serve my purpose. Is there any way for my job-specific epilog to get the exit code?
From: Sarah Mulholland [mailto:[email protected]] Sent: Monday, August 13, 2012 10:30 AM To: slurm-dev Subject: [slurm-dev] Re: exit code in epilog script? 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>>
<<inline: image002.jpg>>
