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
095fb3ef
Commit
095fb3ef
authored
19 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Fix code to test proper functionality and add a bunch more comments for clarity.
parent
58dd755e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testsuite/expect/test13.1
+38
-23
38 additions, 23 deletions
testsuite/expect/test13.1
with
38 additions
and
23 deletions
testsuite/expect/test13.1
+
38
−
23
View file @
095fb3ef
#!/usr/bin/expect
############################################################################
# Purpose: Test of SLURM functionality
# Test that
elan
switch
context
s are not re-used.
# Test that switch
windows in use
s are not re-used.
#
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
# "FAILURE: ..." otherwise with an explanation of the failure, OR
...
...
@@ -37,14 +37,37 @@ set exit_code 0
print_header $test_id
#
# Report the slurm configuration
# Report the slurm network and use it to establish window parameters
#
# windows_per_node - switch windows available per node
# windows_interations - job steps to run after initial switch window allocation
# for a persistent job step
# windows_used - switch windows to use per job step
# step_delay - run time of persistent job step (seconds)
#
set matches 0
log_user 0
set step_delay 0
spawn $scontrol show config
expect {
-re "switch/((elan)|(none))" {
incr matches
-re "switch/elan" {
set windows_per_node 2048
set windows_interations 50
set windows_used 48
set step_delay 10
exp_continue
}
-re "switch/federation" {
set windows_per_node 16
set windows_interations 32
set windows_used 2
set step_delay 10
exp_continue
}
-re "switch/none" {
set windows_per_node 0
set windows_interations 5
set windows_used 4
set step_delay 5
exp_continue
}
timeout {
...
...
@@ -56,8 +79,8 @@ expect {
}
}
log_user 1
if {$
matches !
=
1
} {
send_user "\nWARNING: not running
elan
switch, this test is not applicable\n"
if {$
step_delay =
=
0
} {
send_user "\nWARNING: not running
compatable
switch, this test is not applicable\n"
exit 0
}
...
...
@@ -68,29 +91,21 @@ if {$matches != 1} {
set timeout $max_job_delay
set job_id 0
set matches 0
spawn $srun --allocate -N1 --verbose -t2
expect -re "jobid ($number).*"
set job_id $expect_out(1,string)
#send_user "SLURM_JOBID is $job_id\n"
expect -re $prompt
# start initial job step to claim some switch windows
send "$srun -N1 -O -n$windows_used $bin_sleep $step_delay &\n"
for {set inx 0} {$inx < 50} {incr inx} {
#sleep 0.001
send "$srun -N1 -O -n32 true\n"
expect {
-re "error" {
send_user "\nFAILURE: some error occurred\n"
set exit_code 1
exp_continue
}
-re $prompt {}
}
# start more job steps to check see if any switch window conflicts occur
for {set inx 0} {$inx < $windows_interations} {incr inx} {
#exec $bin_usleep 1000
send "$srun -N1 -O -n$windows_used true\n"
}
# wait for initial job step to complete
send "$bin_sleep $step_delay\n"
send "exit\n"
expect {
...
...
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