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": 120}  # 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-0.2.0rc0.tar.gz (29.6 kB view details)

Uploaded Source

File details

Details for the file pyslurmutils-0.2.0rc0.tar.gz.

File metadata

  • Download URL: pyslurmutils-0.2.0rc0.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pyslurmutils-0.2.0rc0.tar.gz
Algorithm Hash digest
SHA256 b0e934229c1635c888216f89d20b7b4ec52df95c7a81f96c62e96572b302114b
MD5 53df5214178306b245f5d77dfbf7a3dd
BLAKE2b-256 18b19213ee751a78a1f4ddc920589acfe8e91e82d8685e02929ee8b2ecc4d304

See more details on using hashes here.

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