From 7b396104734c257f81f874c17f50fe49120e81fe Mon Sep 17 00:00:00 2001 From: germann_e Date: Wed, 7 Aug 2024 17:07:11 +0200 Subject: [PATCH] ADD: interactive-jobs.md --- _data/sidebars/merlin7_sidebar.yml | 2 + .../interactive-jobs.md | 202 ++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 pages/merlin7/03-Slurm-General-Documentation/interactive-jobs.md diff --git a/_data/sidebars/merlin7_sidebar.yml b/_data/sidebars/merlin7_sidebar.yml index 81fb35c..17e750d 100644 --- a/_data/sidebars/merlin7_sidebar.yml +++ b/_data/sidebars/merlin7_sidebar.yml @@ -48,6 +48,8 @@ entries: folderitems: - title: Merlin7 Infrastructure url: /merlin7/slurm-configuration.html + - title: Running Slurm Interactive Jobs + url: /merlin7/interactive-jobs.html - title: Slurm Batch Script Examples url: /merlin7/slurm-examples.html - title: Software Support diff --git a/pages/merlin7/03-Slurm-General-Documentation/interactive-jobs.md b/pages/merlin7/03-Slurm-General-Documentation/interactive-jobs.md new file mode 100644 index 0000000..f759268 --- /dev/null +++ b/pages/merlin7/03-Slurm-General-Documentation/interactive-jobs.md @@ -0,0 +1,202 @@ +--- +title: Running Interactive Jobs +#tags: +keywords: interactive, X11, X, srun, salloc, job, jobs, slurm, nomachine, nx +last_updated: 07 August 2024 +summary: "This document describes how to run interactive jobs as well as X based software." +sidebar: merlin7_sidebar +permalink: /merlin7/interactive-jobs.html +--- + +## Running interactive jobs + +There are two different ways for running interactive jobs in Slurm. This is possible by using +the ``salloc`` and ``srun`` commands: + +* **``salloc``**: to obtain a Slurm job allocation (a set of nodes), execute command(s), and then release the allocation when the command is finished. +* **``srun``**: is used for running parallel tasks. + +### srun + +Is run is used to run parallel jobs in the batch system. It can be used within a batch script +(which can be run with ``sbatch``), or within a job allocation (which can be run with ``salloc``). +Also, it can be used as a direct command (in example, from the login nodes). + +When used inside a batch script or during a job allocation, ``srun`` is constricted to the +amount of resources allocated by the ``sbatch``/``salloc`` commands. In ``sbatch``, usually +these resources are defined inside the batch script with the format ``#SBATCH