diff --git a/testsuite/expect/test21.21 b/testsuite/expect/test21.21 index 0660aa6f8fd396cb3c4f69b1c2ba9aa87a28f578..174c42eff0e6da950b8d51e741fbeb42a5b57b34 100755 --- a/testsuite/expect/test21.21 +++ b/testsuite/expect/test21.21 @@ -48,6 +48,7 @@ set timeout 60 set test_node " " # cr_core = 1 / cr_cpu = 0 set selectparam 0 +set one_task_pc 0 # test maxjob maxnode maxsubmit maxwall array set acct_mod_desc {} @@ -88,11 +89,17 @@ if { [string compare [priority_type] multifactor] } { exit $exit_code } + # Determine what the selecttype param is if {[test_select_type_params "CR_CORE"]} { set selectparam 1 } +# Determine what the selecttype param is +if {[test_select_type_params "CR_ONE_TASK_PER_CORE"]} { + set one_task_pc 1 +} + set got_node 0 spawn $srun -N1 printenv SLURM_NODELIST expect { @@ -167,7 +174,7 @@ proc assoc_setup { limit_type limit_val } { proc _test_limits { } { global file_in srun sbatch squeue scancel bin_id number bin_sleep bin_rm ta maxjob_lim maxsub_lim - global acct_mod_desc acct_mod_acct_vals acct_mod_assoc_vals acct_mod_assoc_test_vals + global acct_mod_desc acct_mod_acct_vals acct_mod_assoc_vals acct_mod_assoc_test_vals one_task_pc nthreads set exit_code 0 @@ -178,6 +185,10 @@ proc _test_limits { } { [string compare $option "grpjobsub"] } { assoc_setup $option $acct_mod_assoc_vals($option) + if { ![string compare $option "maxcpumins"] && $one_task_pc } { + set acct_mod_assoc_vals(maxcpumins) "-n [expr [lindex $acct_mod_assoc_vals(maxcpumins) 1] / $nthreads]" + } + if { ![string compare $option "grpwall"] } { if { [inc21_21_grpwall $option \ $acct_mod_assoc_vals($option)] } { diff --git a/testsuite/expect/test21.30 b/testsuite/expect/test21.30 index 43165ec2d682a3d3a19b606bdb2ca3315f03b9bf..5f0d88c51138c4956cd4d50d360c74b9824bb0da 100755 --- a/testsuite/expect/test21.30 +++ b/testsuite/expect/test21.30 @@ -97,6 +97,7 @@ set time_spacing 1 # cr_core = 1 / cr_cpu = 0 set selectparam 0 +set one_task_pc 0 # mod qos array set mod_qos_vals { @@ -184,6 +185,11 @@ if {[test_select_type_params "CR_CORE"]} { set selectparam 1 } +# Determine what the selecttype param is +if {[test_select_type_params "CR_ONE_TASK_PER_CORE"]} { + set one_task_pc 1 +} + set got_node 0 spawn $srun -N1 printenv SLURM_NODELIST expect { @@ -238,6 +244,8 @@ if {$totcpus == 0} { set maxcpumin_num $totcpus } + + # Get the number of nodes in the default partition set num_nodes 0 spawn $scontrol show partition [default_partition] @@ -454,6 +462,11 @@ set mod_qos_vals(GrpNodes) "-1" set mod_qos_vals(GrpCpus) $grcpu_num mod_qos $qostest [array get mod_qos_vals] sleep $time_spacing + +if { $one_task_pc } { + set grcpu_num [expr $grcpu_num / $nthreads] +} + inc21_30_2 if {$exit_code != 0} { endit @@ -490,6 +503,12 @@ set mod_qos_vals(GrpSubmit) "-1" set mod_qos_vals(MaxCpus) $maxcpu_num mod_qos $qostest [array get mod_qos_vals] sleep $time_spacing + +if { $one_task_pc } { + set maxcpu_num [expr $maxcpu_num / $nthreads] +} + + inc21_30_5 if {$exit_code != 0} { endit @@ -538,6 +557,9 @@ set mod_qos_vals(MaxSubmitJobs) "-1" set mod_qos_vals(GrpCpuMin) $grpcpumin_num mod_qos $qostest [array get mod_qos_vals] sleep $time_spacing +if { $one_task_pc } { + set grpcpumin_num [expr $grpcpumin_num / $nthreads] +} inc21_30_9 if {$exit_code != 0 } { endit @@ -552,6 +574,9 @@ if { $prio_multifactor != 0 } { set mod_qos_vals(GrpCpuRunMin) $grpcpurunmin_num mod_qos $qostest [array get mod_qos_vals] sleep $time_spacing + if { $one_task_pc } { + set grpcpurunmin_num [expr $grpcpurunmin_num / $nthreads] + } inc21_30_10 if {$exit_code != 0 } { endit @@ -592,6 +617,9 @@ if { $prio_multifactor != 0 } { set mod_qos_vals(MaxCpuMin) $maxcpumin_num mod_qos $qostest [array get mod_qos_vals] sleep $time_spacing +if { $one_task_pc } { + set maxcpumin_num [expr $maxcpumin_num / $nthreads] +} inc21_30_13 if {$exit_code != 0 } { endit @@ -622,6 +650,9 @@ if {$selectparam} { set mod_qos_vals(MaxCpusPerUser) $maxcpuspu_num mod_qos $qostest [array get mod_qos_vals] sleep $time_spacing +if { $one_task_pc } { + set maxcpuspu_num [expr $maxcpuspu_num / $nthreads] +} inc21_30_15 if {$exit_code != 0 } { endit