Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
ift:computing_cluster:slurm [2022/09/28 22:35] kcach |
ift:computing_cluster:slurm [2023/04/02 20:22] (current) kcach |
||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== Slurm batch ===== | ===== Slurm batch ===== | ||
| - | The following parameters can be used as command line parameters with sbatch and srun or in jobscript, see also Job script example below | + | The following parameters can be used as command line parameters with *sbatch* and *srun* or in jobscript, see also Job script example below |
| **Basic settings** | **Basic settings** | ||
| |**Parameter**|**Function**| | |**Parameter**|**Function**| | ||
| Line 53: | Line 54: | ||
| ==== Job script example ==== | ==== Job script example ==== | ||
| + | <note>Before usage, please adjust parameters</note> | ||
| <code bash> | <code bash> | ||
| #!/bin/bash -l | #!/bin/bash -l | ||
| # Give your job a name, so you can recognize it in the queue overview | # Give your job a name, so you can recognize it in the queue overview | ||
| #SBATCH --job-name=example | #SBATCH --job-name=example | ||
| + | |||
| + | #SBATCH -o slurm-%j.output # %j - will return SLURM_JOB_ID | ||
| + | #SBATCH -e slurm-%j.error | ||
| # Define, how many nodes you need. Here, we ask for 1 node. | # Define, how many nodes you need. Here, we ask for 1 node. | ||
| Line 90: | Line 95: | ||
| # Finish the script | # Finish the script | ||
| exit 0 | exit 0 | ||
| + | </code> | ||
| + | |||
| + | Put script to job queue with | ||
| + | <code> | ||
| + | sbatch ~/sampleScript.sh | ||
| </code> | </code> | ||
