-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
Description
SCR's srun based scr_run script (in scripts/TLCC/scr_run.in) does not set SCR_END_TIME thus the only way scr_env_seconds_remaining can obtain them is if libyogrt (https://github.com/LLNL/libyogrt) is present such that
#ifdef HAVE_LIBYOGRT
secs = yogrt_remaining();
if (secs < 0) {
secs = 0;
}
#else
can execute.
Since yogrt is listed as optional in README.md it may be nice if scr_run provided a fallback in case it is not installed.
Something like:
export SCR_END_TIME=$(date -d $(scontrol --oneliner show job $SLURM_JOBID | perl -n -e 'm/EndTime=(\S*)/ and print $1') +%s)