Skip to content
Snippets Groups Projects
Verified Commit 3e679466 authored by Adam Caprez's avatar Adam Caprez
Browse files

Update "Submitting a Job Array" page.

parent e77eb119
No related branches found
No related tags found
1 merge request!18Update Submitting Jobs section.
1. [HCC-DOCS](index.html)
2. [HCC-DOCS Home](HCC-DOCS-Home_327685.html)
3. [HCC Documentation](HCC-Documentation_332651.html)
4. [Submitting Jobs](Submitting-Jobs_332222.html)
<span id="title-text"> HCC-DOCS : Submitting a Job Array </span>
================================================================
Created by <span class="author"> Derek Weitzel</span>, last modified by
<span class="editor"> Carrie Brown</span> on Jun 29, 2017
+++
title = "Submitting a Job Array"
description = "How to use job arrays with the SLURM scheduler."
+++
A job array is a set of jobs that share the same submit file, but will
run multiple copies with a environment variable incremented. These are
useful when you need to process a series of files, or if you need to run
the same application multiple times.
Creating a Array Submit File
----------------------------
### Creating a Array Submit File
An array submit file is very similar to the example submit files
in [Submitting Jobs](Submitting-Jobs_332222.html).
**example.slurm**
in [Submitting Jobs]({{< relref "/guides/submitting_jobs/_index.md" >}}).
``` syntaxhighlighter-pre
{{% panel theme="info" header="example.slurm" %}}
{{< highlight batch >}}
#!/bin/sh
#SBATCH --array=0-31
#SBATCH --time=03:15:00 # Run time in hh:mm:ss
......@@ -37,18 +27,12 @@ module load example/test
echo "I am task $SLURM_ARRAY_TASK_ID on node `hostname`"
sleep 60
```
{{< /highlight >}}
{{% /panel %}}
The submit file above will output the `$SLURM_ARRAY_TASK_ID`, which will
be different for every one of the 32 (0-31) jobs, to the output files.
Job Arrays in SLURM have more features than this brief description,
please visit
the <a href="https://slurm.schedmd.com/job_array.html" class="external-link">SLURM Documentation</a> for
more detailed information.
please visit the [SLURM Documentation](https://slurm.schedmd.com/job_array.html)
for more detailed information.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment