Skip to content

set SCR_END_TIME in srun scr_run script #165

@rhaas80

Description

@rhaas80

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions