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
d704d5b8
Commit
d704d5b8
authored
18 years ago
by
Christopher J. Morrone
Browse files
Options
Downloads
Patches
Plain Diff
Add test of srun --jobid for an EXISTING allocation
parent
592f256e
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/README
+2
-1
2 additions, 1 deletion
testsuite/expect/README
testsuite/expect/test1.58
+102
-0
102 additions, 0 deletions
testsuite/expect/test1.58
testsuite/expect/test15.5
+3
-3
3 additions, 3 deletions
testsuite/expect/test15.5
with
107 additions
and
4 deletions
testsuite/expect/README
+
2
−
1
View file @
d704d5b8
...
...
@@ -134,7 +134,8 @@ test1.54 Test of running different executables with different arguments
test1.55 Make certain that srun behaves when its controlling terminal
disappears.
test1.56 Test buffered standard IO with really long lines
test1.57 Test of --jobid option (used by Moab)
test1.57 Test of srun --jobid for a new job allocation (used by Moab)
test1.58 Test of srun --jobid for an existing job allocation
**NOTE** The following tests attempt to utilize multiple CPUs or partitions,
The test will print "WARNING" and terminate with an exit code of
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test1.58
0 → 100755
+
102
−
0
View file @
d704d5b8
#!/usr/bin/expect
############################################################################
# Purpose: Test of SLURM functionality
# Test of srun --jobid option with an existing allocation
#
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
# "FAILURE: ..." otherwise with an explanation of the failure, OR
# anything else indicates a failure mode that must be investigated.
############################################################################
# Copyright (C) 2002-2006 The Regents of the University of California.
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
# Written by Christopher J. Morrone <morrone2@llnl.gov>
# UCRL-CODE-217948.
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.llnl.gov/linux/slurm/>.
#
# SLURM is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
source ./globals
set test_id "1.58"
set exit_code 0
print_header $test_id
set timeout $max_job_delay
#
# Run an srun to grab a single node allocation, but not start any
# job steps.
#
set srun_alloc_pid [spawn $srun -v -N1 -n1 -A $bin_sleep 600]
set srun_alloc_sid $spawn_id
expect {
-re "srun: jobid ($number)" {
set jobid $expect_out(1,string)
}
timeout {
send_user "\nFAILURE: srun failed to grab an allocation in a timely manner.\n"
kill $srun_alloc_pid
exit 1
}
}
#
# Now try to use the srun --jobid option to run in the already existing
# allocation.
#
set pattern "sdiouetj49udfj"
set got_pattern 0
set srun_launch_pid [spawn $srun --jobid $jobid echo $pattern]
expect {
-re "error" {
send_user "\nFAILURE: unexpected error occurred\n"
set exit_code 1
}
-re $pattern {
set got_pattern 1
exp_continue
}
timeout {
kill $srun_launch_pid
kill $srun_launch_pid
kill -9 $srun_launch_pid
}
eof {
wait
}
}
if {$got_pattern == 0} {
send_user "\nFAILURE: unable to srun step under existing job allocation\n"
set exit_code 1
}
#
# Release the allocation by killing the first srun (really it kills the "sleep")
#
kill $srun_alloc_pid
set spawn_id $srun_alloc_sid
expect {
timeout {
kill -9 $srun_alloc_pid
}
eof {
wait
}
}
exit $exit_code
This diff is collapsed.
Click to expand it.
testsuite/expect/test15.5
+
3
−
3
View file @
d704d5b8
...
...
@@ -103,7 +103,7 @@ make_bash_script $file_in "
#
set timeout [expr $max_job_delay + $sleep_time]
set job_id 0
spawn $salloc -t1 --kill-command $file_in
spawn $salloc -t1 --kill-command
./
$file_in
expect {
-re "Granted job allocation ($number)" {
set job_id $expect_out(1,string)
...
...
@@ -131,7 +131,7 @@ expect {
set completions 0
set job_id 0
spawn $salloc -t4 --kill-command $file_in
spawn $salloc -t4 --kill-command
./
$file_in
expect {
-re "Granted job allocation ($number)" {
set job_id $expect_out(1,string)
...
...
@@ -161,7 +161,7 @@ if {$completions != 1} {
}
if {$exit_code == 0} {
exec $bin_rm -f
$file_in
file delete
$file_in
send_user "\nSUCCESS\n"
}
exit $exit_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