Skip to content
Snippets Groups Projects
Commit ffb1fc8f authored by Danny Auble's avatar Danny Auble
Browse files

TESTSUITE - Make it so the avaliable_nodes function handles 'K' and 'M'

parent 99c5f607
No related branches found
No related tags found
No related merge requests found
......@@ -1674,11 +1674,18 @@ proc available_nodes { partition } {
global sinfo
set available -1
send_user "$sinfo --noheader --partition $partition --state idle,alloc,comp --format %D\n"
#send_user "$sinfo --noheader --partition $partition --state idle,alloc,comp --format %D\n"
set fd [open "|$sinfo --noheader --partition $partition --state idle,alloc,comp --format %D"]
gets $fd line
catch {close $fd}
regexp {\d+} $line available
if {[string match *K $line]} {
set available [expr $available * 1024]
} elseif {[string match *M $line]} {
set available [expr $available * 1048576]
}
return $available
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment