IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38198


Ignore:
Timestamp:
Apr 27, 2015, 2:06:39 PM (11 years ago)
Author:
watersc1
Message:

Correctly parse job_id values from SLURM (which is also clean for MOAB). If no job_id exists, exit to a fail state that prevents infinite requeues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/sc_remote_exec.pl

    r38186 r38198  
    183183}
    184184if ($#{ $ssh_exec_stdout } != -1) { # Parse the output
    185     $job_id = ${ $ssh_exec_stdout }[0];
    186     chomp($job_id);
     185    my $line = ${ $ssh_exec_stdout }[0];
     186    chomp($line);
     187    my @line_split = split /\s+/, $line;
     188    $job_id = $line_split[-1];
    187189    $job_id =~ s/\s+//g;
    188190}
    189191
    190192unless(defined($job_id)) { # If we don't have a job_id from this command, it didn't run correctly.
    191     &my_die("No job_id returned.  Sorry.", $remote_id, $PS_EXIT_PROG_ERROR);
     193    &my_die("No job_id returned.  Sorry.", $remote_id, $PS_EXIT_PROG_ERROR, "exec_fail");
    192194}
    193195
Note: See TracChangeset for help on using the changeset viewer.