Skip to main content

SlurmGen - Simple Manager for Slurm Jobs

Project description

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

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.14.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slurmgen-3.14.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for slurmgen-3.14.0.tar.gz
Algorithm Hash digest
SHA256 8d763783b181ac06fef4618d299bc996a2e367ebca2ea9b75ada424d7f267966
MD5 562edd1da106e8c77eaee5051aac2e3c
BLAKE2b-256 f69da9e6df71137245c6c03d2167f52fe6b64a9ee0689e56c962b30e3c5a454c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slurmgen-3.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be1f37d651213f5f24c2889fa10cfa58e406679303afd688a25131fc90a5032f
MD5 a5f7df47bac3cd242ab073aa4eabab4c
BLAKE2b-256 5fec6c1a3bce3b97b2ce0c1e3a2dfdc48f046229917192572d078cceaf62f0a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page