From 5cb9e549b2f4228dd849407460fc53becc561016 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 11 Sep 2026 23:38:35 +0200 Subject: [PATCH] Use the `slurm` backend instead of `squeue` in the tutorial Signed-off-by: Vasileios Karakasis --- docs/tutorial.rst | 4 ++-- examples/tutorial/config/cluster.py | 2 +- examples/tutorial/config/cluster_logging.py | 2 +- examples/tutorial/config/cluster_mpi.py | 2 +- examples/tutorial/config/cluster_perflogs.py | 2 +- examples/tutorial/config/cluster_perflogs_httpjson.py | 2 +- examples/tutorial/config/cluster_resources.py | 2 +- examples/tutorial/config/multifile/pseudo-cluster/settings.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/tutorial.rst b/docs/tutorial.rst index bd1f5c2306..27017de72d 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -1052,8 +1052,8 @@ We will focus only on the new system configuration as the rest of the configurat :lines: 22-43 We define two partitions, one named ``login`` where we are running tests locally (emulating the login nodes of an HPC cluster) and another one named ``compute`` (emulating the compute nodes of an HPC cluster), where we will be submitting test jobs with Slurm and ``srun``. -We use the ``squeue`` scheduler backend, because our Slurm installation does not have job accounting, so we instruct ReFrame to use the ``squeue`` command for querying the job state. -If your Slurm installation has job accounting enabled, you should prefer the ``slurm`` backend, which uses the ``sacct`` for retrieving the job state, which is more reliable. +We use the ``slurm`` scheduler backend, which uses the ``sacct`` command for querying the job state; this requires Slurm's job accounting to be enabled, as it is in our pseudo cluster. +If your Slurm installation does not have job accounting enabled, you should use the ``squeue`` backend instead, which relies on the ``squeue`` command for retrieving the job state. Another important parameter is :attr:`~config.systems.partitions.access`, which denotes the job scheduler options needed to access the desired nodes. In our example, it is redundant to define it as the ``all`` partition is the default, but in most real cases, you will have to define the :attr:`~config.systems.partitions.access` options. diff --git a/examples/tutorial/config/cluster.py b/examples/tutorial/config/cluster.py index debb399b40..770df023e4 100644 --- a/examples/tutorial/config/cluster.py +++ b/examples/tutorial/config/cluster.py @@ -34,7 +34,7 @@ { 'name': 'compute', 'descr': 'Compute nodes', - 'scheduler': 'squeue', + 'scheduler': 'slurm', 'launcher': 'srun', 'access': ['-p all'], 'environs': ['gnu', 'clang'] diff --git a/examples/tutorial/config/cluster_logging.py b/examples/tutorial/config/cluster_logging.py index 02b05662a8..2cb44a64d7 100644 --- a/examples/tutorial/config/cluster_logging.py +++ b/examples/tutorial/config/cluster_logging.py @@ -34,7 +34,7 @@ { 'name': 'compute', 'descr': 'Compute nodes', - 'scheduler': 'squeue', + 'scheduler': 'slurm', 'launcher': 'srun', 'access': ['-p all'], 'environs': ['gnu', 'clang'] diff --git a/examples/tutorial/config/cluster_mpi.py b/examples/tutorial/config/cluster_mpi.py index 6cae4f8e0f..015e5bac66 100644 --- a/examples/tutorial/config/cluster_mpi.py +++ b/examples/tutorial/config/cluster_mpi.py @@ -34,7 +34,7 @@ { 'name': 'compute', 'descr': 'Compute nodes', - 'scheduler': 'squeue', + 'scheduler': 'slurm', 'launcher': 'srun', 'access': ['-p all'], 'environs': ['gnu', 'gnu-mpi', 'clang'] diff --git a/examples/tutorial/config/cluster_perflogs.py b/examples/tutorial/config/cluster_perflogs.py index 2feaefdf04..cf6ce24137 100644 --- a/examples/tutorial/config/cluster_perflogs.py +++ b/examples/tutorial/config/cluster_perflogs.py @@ -34,7 +34,7 @@ { 'name': 'compute', 'descr': 'Compute nodes', - 'scheduler': 'squeue', + 'scheduler': 'slurm', 'launcher': 'srun', 'access': ['-p all'], 'environs': ['gnu', 'clang'] diff --git a/examples/tutorial/config/cluster_perflogs_httpjson.py b/examples/tutorial/config/cluster_perflogs_httpjson.py index d19b602b1d..535a550405 100644 --- a/examples/tutorial/config/cluster_perflogs_httpjson.py +++ b/examples/tutorial/config/cluster_perflogs_httpjson.py @@ -57,7 +57,7 @@ def _format_record(record, extras, ignore_keys): { 'name': 'compute', 'descr': 'Compute nodes', - 'scheduler': 'squeue', + 'scheduler': 'slurm', 'launcher': 'srun', 'access': ['-p all'], 'environs': ['gnu', 'clang'] diff --git a/examples/tutorial/config/cluster_resources.py b/examples/tutorial/config/cluster_resources.py index 9e0b850606..3b9623fdd6 100644 --- a/examples/tutorial/config/cluster_resources.py +++ b/examples/tutorial/config/cluster_resources.py @@ -34,7 +34,7 @@ { 'name': 'compute', 'descr': 'Compute nodes', - 'scheduler': 'squeue', + 'scheduler': 'slurm', 'launcher': 'srun', 'access': ['-p all'], 'environs': ['gnu', 'clang'], diff --git a/examples/tutorial/config/multifile/pseudo-cluster/settings.py b/examples/tutorial/config/multifile/pseudo-cluster/settings.py index 8416e92c5f..d6323101de 100644 --- a/examples/tutorial/config/multifile/pseudo-cluster/settings.py +++ b/examples/tutorial/config/multifile/pseudo-cluster/settings.py @@ -20,7 +20,7 @@ { 'name': 'compute', 'descr': 'Compute nodes', - 'scheduler': 'squeue', + 'scheduler': 'slurm', 'launcher': 'srun', 'access': ['-p all'], 'environs': ['gnu', 'clang']