Simple Python 3 package to get information when running Python programs in slurm
Project description
slurmee
Simple Python 3 package to get information when running Python programs in slurm.
Usage
import slurmee
print(f"Slurm job id: {slurmee.get_job_id()}")
print(f"Slurm job name: {slurmee.get_job_name()}")
print(f"Slurm submit dir: {slurmee.get_submit_dir()}")
print(f"Slurm job nodelist: {slurmee.get_job_nodelist()}")
print(f"Slurm submit host: {slurmee.get_submit_host()}")
print(f"Slurm job num_nodes: {slurmee.get_job_num_nodes()}")
print(f"Slurm cpus on node: {slurmee.get_cpus_on_node()}")
print(f"Slurm ntasks: {slurmee.get_ntasks()}")
print(f"Slurm nodeid: {slurmee.get_nodeid()}")
Methods return None
if not running inside of slurm. It can be used to check this condition e.g.
if slurmee.get_job_id():
print("Running inside of slurm!")
Development
This package has no external runtime dependencies. The tests can be run via
make test
To install the dependencies for generating the docs and releasing the package, in a virtual environment, run
pip install -e ".[test,dev,doc]"
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
slurmee-0.1.0rc3.tar.gz
(4.6 kB
view details)
File details
Details for the file slurmee-0.1.0rc3.tar.gz
.
File metadata
- Download URL: slurmee-0.1.0rc3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeec6f6d33ab7c961ad19bc98b9e359fe748a50214826a3d1ee0aa5afcbf5aae |
|
MD5 | 59eacc8878f8abb2f9e018218287daec |
|
BLAKE2b-256 | 0c98551c1ffb560de199f1b449b16d3eebc2ade7c414c60e7434a07f9d69216f |