Skip to content
Snippets Groups Projects
Commit f8bbaa0f authored by Moe Jette's avatar Moe Jette
Browse files

Expand cpu affinity test.

parent 27f28fc8
No related branches found
No related tags found
No related merge requests found
...@@ -125,6 +125,72 @@ if {$task_mask != $mask} { ...@@ -125,6 +125,72 @@ if {$task_mask != $mask} {
set exit_code 1 set exit_code 1
} }
#
# Run a job step with verbosity and all tasks on CPU 0
#
set task_mask 0
set verbose_cnt 0
send "$srun -c1 --cpu_bind=verbose,map_cpu:0 $file_prog\n"
expect {
-re "TASK_ID:($number),MASK:($number)" {
incr task_mask $expect_out(2,string)
exp_continue
}
-re "setting affinity of task" {
incr verbose_cnt
exp_continue
}
-re "error" {
send_user "\nFAILURE: some error occurred\n"
set exit_code 1
exp_continue
}
timeout {
send_user "\nFAILURE: srun (from --allocate) not responding\n"
set exit_code 1
exp_continue
}
-re $prompt
}
if {$task_mask != $task_cnt} {
send_user "\nFAILURE: affinity mask inconsistent ($task_mask,$task_cnt)\n"
set exit_code 1
}
if {$verbose_cnt != $task_cnt} {
send_user "\nFAILURE: verbose messages count inconsisent ($verbose_cnt,$task_cnt)\n"
set exit_code 1
}
#
# Run a job step all tasks on CPU 0 by specifying mask
#
set task_mask 0
send "$srun -c1 --cpu_bind=mask_cpu:1 $file_prog\n"
expect {
-re "TASK_ID:($number),MASK:($number)" {
incr task_mask $expect_out(2,string)
exp_continue
}
-re "error" {
send_user "\nFAILURE: some error occurred\n"
set exit_code 1
exp_continue
}
timeout {
send_user "\nFAILURE: srun (from --allocate) not responding\n"
set exit_code 1
exp_continue
}
-re $prompt
}
if {$task_mask != $task_cnt} {
send_user "\nFAILURE: affinity mask inconsistent ($task_mask,$task_cnt)\n"
set exit_code 1
}
#
# Terminate the job, free the allocation
#
send "exit\n" send "exit\n"
expect { expect {
-re "error" { -re "error" {
......
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