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
26d93c72
Commit
26d93c72
authored
13 years ago
by
Morris Jette
Browse files
Options
Downloads
Patches
Plain Diff
Minor patches to test suite
parent
3c55e946
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
testsuite/expect/test1.59
+13
-3
13 additions, 3 deletions
testsuite/expect/test1.59
testsuite/expect/test24.1.prog.c
+1
-0
1 addition, 0 deletions
testsuite/expect/test24.1.prog.c
testsuite/expect/test4.12
+10
-3
10 additions, 3 deletions
testsuite/expect/test4.12
with
24 additions
and
6 deletions
testsuite/expect/test1.59
+
13
−
3
View file @
26d93c72
...
@@ -36,6 +36,7 @@ source ./globals
...
@@ -36,6 +36,7 @@ source ./globals
set test_id "1.59"
set test_id "1.59"
set exit_code 0
set exit_code 0
set file_in "test$test_id.input"
set num_nodes 3
set num_nodes 3
set node_count 0
set node_count 0
set task_count 0
set task_count 0
...
@@ -53,7 +54,7 @@ if {[string compare [switch_type] "elan"] == 0} {
...
@@ -53,7 +54,7 @@ if {[string compare [switch_type] "elan"] == 0} {
send_user "\nWARNING: This test incompatible with Elan switch\n"
send_user "\nWARNING: This test incompatible with Elan switch\n"
exit $exit_code
exit $exit_code
}
}
#find out if we have enough nodes to test functionality
#
find out if we have enough nodes to test functionality
set partition [default_partition]
set partition [default_partition]
spawn $scontrol show partition $partition
spawn $scontrol show partition $partition
expect {
expect {
...
@@ -84,8 +85,16 @@ set node2 0
...
@@ -84,8 +85,16 @@ set node2 0
set node3 0
set node3 0
set node4 0
set node4 0
#
# Build input script file
#
make_bash_script $file_in "
export PS1=\"$prompt\"
$bin_bash --norc
"
set timeout $max_job_delay
set timeout $max_job_delay
spawn $salloc -N$num_nodes -v
bash
set salloc_pid [
spawn $salloc -N$num_nodes -v
-t1 ./$file_in]
expect {
expect {
-re "salloc: Granted job allocation ($number)" {
-re "salloc: Granted job allocation ($number)" {
set job_id $expect_out(1,string)
set job_id $expect_out(1,string)
...
@@ -96,13 +105,14 @@ expect {
...
@@ -96,13 +105,14 @@ expect {
}
}
timeout {
timeout {
send_user "\nFAILURE: srun not responding\n"
send_user "\nFAILURE: srun not responding\n"
kill_srun
slow_kill $salloc_pid
set exit_code 1
set exit_code 1
}
}
eof {
eof {
wait
wait
}
}
}
}
exec $bin_rm -f $file_in
if {$job_id == 0} {
if {$job_id == 0} {
send_user "\nFAILURE: salloc failure\n"
send_user "\nFAILURE: salloc failure\n"
exit 1
exit 1
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test24.1.prog.c
+
1
−
0
View file @
26d93c72
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
#include
"src/sshare/sshare.h"
#include
"src/sshare/sshare.h"
/* set up some fake system */
/* set up some fake system */
void
*
acct_db_conn
=
NULL
;
uint32_t
cluster_cpus
=
50
;
uint32_t
cluster_cpus
=
50
;
int
long_flag
=
1
;
int
long_flag
=
1
;
int
exit_code
=
0
;
int
exit_code
=
0
;
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test4.12
+
10
−
3
View file @
26d93c72
...
@@ -213,9 +213,10 @@ proc sinfo_test_2 { node proc_cnt total_procs } {
...
@@ -213,9 +213,10 @@ proc sinfo_test_2 { node proc_cnt total_procs } {
# allocate a set of nodes (node_cnt) and the quit right after
# allocate a set of nodes (node_cnt) and the quit right after
proc allocate_and_quit { node proc_cnt total_procs } {
proc allocate_and_quit { node proc_cnt total_procs } {
global salloc scontrol sinfo number alpha_numeric_under
global
bin_bash
salloc scontrol sinfo number alpha_numeric_under
global prompt select_type procs_per_node
global prompt select_type procs_per_node
test_id bin_rm
set file_in "test$test_id.input"
set job_id 0
set job_id 0
set num_alloc 0
set num_alloc 0
set block ""
set block ""
...
@@ -223,7 +224,12 @@ proc allocate_and_quit { node proc_cnt total_procs } {
...
@@ -223,7 +224,12 @@ proc allocate_and_quit { node proc_cnt total_procs } {
set timeout 60
set timeout 60
set idle_cpus [expr $total_procs - $proc_cnt]
set idle_cpus [expr $total_procs - $proc_cnt]
set mypid [spawn $salloc -w $node -N 1 -t 5 -n $proc_cnt bash]
make_bash_script $file_in "
export PS1=\"$prompt\"
$bin_bash --norc
"
set mypid [spawn $salloc -w $node -N 1 -t 5 -n $proc_cnt ./$file_in]
expect {
expect {
-re "Granted job allocation ($number)" {
-re "Granted job allocation ($number)" {
set job_id $expect_out(1,string)
set job_id $expect_out(1,string)
...
@@ -268,6 +274,7 @@ proc allocate_and_quit { node proc_cnt total_procs } {
...
@@ -268,6 +274,7 @@ proc allocate_and_quit { node proc_cnt total_procs } {
wait
wait
}
}
}
}
exec $bin_rm -f $file_in
return $rc
return $rc
}
}
...
...
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