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

fix for checking K instead of k for thousand nodes

parent f2deeacd
No related branches found
No related tags found
No related merge requests found
...@@ -101,7 +101,7 @@ proc sinfo_test_1 { node proc_cnt total_procs idle_cpus } { ...@@ -101,7 +101,7 @@ proc sinfo_test_1 { node proc_cnt total_procs idle_cpus } {
} }
} }
expect { expect {
-re "($number)(k?).($number)(k?).($number)(k?).($number)(k?) ($number)(k?).($number)(k?) $node" { -re "($number)(K?).($number)(K?).($number)(K?).($number)(K?) ($number)(K?).($number)(K?) $node" {
set found 1 set found 1
set num_alloc $expect_out(1,string) set num_alloc $expect_out(1,string)
if {[string compare $expect_out(2,string) ""]} { if {[string compare $expect_out(2,string) ""]} {
...@@ -178,14 +178,14 @@ proc sinfo_test_2 { node proc_cnt total_procs } { ...@@ -178,14 +178,14 @@ proc sinfo_test_2 { node proc_cnt total_procs } {
} }
} }
expect { expect {
-re "alloc ($number)(k?) $node" { -re "alloc ($number)(K?) $node" {
set num_alloc $expect_out(1,string) set num_alloc $expect_out(1,string)
if {[string compare $expect_out(2,string) ""]} { if {[string compare $expect_out(2,string) ""]} {
set num_alloc [expr $inode_procs * 1024] set num_alloc [expr $inode_procs * 1024]
} }
exp_continue exp_continue
} }
-re "idle ($number)(k?) $node" { -re "idle ($number)(K?) $node" {
set num_idle $expect_out(1,string) set num_idle $expect_out(1,string)
if {[string compare $expect_out(2,string) ""]} { if {[string compare $expect_out(2,string) ""]} {
set num_idle [expr $num_idle * 1024] set num_idle [expr $num_idle * 1024]
...@@ -361,7 +361,7 @@ set inode_found 0 ...@@ -361,7 +361,7 @@ set inode_found 0
for {set host_inx 0} {($host_inx < $host_cnt) && ($inode_found == 0)} {incr host_inx} { for {set host_inx 0} {($host_inx < $host_cnt) && ($inode_found == 0)} {incr host_inx} {
spawn $scontrol show node spawn $scontrol show node
expect { expect {
-re "NodeName=($alpha_numeric_under) State=IDLE Procs=($number)(k?).* Sockets=($number) CoresPerSocket=($number) ThreadsPerCore=($number)" { -re "NodeName=($alpha_numeric_under) State=IDLE Procs=($number)(K?).* Sockets=($number) CoresPerSocket=($number) ThreadsPerCore=($number)" {
set inode_name $expect_out(1,string) set inode_name $expect_out(1,string)
set inode_procs $expect_out(2,string) set inode_procs $expect_out(2,string)
if {[string compare $expect_out(3,string) ""]} { if {[string compare $expect_out(3,string) ""]} {
......
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