Skip to content
Snippets Groups Projects
Commit 2b88db54 authored by Nathan Yee's avatar Nathan Yee Committed by Danny Auble
Browse files

minor changes to allow for use of newer functions

parent 91a672fa
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ proc inc21_30_15 { } { ...@@ -41,7 +41,7 @@ proc inc21_30_15 { } {
} }
-re "job ($number) queued and waiting for resources" { -re "job ($number) queued and waiting for resources" {
set job_id1 $expect_out(1,string) set job_id1 $expect_out(1,string)
send_user "\nFAILURE: Job $job_id1 show not be waiting for resources, but is not (Within: inc21.30.15)\n" send_user "\nFAILURE: Job $job_id1 show not be waiting for resources, but is (Within: inc21.30.15)\n"
set exit_code 1 set exit_code 1
} }
-re "error" { -re "error" {
...@@ -69,7 +69,7 @@ proc inc21_30_15 { } { ...@@ -69,7 +69,7 @@ proc inc21_30_15 { } {
send_user "\nJob $job_id2 is waiting for resource. This is expected do not worry (Within: inc21.30.15)\n" send_user "\nJob $job_id2 is waiting for resource. This is expected do not worry (Within: inc21.30.15)\n"
} }
-re "Granted job allocation ($number)" { -re "Granted job allocation ($number)" {
set job_id2$expect_out(1,string) set job_id2 $expect_out(1,string)
send_user "\nFAILURE: Job $job_id2 should be pending for resources, but is not (Within: 21.30.15)\n" send_user "\nFAILURE: Job $job_id2 should be pending for resources, but is not (Within: 21.30.15)\n"
set exit_code 1 set exit_code 1
} }
......
...@@ -39,7 +39,6 @@ proc inc21_30_9 { } { ...@@ -39,7 +39,6 @@ proc inc21_30_9 { } {
set job_id1 0 set job_id1 0
set job_id2 0 set job_id2 0
set task_cnt 2
set timeout [expr $grpcpumin_num * 120] set timeout [expr $grpcpumin_num * 120]
set timelimit [expr $grpcpumin_num / $nthreads] set timelimit [expr $grpcpumin_num / $nthreads]
# Since GrpCpuMins is a decayed variable lets reset it to make sure # Since GrpCpuMins is a decayed variable lets reset it to make sure
...@@ -73,7 +72,7 @@ proc inc21_30_9 { } { ...@@ -73,7 +72,7 @@ proc inc21_30_9 { } {
reset_qos_usage "" $qostest reset_qos_usage "" $qostest
spawn $salloc --account=$acct -w$test_node --qos=$qostest -n$task_cnt -t[expr $timelimit + 1] $srun $bin_sleep 1 spawn $salloc --account=$acct -w$test_node --qos=$qostest -n$nthreads -t[expr $timelimit + 1] $srun $bin_sleep 1
expect { expect {
-re "Pending job allocation ($number)" { -re "Pending job allocation ($number)" {
set job_id2 $expect_out(1,string) set job_id2 $expect_out(1,string)
......
...@@ -94,6 +94,9 @@ set maxjobsub MaxSubmitJobs ...@@ -94,6 +94,9 @@ set maxjobsub MaxSubmitJobs
set maxjobsub_num 2 set maxjobsub_num 2
set time_spacing 1 set time_spacing 1
# cr_core = 1 / cr_cpu = 0
set selectparam 0
# mod qos # mod qos
array set mod_qos_vals { array set mod_qos_vals {
GrpNodes -1 GrpNodes -1
...@@ -170,6 +173,11 @@ proc check_state { job } { ...@@ -170,6 +173,11 @@ proc check_state { job } {
} }
# Determine what the selecttype param is
if {![string compare [test_select_type_params] "CR_CORE"]} {
set selectparam 1
}
set got_node 0 set got_node 0
spawn $srun -N1 printenv SLURM_NODELIST spawn $srun -N1 printenv SLURM_NODELIST
expect { expect {
...@@ -603,6 +611,12 @@ set mod_qos_vals(MaxWall) "-1" ...@@ -603,6 +611,12 @@ set mod_qos_vals(MaxWall) "-1"
# #
# Test Max CPUs Per User # Test Max CPUs Per User
# #
# If CR_CORE set maxcpuspu a multiple number of threads
if {$selectparam} {
set maxcpuspu_num [expr $maxcpuspu_num * $nthreads]
}
set mod_qos_vals(MaxCpusPerUser) $maxcpuspu_num set mod_qos_vals(MaxCpusPerUser) $maxcpuspu_num
mod_qos $qostest [array get mod_qos_vals] mod_qos $qostest [array get mod_qos_vals]
sleep $time_spacing sleep $time_spacing
......
...@@ -150,7 +150,7 @@ proc cleanup { } { ...@@ -150,7 +150,7 @@ proc cleanup { } {
} }
#delete account #delete account
spawn $sacctmgr -i delete account $acct spawn $sacctmgr -i delete account $acct
expect { expect {
-re "Deleting accounts" { -re "Deleting accounts" {
exp_continue exp_continue
...@@ -179,7 +179,7 @@ proc cleanup { } { ...@@ -179,7 +179,7 @@ proc cleanup { } {
} }
} }
if {[string compare $def_part ""]} { if {[string length $def_part]} {
spawn $scontrol update partitionname=$def_part default=yes spawn $scontrol update partitionname=$def_part default=yes
expect { expect {
timeout { timeout {
...@@ -251,24 +251,10 @@ if {$tmpc == 0 || $tmpn == 0} { ...@@ -251,24 +251,10 @@ if {$tmpc == 0 || $tmpn == 0} {
} }
# Determine what the selecttype param is # Determine what the selecttype param is
spawn $bin_bash -c "$scontrol show config | grep SelectTypeParameters" if {![string compare [test_select_type_params] "CR_CORE"]} {
expect { set selectparam 1
-re "SelectTypeParameters *= ($alpha_numeric_under)" {
if {[string compare $expect_out(1,string) "CR_CORE"] == 0} {
set selectparam 1
}
exp_continue
}
timeout {
send_user "\nFAILURE: scontrol is not responding\n"
set exit_code 1
}
eof {
wait
}
} }
set got_node 0 set got_node 0
spawn $srun -N1 printenv SLURM_NODELIST spawn $srun -N1 printenv SLURM_NODELIST
expect { expect {
...@@ -324,21 +310,7 @@ if {$totcpus == 0} { ...@@ -324,21 +310,7 @@ if {$totcpus == 0} {
} }
# Get the number of nodes in the default partition # Get the number of nodes in the default partition
set num_nodes 0 set num_nodes [available_nodes [default_partition] "idle"]
spawn $scontrol show partition [default_partition]
expect {
-re "TotalNodes=($number)" {
set num_nodes [expr $expect_out(1,string) - 1]
exp_continue
}
timeout {
send_user "\nFAILURE: scontrol is not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$num_nodes == 0} { if {$num_nodes == 0} {
send_user "\nFAILURE: no cpus where found\n" send_user "\nFAILURE: no cpus where found\n"
......
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