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)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hpc_funcs-1.0.6.tar.gz
(23.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
hpc_funcs-1.0.6-py3-none-any.whl
(29.3 kB
view details)
File details
Details for the file hpc_funcs-1.0.6.tar.gz.
File metadata
- Download URL: hpc_funcs-1.0.6.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
983603f542019a726307d44f407a5b80de189319e45b593f375ff234ccb5e8be
|
|
| MD5 |
e3ae82926c642ea65e3d4fc28e31c6ad
|
|
| BLAKE2b-256 |
398cce65aa2c986101b0b8d05dc13363bd8ae55e56853e3098ad23ed0dba5d35
|
File details
Details for the file hpc_funcs-1.0.6-py3-none-any.whl.
File metadata
- Download URL: hpc_funcs-1.0.6-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9122520e78eb1e5db87e4dfa60cc9c8a3018075cb8c45a6e079909a86ba53d9b
|
|
| MD5 |
281ebec0822179e9d74e0a8008658345
|
|
| BLAKE2b-256 |
8545a119329bc8e15739e74ed23f9b95c3b3bf85acb951bdba23b3c4063be60f
|