Skip to content

Slurm

Preview

SchedMD Slurm on SOCA has been added since 25.11.0 and is considered experimental. Not all SOCA features have been migrated to Slurm yet, so running full production workloads on it is not recommended at this time. Refer to Feature Matrix page to see what features are currently supported.

Configure SOCA installer to deploy Slurm

To enable Slurm on SOCA, you first need to navigate to default_config.yml.

Add slurm to the scheduler.scheduler_engine section:

  scheduler:
    # Scheduler(s) to install/configure on the SOCA_CONTROLLER host
    scheduler_engine: 
      # - "openpbs" # Production ready - Stable & Tested
      # - "lsf" # Preview - Development, not stable, not fully tested and not suitable for production.
      - "slurm" # Preview - Development, not stable, not fully tested and not suitable for production.

Note

You can keep openpbs / lsf if you want to run a dual-scheduler setup, or you can choose to use only Slurm.

Then, navigate to system.scheduler.slurm section below to review Slurm parameters

slurm:
    # Install path. We recommend you to not change this path
    # if you do, make sure to update relevant cluster_analytics / log_backup  paths as well
    # Note: $SOCA_CLUSTER_ID will be automatically replaced by the SOCA Cluster Name specified at install time
    install_prefix_path: "/opt/soca/$SOCA_CLUSTER_ID/schedulers/default/slurm"
    install_sysconfig_path: "/opt/soca/$SOCA_CLUSTER_ID/schedulers/default/slurm/etc"

    version: "25-05-3-1"
    url: "https://github.com/SchedMD/slurm/archive/refs/tags/slurm-25-05-3-1.tar.gz"
    sha256: "a24d9a530e8ae1071dd3865c7260945ceffd6c65eea273d0ee21c85d8926782e"

    compatibility_packages:
        # Note: SLURM is only compatible with libjwt 1.x as there is a dependency with jwt_add_header()
        libjwt:
            url: "https://github.com/benmcollins/libjwt/releases/download/v1.17.0/libjwt-1.17.0.tar.bz2"
            sha256: "b8b257da9b64ba9075fce3a3f670ae02dee7fc95ab7009a2e1ad60905e3f8d48"

You're all set, you can now continue with a regular SOCA installation. While your cluster is provisioning, we suggest reviewing the SOCA Slurm bootstrap scripts to become familiar with the automation happening behind the scenes.

Interact with your Slurm cluster

Warning

Node provisioning is not working with SOCA at this stage. However, you can use SOCA as a client node for your existings Slurm environments and interact with them using the SOCA CLI, Web Interface or APIs. We recommend you checking the SOCA x AWS PCS integration if you want to interact with Slurm clusters natively on AWS

Load your Slurm shell

Once your system is up and running, load your slurm shell by running soca_slurm-<scheduler_identifier> on your machine, where <scheduler_identifier> is a unique identifier automatically generated by SOCA.

This unique identifier is helpful if you plan to host multiple Slurm environments on your SOCA controller or if you intend to access an on-premises Slurm system through SOCA. You can install as many Slurm environment(s) as you want on your SOCA environment.

# By default, Slurm command are not available on your shell
[socaadmin@ip-203-0-121-246 ~]$ squeue
bash: squeue: command not found

# Load your Slurm using soca_slurm_<identifier> command
[socaadmin@ip-203-0-121-246 ~]$ soca_slurm_slurm-default-soca-pcsdemo 
========= SOCA ========= 
>> SLURM environment loaded, you can now run commands such as sbatch/squeue/srun etc ...
>> SLURM is installed under: /opt/soca/soca-pcsdemo/schedulers/default/slurm
>> Add /bin/soca_slurm to your .bashrc / .bash_profile to automatically run this script
>> Type exit to close this shell
======================== 

# You can now run all your regular Slurm commands
(soca_slurm) socaadmin@ip-202-0-107-9:~# squeue
slurm-onprem    up   infinite      1  idle# highcpu

Submit a job

CLI

You can submit a Slurm job using the sbatch command

Pass the SOCA Job Resource Parameters via -Jd (Job Description).

Web Interface

You can submit your Slurm jobs using the SOCA Web Interface:

HTTP API

You can your submit your Slurm jobs using the SOCA HTTP REST API.

View jobs using Web Interface

You can view and control your Slurm HPC jobs using "My Job Queue" page on the SOCA Web Interface: