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
21586409
Commit
21586409
authored
10 years ago
by
Morris Jette
Browse files
Options
Downloads
Patches
Plain Diff
Modify recent tests to support more configurations
parent
e333522e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testsuite/expect/test17.36
+6
-2
6 additions, 2 deletions
testsuite/expect/test17.36
testsuite/expect/test5.9
+31
-24
31 additions, 24 deletions
testsuite/expect/test5.9
with
37 additions
and
26 deletions
testsuite/expect/test17.36
+
6
−
2
View file @
21586409
...
@@ -201,7 +201,8 @@ proc check_job { exp_num_jobs } {
...
@@ -201,7 +201,8 @@ proc check_job { exp_num_jobs } {
wait_for_job $job_id RUNNING
wait_for_job $job_id RUNNING
set job_cnt 0
set job_cnt 0
spawn $squeue --job=$job_id --state=RUNNING -Oname --noheader
# If gang scheduling is configured, some jobs will be suspended
spawn $squeue --job=$job_id --state=RUNNING,SUSPENDED -Oname --noheader
expect {
expect {
-re "$file_in" {
-re "$file_in" {
incr job_cnt 1
incr job_cnt 1
...
@@ -218,7 +219,8 @@ proc check_job { exp_num_jobs } {
...
@@ -218,7 +219,8 @@ proc check_job { exp_num_jobs } {
if { $exp_num_jobs != $job_cnt } {
if { $exp_num_jobs != $job_cnt } {
send_user "\nFAILURE: the number of possible jobs that could "
send_user "\nFAILURE: the number of possible jobs that could "
send_user "run were not reached\n"
send_user "run were not reached ($exp_num_jobs != $job_cnt).\n"
send_user "This could be due to memory or other limits.\n"
set exit_code 1
set exit_code 1
}
}
}
}
...
@@ -381,5 +383,7 @@ delete_part $test_part_3
...
@@ -381,5 +383,7 @@ delete_part $test_part_3
if {$exit_code == 0} {
if {$exit_code == 0} {
exec $bin_rm -f $file_in
exec $bin_rm -f $file_in
send_user "\nSUCCESS\n"
send_user "\nSUCCESS\n"
} else {
send_user "\nFAILURE\n"
}
}
exit $exit_code
exit $exit_code
This diff is collapsed.
Click to expand it.
testsuite/expect/test5.9
+
31
−
24
View file @
21586409
...
@@ -35,6 +35,11 @@ source ./globals_accounting
...
@@ -35,6 +35,11 @@ source ./globals_accounting
set test_id "5.9"
set test_id "5.9"
set exit_code 0
set exit_code 0
set job_id 0
set file_err "/tmp/test${test_id}err"
set file_in "test$test_id\_script"
set file_out "/tmp/test${test_id}out"
set test_acct "test${test_id}acct"
############################Job Format Test############################
############################Job Format Test############################
...
@@ -85,7 +90,7 @@ set sq_name(19) comment
...
@@ -85,7 +90,7 @@ set sq_name(19) comment
#####################
#####################
# cpu count value
# cpu count value
#####################
#####################
set sq_format(numcpus)
4
set sq_format(numcpus)
1
set sq_format(ntpercore) 2
set sq_format(ntpercore) 2
set sq_format(totcpu) [expr $sq_format(numcpus) * $sq_format(ntpercore)]
set sq_format(totcpu) [expr $sq_format(numcpus) * $sq_format(ntpercore)]
...
@@ -93,25 +98,25 @@ set sq_format(totcpu) [expr $sq_format(numcpus) * $sq_format(ntpercore)]
...
@@ -93,25 +98,25 @@ set sq_format(totcpu) [expr $sq_format(numcpus) * $sq_format(ntpercore)]
# Format value
# Format value
#######################
#######################
# stderr
# stderr
set sq_format(0)
/dev/null
set sq_format(0)
$file_err
# stdout
# stdout
set sq_format(1)
/tmp/test$test_id\_tmp
set sq_format(1)
$file_out
# stdin
# stdin
set sq_format(2) /dev/null
set sq_format(2) /dev/null
# numcpus
# numcpus
set sq_format(3) $sq_format(totcpu)
set sq_format(3) $sq_format(totcpu)
# numnodes
# numnodes
set sq_format(4)
2
set sq_format(4)
1
# timelimit
# timelimit
set sq_format(5) 2
set sq_format(5) 2
# job
# job
set sq_format(6)
"test$test_id\_script"
set sq_format(6)
$file_in
# account
# account
set sq_format(7)
"test
$test_
id\_
acct
"
set sq_format(7) $test_acct
# cpus-per-task
# cpus-per-task
set sq_format(8) 2
set sq_format(8) 2
# network
# network
set sq_format(9) "
system
"
set sq_format(9) "
ip
"
# requeue
# requeue
set sq_format(10) 1
set sq_format(10) 1
# profile
# profile
...
@@ -125,9 +130,9 @@ set sq_format(14) PD|R|CA|CR|CG|CD|F|TO|NF|SE
...
@@ -125,9 +130,9 @@ set sq_format(14) PD|R|CA|CR|CG|CD|F|TO|NF|SE
# jobid
# jobid
set sq_format(15) 0
set sq_format(15) 0
# user
# user
set sq_format(16) ""
set sq_format(16) "
DUMMY
"
# switches
# switches
set sq_format(17)
3
set sq_format(17)
1
# partition
# partition
set sq_format(18) [default_partition]
set sq_format(18) [default_partition]
# comment
# comment
...
@@ -145,7 +150,7 @@ if {$available < 2} {
...
@@ -145,7 +150,7 @@ if {$available < 2} {
exit $exit_code
exit $exit_code
}
}
remove_acct [get_cluster_name] $
sq_format(7)
remove_acct [get_cluster_name] $
test_acct
spawn $bin_id -un
spawn $bin_id -un
expect {
expect {
...
@@ -159,7 +164,7 @@ expect {
...
@@ -159,7 +164,7 @@ expect {
}
}
set match 0
set match 0
spawn $sacctmgr add -i account $
sq_format(7)
spawn $sacctmgr add -i account $
test_acct
expect {
expect {
-re "Associations" {
-re "Associations" {
set match 1
set match 1
...
@@ -201,7 +206,7 @@ if {$match != 1} {
...
@@ -201,7 +206,7 @@ if {$match != 1} {
#
#
# Make a bash script
# Make a bash script
#
#
make_bash_script $
sq_format(6)
"$srun $bin_sleep 10000
make_bash_script $
file_in
"$srun $bin_sleep 10000
$srun $bin_sleep 200
$srun $bin_sleep 200
$srun $bin_sleep 100"
$srun $bin_sleep 100"
...
@@ -212,6 +217,7 @@ spawn $sbatch -A$sq_format(7) -N$sq_format(4) -n$sq_format(numcpus) \
...
@@ -212,6 +217,7 @@ spawn $sbatch -A$sq_format(7) -N$sq_format(4) -n$sq_format(numcpus) \
-o$sq_format(1) --comment=$sq_format(19) -e$sq_format(0) $sq_format(6)
-o$sq_format(1) --comment=$sq_format(19) -e$sq_format(0) $sq_format(6)
expect {
expect {
-re "Submitted batch job ($number)" {
-re "Submitted batch job ($number)" {
set job_id $expect_out(1,string)
set sq_format(15) $expect_out(1,string)
set sq_format(15) $expect_out(1,string)
exp_continue
exp_continue
}
}
...
@@ -228,7 +234,7 @@ set match 0
...
@@ -228,7 +234,7 @@ set match 0
set cpu_match 0
set cpu_match 0
set numcpus [expr $sq_format(3) * $sq_format(8)]
set numcpus [expr $sq_format(3) * $sq_format(8)]
for {set i 0} {$i<=19} {incr i 1} {
for {set i 0} {$i<=19} {incr i 1} {
spawn $squeue --job=$
sq_format(15)
--noheader -O$sq_name($i)
spawn $squeue --job=$
job_id
--noheader -O$sq_name($i)
expect {
expect {
-re "$sq_format($i)" {
-re "$sq_format($i)" {
# send_user "Match $sq_name($i) with $sq_format($i)\n"
# send_user "Match $sq_name($i) with $sq_format($i)\n"
...
@@ -250,7 +256,7 @@ if {$match != $i} {
...
@@ -250,7 +256,7 @@ if {$match != $i} {
}
}
set match 0
set match 0
spawn $squeue --job=$
sq_format(15)
--noheader -O$sq_name(19):4
spawn $squeue --job=$
job_id
--noheader -O$sq_name(19):4
expect {
expect {
-re "12345" {
-re "12345" {
send_user "\nFAILURE: field width control failure\n"
send_user "\nFAILURE: field width control failure\n"
...
@@ -303,15 +309,15 @@ set sq_step_name(9) username
...
@@ -303,15 +309,15 @@ set sq_step_name(9) username
# Format value
# Format value
#####################
#####################
# jobid
# jobid
set sq_step_format(0) $
sq_format(15)
set sq_step_format(0) $
job_id
# stepid
# stepid
set sq_step_format(1) $
sq_format(15)
.0
set sq_step_format(1) $
job_id
.0
# stepname
# stepname
set sq_step_format(2) "sleep"
set sq_step_format(2) "sleep"
# partition
# partition
set sq_step_format(3) ""
set sq_step_format(3) "
DUMMY
"
# network
# network
set sq_step_format(4) ""
set sq_step_format(4) "
DUMMY
"
# gres
# gres
set sq_step_format(5) "(null)"
set sq_step_format(5) "(null)"
# numcpus
# numcpus
...
@@ -319,15 +325,16 @@ set sq_step_format(6) $sq_format(totcpu)
...
@@ -319,15 +325,16 @@ set sq_step_format(6) $sq_format(totcpu)
# profile
# profile
set sq_step_format(7) "NotSet"
set sq_step_format(7) "NotSet"
# numtask
# numtask
set sq_step_format(8) ""
set sq_step_format(8) "
DUMMY
"
# username
# username
set sq_step_format(9) $sq_format(16)
set sq_step_format(9) $sq_format(16)
#
w
ait a bit
#
W
ait a bit
for the step to start
sleep 2
sleep 2
set match 0
set match 0
spawn $scontrol show step $sq_step_format(1)
#spawn $scontrol show step $sq_step_format(1)
spawn $scontrol show step
expect {
expect {
-re "State=($alpha_under)" {
-re "State=($alpha_under)" {
set sq_step_format(3) $expect_out(1,string)
set sq_step_format(3) $expect_out(1,string)
...
@@ -383,12 +390,12 @@ if {$match != $i} {
...
@@ -383,12 +390,12 @@ if {$match != $i} {
set exit_code 1
set exit_code 1
}
}
cancel_job $
sq_format(15)
cancel_job $
job_id
sleep 2
sleep 2
remove_acct [get_cluster_name] $
sq_format(7)
remove_acct [get_cluster_name] $
test_acct
if {$exit_code == 0} {
if {$exit_code == 0} {
exec $bin_rm -f $
sq_format(6)
exec $bin_rm -f $
file_err $file_out
send_user "\nSUCCESS\n"
send_user "\nSUCCESS\n"
} else {
} else {
send_user "\nFAILURE\n"
send_user "\nFAILURE\n"
...
...
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