Skip to main content

Utilities and APIs for interacting with the SLURM workload manager

Project description

slurmutils

Utilities and APIs for interacting with the SLURM workload manager.

Features

  • slurmconf: An API for performing CRUD operations on the SLURM configuration file slurm.conf

Installation

Option 1: PyPI

$ python3 -m pip install slurmutils

Option 2: Install from source

$ git clone https://github.com/canonical/slurmutils.git
$ cd slurmutils
$ python3 -m pip install .

Usage

slurmconf

This module provides an API for performing CRUD operations on the SLURM configuration file slurm.conf. With this module, you can:

Edit a pre-existing configuration
from slurmutils.slurmconf import SlurmConf

with SlurmConf("/etc/slurm/slurm.conf") as conf:
    del conf.inactive_limit
    conf.max_job_count = 20000
    conf.proctrack_type = "proctrack/linuxproc"
Add new nodes
from slurmutils.slurmconf import Node, SlurmConf

with SlurmConf("/etc/slurm/slurm.conf") as conf:
    node_name = "test-node"
    node_conf = {
        "NodeName": node_name,
        "NodeAddr": "12.34.56.78",
        "CPUs": 1, 
        "RealMemory": 1000, 
        "TmpDisk": 10000,
    }
    conf.nodes.update({node_name: Node(**node_conf)})

Project & Community

The slurmutils package is a project of the Ubuntu HPC community. It is an open-source project that is welcome to community involvement, contributions, suggestions, fixes, and constructive feedback. Interested in being involved with the development of slurmutils? Check out these links below:

License

The slurmutils package is free software, distributed under the Apache Software License, version 2.0. See the LICENSE file for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slurmutils-0.1.0.tar.gz (14.4 kB view hashes)

Uploaded Source

Built Distribution

slurmutils-0.1.0-py3-none-any.whl (23.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page