Skip to main content

SlurmGen - Simple Manager for Slurm Jobs

Summary

SlurmGen is a very simple Slurm manager:

  • The job description is stored in JSON files.
  • The JSON files are transformed into Slurm scripts.
  • The Slurm script can be run locally or on a Slurm Cluster.

SlurmGen is only supporting a small subset of Slurm:

  • Create and delete folders.
  • Set environment variables.
  • Set the job name and log.
  • Set the ressources (memory, time, CPU, etc.).
  • Define the set of commands to be executed.

SlurmGen is not a binding and/or a wrapper for Slurm. SlurmGen is only generating Slurm scripts from JSON files. SlurmGen is written in Python without any external dependencies.

Example

An example is located in the example folder of the repository:

  • job_def.json contains the job definition
  • job_tmpl.json contains the template data
  • run_slurm.py contains is dummy script executed by the Slurm job
  • slurm_output contains the generated Slurm script and log file
  • data_output contains data generated by the Slurm job
# Create a Slurm script with a command line template.
sgen job_def.json --tmpl_str "title" "test" --tmpl_str "var" "Welcome to everyone"

# Create a Slurm script with a JSON file template.
sgen job_def.json --tmpl_file job_tmpl.json

# Create a Slurm script and run the job locally.
sgen job_def.json --local --tmpl_file job_tmpl.json

# Create a Slurm script and run the job on the cluster.
sgen job_def.json --cluster --tmpl_file job_tmpl.json

Author

(c) 2023 - Thomas Guillod

BSD 2-Clause "Simplified" License

Metadata

Release files for slurmgen 3.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slurmgen 3.14.0
File Size Uploaded
slurmgen-3.14.0.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for slurmgen 3.14.0
File Interpreter ABI Platform
slurmgen-3.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / slurmgen-3.14.0.tar.gz

Download URL slurmgen-3.14.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8d763783b181ac06fef4618d299bc996a2e367ebca2ea9b75ada424d7f267966
BLAKE2b-256 checksum
How to use checksums
f69da9e6df71137245c6c03d2167f52fe6b64a9ee0689e56c962b30e3c5a454c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.11

Release files / slurmgen-3.14.0-py3-none-any.whl

Download URL slurmgen-3.14.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be1f37d651213f5f24c2889fa10cfa58e406679303afd688a25131fc90a5032f
BLAKE2b-256 checksum
How to use checksums
5fec6c1a3bce3b97b2ce0c1e3a2dfdc48f046229917192572d078cceaf62f0a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.11

Release history Release notifications | RSS feed

This release

3.14.0 This release

2 release files

3.13.0

2 release files

3.12.0

2 release files

3.10.0

2 release files

3.9.0

2 release files

3.8.0

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page