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
6048c77d
Commit
6048c77d
authored
9 years ago
by
Morris Jette
Browse files
Options
Downloads
Patches
Plain Diff
Add FAQ comparing srun and sbatch
parent
548789a3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/html/faq.shtml
+28
-1
28 additions, 1 deletion
doc/html/faq.shtml
with
28 additions
and
1 deletion
doc/html/faq.shtml
+
28
−
1
View file @
6048c77d
...
...
@@ -59,6 +59,8 @@
<li><a href="#req">How can a job in complete or failed state be requeued?</a></li>
<li><a href="#cpu_count">Slurm documentation refers to CPUs, cores and threads.
What exactly is considered a CPU?</a></li>
<li><a href="#sbatch_srun">What is the difference between the sbatch
and srun commands?</a></li>
</ol>
<h2>For Administrators</h2>
...
...
@@ -1008,7 +1010,32 @@ resource allocation with respect to base boards, sockets, cores and threads.</p>
<p>(<b>NOTE:</b> An exception to this would be if the system administrator
configured SelectTypeParameters=CR_CPU and each node's CPU count without its
socket/core/thread specification. In that case, each thread would be
independently scheduled as a CPU. This is not a typical configuration.)
independently scheduled as a CPU. This is not a typical configuration.)</p>
<p><a name="sbatch_srun"><b>31. What is the difference between the sbatch
and srun commands?</b></a><br>
The srun command has two different modes of operation. First, if not run within
an existing job (i.e. not within a Slurm job allocation created by salloc or
sbatch), then it will create a job allocation and spawn an application.
If run within an existing allocation, the srun command only spawns the
application.
For this question, we will only address the first mode of operation and compare
creating a job allocation using the sbatch and srun commands.</p>
<p>The srun command is designed for interactive use, with someone monitoring
the output.
The output of the application is seen as output of the srun command,
typically at the user's terminal.
The sbatch command is designed to submit a script for later execution and its
output is written to a file.
Command options used in the job allocation are almost identical.
The most noticable difference in options is that the sbatch command supports
the concept of <a href="job_array.html">job arrays</a>, while srun does not.
Another significant difference is in fault tolerance.
Failures involving sbatch jobs typically result in the job being requeued
and executed again, while failures involving srun typically result in an
error message being generated with the expectation that the user will respond
in an appropriate fashion.</p>
<p class="footer"><a href="#top">top</a></p>
...
...
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