Commit 43537dda authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix pattern match for assign output to properly catch error codes, so

that batch system will not be confused.
parent 81af5b01
......@@ -673,13 +673,13 @@ while (1) {
# spit out up to nodes
print "ASSIGN FAILED:\n";
while (<ASSIGNFP>) {
if (/link_users: (\d+)$/) {
if (/link_users:\s*(\d+)$/) {
$linkusers = $1;
} elsif (/bandwidth: (\d+)$/) {
} elsif (/bandwidth:\s*(\d+)$/) {
$bandwidth = $1;
} elsif (/unassigned: (\d+)$/) {
} elsif (/unassigned:\s*(\d+)$/) {
$unassigned = $1;
} elsif (/desires: (\d+)$/) {
} elsif (/desires:\s*(\d+)$/) {
$desires = $1;
}
if (/^Nodes:/) {last;}
......@@ -726,7 +726,8 @@ while (1) {
if ($unassigned > 0) {
$exitcode += 32;
}
print "$0: *** Reached run limit. Giving up.\n";
print "*** $0:\n".
" Reached run limit. Giving up. Exitcode: $exitcode.\n";
exit($exitcode);
}
$currentrun++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment