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
Project details
Release history Release notifications | RSS feed
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.0rc1.tar.gz
(30.1 kB
view details)
File details
Details for the file pyslurmutils-0.2.0rc1.tar.gz
.
File metadata
- Download URL: pyslurmutils-0.2.0rc1.tar.gz
- Upload date:
- Size: 30.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6f125295d8fff744d84476920b628b07d9d08fb53be540fb1cc16978588db35 |
|
MD5 | 4a72e620bc5d0f610eee5ac13e422572 |
|
BLAKE2b-256 | c2ff61b91c2624e2372be40bad663d49dc4b186a17c0b4cd8caf43ef622ced35 |