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 jon
  • 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.5.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

slurmgen-3.5.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for slurmgen-3.5.0.tar.gz
Algorithm Hash digest
SHA256 e3cc20e5408dc0fd845e5ba9584d51fe21cb6c872042efdda8162088b467e707
MD5 307ff082f403ad8da12a428abe3a626a
BLAKE2b-256 f1a20bfa1024575cbf622c8cc0317e4a56ce15a8bbf3b4a0a7fc632b45e5bb47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slurmgen-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for slurmgen-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a4cbc579283300dc9c1e369259437786b058a1c63ba550c75381baa3490a0d9
MD5 5a731f6e9e9791b2645a013b66e78218
BLAKE2b-256 8f2358dc5d3a5db1d967915a2f34271dfd5a0cf009d3ecf27875c45d0b7a52d8

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