Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
95ee2077
Commit
95ee2077
authored
12 years ago
by
Nathan Yee
Committed by
Morris Jette
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update core reservation tests for nodes with multiple threads per core
parent
c148e28a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
testsuite/expect/inc3.11.7
+25
-9
25 additions, 9 deletions
testsuite/expect/inc3.11.7
testsuite/expect/inc3.11.8
+20
-6
20 additions, 6 deletions
testsuite/expect/inc3.11.8
testsuite/expect/test3.11
+28
-10
28 additions, 10 deletions
testsuite/expect/test3.11
with
73 additions
and
25 deletions
testsuite/expect/inc3.11.7
+
25
−
9
View file @
95ee2077
...
...
@@ -35,17 +35,33 @@ proc inc3_11_7 {} {
global bin_rm file_in bin_sleep sbatch number scontrol
global alpha_numeric_under scancel
global cluster_cpus cores_per_node def_partition
set num_nodes [available_nodes $def_partition]
set core_res_num [ expr ($cores_per_node / 2) ]
global res_name res_thread_cnt
send_user "\n+++++ STARTING TEST 7 +++++\n"
# Make the reservation
# Make a reservation, just to get node size infomation
set ret_code [create_res "StartTime=now Duration=1 NodeCnt=1 User=$user_name" 0]
if {$ret_code != 0} {
send_user "\n\033\[31mFAILURE: Unable to create a valid reservation\033\[m\n"
exit $ret_code
}
# Delete the reservation
set ret_code [delete_res $res_name]
if {$ret_code != 0} {
exit $ret_code
}
# Now make a reservation using half the cores on that node
# There is no way to specify a the Nodes in a reservation with CoreCnt,
# so hope that we get a node with the same size
set core_res_num [ expr ($cores_per_node / 2) ]
set ret_code [create_res "StartTime=now Duration=60 NodeCnt=1 CoreCnt=$core_res_num User=$user_name" 0]
if {$ret_code != 0} {
send_user "\n\033\[31mFAILURE: Unable to create a valid reservation\033\[m\n"
exit $ret_code
}
set core_res_num [ expr ($cores_per_node / 2) ]
set thread_res_num [ expr $core_res_num * $res_thread_cnt ]
# Make the job script
exec $bin_rm -f $file_in
...
...
@@ -102,7 +118,7 @@ proc inc3_11_7 {} {
sleep 1
# (Second test) Submit the batch job: a job using all cores allocated by the reservation
set sbatch_pid [spawn $sbatch -n$
core
_res_num --reservation=$res_name --output=/dev/null $file_in]
set sbatch_pid [spawn $sbatch -n$
thread
_res_num --reservation=$res_name --output=/dev/null $file_in]
expect {
-re "Submitted batch job ($number)" {
set job_id $expect_out(1,string)
...
...
@@ -152,7 +168,7 @@ proc inc3_11_7 {} {
sleep 1
# (Third test) Submit the batch job: a job using all cores not allocated by the reservation
set sbatch_pid [spawn $sbatch -n$
core
_res_num --nodelist=$res_nodes --output=/dev/null $file_in]
set sbatch_pid [spawn $sbatch -n$
thread
_res_num --nodelist=$res_nodes --output=/dev/null $file_in]
expect {
-re "Submitted batch job ($number)" {
set job_id $expect_out(1,string)
...
...
@@ -199,9 +215,9 @@ proc inc3_11_7 {} {
cancel_job $job_id
set core_res_num [ expr ($core_res_num + 1) ]
# (Fourth test) Submit a batch job: a job using more cores than allocated by the reservation
set sbatch_pid [spawn $sbatch -n$core_res_num --reservation=$res_name --output=/dev/null $file_in]
set thread_res_num [ expr ($thread_res_num + 1) ]
set sbatch_pid [spawn $sbatch -n$thread_res_num --reservation=$res_name --output=/dev/null $file_in]
expect {
-re "Submitted batch job ($number)" {
set job_id $expect_out(1,string)
...
...
@@ -252,7 +268,7 @@ proc inc3_11_7 {} {
# (Fifth test) Submit a batch job: a job specifying node in reservation and
# using more cores than allocated by the reservation
set sbatch_pid [spawn $sbatch -n$
core
_res_num --nodelist=$res_nodes --nodes=1 --output=/dev/null $file_in]
set sbatch_pid [spawn $sbatch -n$
thread
_res_num --nodelist=$res_nodes --nodes=1 --output=/dev/null $file_in]
expect {
-re "Submitted batch job ($number)" {
set job_id $expect_out(1,string)
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/inc3.11.8
+
20
−
6
View file @
95ee2077
...
...
@@ -35,9 +35,7 @@ proc inc3_11_8 {} {
global bin_rm file_in bin_sleep sbatch number scontrol
global alpha_numeric_under scancel
global cluster_cpus cores_per_node def_partition
set num_nodes [available_nodes $def_partition]
set core_res_num [ expr ($cores_per_node / 2) ]
global res_nodes res_thread_cnt
send_user "\n+++++ STARTING TEST 8 +++++\n"
...
...
@@ -45,9 +43,24 @@ proc inc3_11_8 {} {
exec $bin_rm -f $file_in
make_bash_script $file_in "$bin_sleep 100"
# Make a reservation, just to get node size infomation
set ret_code [create_res "StartTime=now Duration=1 NodeCnt=1 User=$user_name" 0]
if {$ret_code != 0} {
send_user "\n\033\[31mFAILURE: Unable to create a valid reservation\033\[m\n"
exit $ret_code
}
# Delete the reservation
set ret_code [delete_res $res_name]
if {$ret_code != 0} {
exit $ret_code
}
set num_nodes [available_nodes $def_partition]
set core_res_num [ expr $cores_per_node / 2 ]
set thread_res_num [ expr $core_res_num * $res_thread_cnt ]
# (First test) Submit the batch job: a simple job using
just 1 core inside the reservation
set sbatch_pid [spawn $sbatch --node
s=$num
_nodes --time=30:00 --ntasks-per-node=$
core
_res_num --output=/dev/null $file_in]
# (First test) Submit the batch job: a simple job using
half the threads on the nodes
set sbatch_pid [spawn $sbatch --node
list=$res
_nodes --time=30:00 --ntasks-per-node=$
thread
_res_num --output=/dev/null $file_in]
expect {
-re "Submitted batch job ($number)" {
set job_id $expect_out(1,string)
...
...
@@ -98,6 +111,7 @@ proc inc3_11_8 {} {
# Delete the reservation
set ret_code [delete_res $res_name]
if {$ret_code != 0} {
cancel_job $job_id
exit $ret_code
}
...
...
@@ -131,7 +145,7 @@ proc inc3_11_8 {} {
if {$ret_code != 0} {
send_user "\n\033\[32mSUCCESS: Reservation can not be created as expected\033\[m\n"
} else {
send_user "\n\033\[31mFAILURE: Reservation can be created when it shouldnot
\033\[m\n"
send_user "\n\033\[31mFAILURE: Reservation can be created when it should
not\033\[m\n"
set exit_code 1
# Delete the reservation
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test3.11
+
28
−
10
View file @
95ee2077
...
...
@@ -43,15 +43,17 @@ source ./inc3.11.8
set test_id "3.11"
set file_in "test$test_id.input"
set exit_code 0
set res_name ""
set res_name_save ""
set user_name ""
set def_partition ""
set def_node ""
set ii 0
set test_id "3.11"
set file_in "test$test_id.input"
set exit_code 0
set res_name ""
set res_name_save ""
set res_nodes ""
set res_thread_cnt 0
set user_name ""
set def_partition ""
set def_node ""
set ii 0
print_header $test_id
...
...
@@ -63,11 +65,12 @@ print_header $test_id
proc create_res { res_params failure_expected } {
#exp_internal 1
global scontrol
global alpha_numeric_under
global alpha_numeric_under
number
global res_name
global res_nodes
global res_nodecnt
global res_corecnt
global res_thread_cnt
set ret_code 0
set res_name ""
...
...
@@ -161,6 +164,21 @@ proc create_res { res_params failure_expected } {
wait
}
}
spawn $scontrol show node $res_nodes
expect {
-re "ThreadsPerCore=($number)" {
set res_thread_cnt $expect_out(1,string)
exp_continue
}
timeout {
send_user "\nFAILURE: scontrol not responding\n"
set ret_code 1
}
eof {
wait
}
}
#exp_internal 0
return $ret_code
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment