Skip to content
Snippets Groups Projects
Commit 29d307ff authored by Don Lipari's avatar Don Lipari
Browse files

More improvements to test1.84

parent 99076ee1
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,7 @@ if {[string compare $host ""] == 0} { ...@@ -99,6 +99,7 @@ if {[string compare $host ""] == 0} {
} }
# Convert CPU count to core count if necessary # Convert CPU count to core count if necessary
if {$cpu_cnt != $task_cnt} { if {$cpu_cnt != $task_cnt} {
set core_cnt $cpu_cnt
set threads_per_core 1 set threads_per_core 1
spawn $scontrol show node $host spawn $scontrol show node $host
expect { expect {
...@@ -115,10 +116,10 @@ if {$cpu_cnt != $task_cnt} { ...@@ -115,10 +116,10 @@ if {$cpu_cnt != $task_cnt} {
} }
} }
if {$threads_per_core != 0} { if {$threads_per_core != 0} {
set cpu_cnt [expr $cpu_cnt / $threads_per_core] set cpu_cnt [expr $cpu_cnt * $threads_per_core]
} }
if {$cpu_cnt == $task_cnt} { if {$cpu_cnt == $task_cnt} {
send_user "NOTE: Allocated cores and $threads_per_core CPUs per core\n" send_user "NOTE: Allocated $core_cnt cores and $threads_per_core CPUs per core\n"
} }
} }
if {$cpu_cnt != $task_cnt} { if {$cpu_cnt != $task_cnt} {
...@@ -133,10 +134,10 @@ if {$cpu_cnt < 2} { ...@@ -133,10 +134,10 @@ if {$cpu_cnt < 2} {
} }
# #
# Submit a 1 node job to determine the node's CPU count # Now verify the --cpus-per-task option
# #
set task_cnt 0 set task_cnt 0
set srun_pid [spawn $srun -N1 -t1 --nodelist=$host --cpus-per-task=2 --exclusive -l $bin_printenv SLURMD_NODENAME] set srun_pid [spawn $srun -N1 --cpus-per-task=2 --exclusive -l -t1 --nodelist=$host $bin_printenv SLURMD_NODENAME]
expect { expect {
-re "Invalid node name specified" { -re "Invalid node name specified" {
send_user "\nWARNING: Appears you are using " send_user "\nWARNING: Appears you are using "
...@@ -159,7 +160,7 @@ expect { ...@@ -159,7 +160,7 @@ expect {
} }
# #
# Check CPU count # Verify that half the number of tasks were spawned
# #
if {$task_cnt != [expr $cpu_cnt / 2]} { if {$task_cnt != [expr $cpu_cnt / 2]} {
send_user "\nFAILURE: Improper task count for given cpus-per-task\n" send_user "\nFAILURE: Improper task count for given cpus-per-task\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