Skip to main content

SLURM utilities for Python

Project description

pyslurmutils

SLURM utilities for scheduling jobs from Python.

The main purpose of this library is to provide a concurrent.futures.Executor implementation for SLURM which can be used on any machine, not necessarily a SLURM client.

pip install pyslurmutils
from pyslurmutils.concurrent.futures import SlurmRestExecutor

with SlurmRestExecutor(
    url=url,                               # SLURM REST URL
    user_name=user_name,                   # SLURM user name
    token=token,                           # SLURM access token
    log_directory="/path/to/log",          # for log files (optional)
    data_directory="/path/to/data",        # TCP communication when not provided
    pre_script="module load ewoks",        # load environment (optional)
    parameters={"time_limit": "02:00:00"}  # SLURM job parameters (optional)
    python_cmd="python",                   # python command (python3 by default)
) as executor:
    future = executor.submit(sum, [1, 1])
    assert future.result() == 2

Documentation

https://pyslurmutils.readthedocs.io/

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

pyslurmutils-1.0.0.tar.gz (60.6 kB view details)

Uploaded Source

File details

Details for the file pyslurmutils-1.0.0.tar.gz.

File metadata

  • Download URL: pyslurmutils-1.0.0.tar.gz
  • Upload date:
  • Size: 60.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pyslurmutils-1.0.0.tar.gz
Algorithm Hash digest
SHA256 998cfa0de495a3f763e51b92f2cd82344916ea294054c3cfa2d5eac8140f1f69
MD5 428997b5ed5a05bf36ff0f86e2f90bc7
BLAKE2b-256 14551067c6b4f4c1e93b7fa45947ea8bc9cf5442108ae670201f9d249ebb82f6

See more details on using hashes here.

Supported by

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