hpc_funcs
Python utilities for interacting with HPC clusters — shell execution, environment management, LMOD module system, and UGE scheduler.
Install
pip install hpc_funcs
Usage
LMOD
Want to use LMOD to load modules within a python environment? For example in a notebook?
from hpc_funcs import lmod
# Load a module and apply env changes to current process
lmod.use("/folder/with/modules")
lmod.load("program")
UGE (Univa Grid Engine)
UGE is not the most popular scheduler, so having pythonic interface is very convenient.
from hpc_funcs.schedulers.uge import submission, qstat, qacct, qdel
# Generate and submit a job script
script = submission.generate_script(
cmd="python run.py",
name="myjob",
cores=8,
mem="16G",
hours=4,
)
script_path = submission.write_script(script, directory="/tmp/jobs")
job_id = submission.submit_script(script_path)
# Monitor status
jobs = qstat.get_qstat_json()
# Fetch accounting info after completion
info = qacct.get_job_accounting(job_id)
Metadata
Release files for hpc-funcs 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hpc_funcs-1.0.6.tar.gz | 23.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hpc_funcs-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.3 kB
Release files / hpc_funcs-1.0.6.tar.gz
| Download URL | hpc_funcs-1.0.6.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
983603f542019a726307d44f407a5b80de189319e45b593f375ff234ccb5e8be
|
|
BLAKE2b-256 checksum How to use checksums |
398cce65aa2c986101b0b8d05dc13363bd8ae55e56853e3098ad23ed0dba5d35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / hpc_funcs-1.0.6-py3-none-any.whl
| Download URL | hpc_funcs-1.0.6-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9122520e78eb1e5db87e4dfa60cc9c8a3018075cb8c45a6e079909a86ba53d9b
|
|
BLAKE2b-256 checksum How to use checksums |
8545a119329bc8e15739e74ed23f9b95c3b3bf85acb951bdba23b3c4063be60f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|