Skip to main content

SlurmGen - Simple Slurm Manager

Project description

SlurmGen - Simple Slurm Manager

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

Project Links

Author

Copyright

(c) 2023 - Thomas Guillod

BSD 2-Clause "Simplified" License

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

slurmgen-3.12.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

slurmgen-3.12.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file slurmgen-3.12.0.tar.gz.

File metadata

  • Download URL: slurmgen-3.12.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for slurmgen-3.12.0.tar.gz
Algorithm Hash digest
SHA256 bc3d639f1cf3e8171276c4d436e7b6d281d3db5b3924897cf22583a5b8ae6335
MD5 f2175fc7658ca1c48718a83b012116a3
BLAKE2b-256 8c7cb084ad6db0596443460d7a5f534f54527bfee7b47f91dccceba5a0f8bc37

See more details on using hashes here.

File details

Details for the file slurmgen-3.12.0-py3-none-any.whl.

File metadata

  • Download URL: slurmgen-3.12.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for slurmgen-3.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ed926915db45db6432fc2458568fb72bcaf79f2fb4e2bf9abff3e9047a55245
MD5 25f0d08edb0d715eab316a7403893c44
BLAKE2b-256 e7547288e5db9391ed7ca063124f541f78edf3a6fb4a462fc3ef2c20f6daa175

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