ezpz.slurmΒΆ
- See ezpz/
slurm.py
ezpz/slurm.py
logger = ezpz.get_logger(__name__)
module-attribute
ΒΆ
- Get all running jobs for user.
- For each running job:
- Get the list of nodes assigned to that job
- Check if $(hostname) in list of nodes
-
If so, I belong to that jobid.
-
For a given host need to identify:
build_launch_cmd()
ΒΆ
Build command to launch a job on SLURM.
Source code in src/ezpz/slurm.py
get_nodelist_from_slurm_jobid(jobid)
ΒΆ
Get the nodelist for a given jobid.
Source code in src/ezpz/slurm.py
get_slurm_jobid_of_active_job()
ΒΆ
Get the jobid of the currently active job.
Source code in src/ezpz/slurm.py
get_slurm_nodefile_from_jobid(jobid)
ΒΆ
Get the nodefile for a given jobid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jobid
|
int | str
|
The job ID to get the nodefile for. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the nodefile. |
Source code in src/ezpz/slurm.py
get_slurm_nodefile_of_active_job()
ΒΆ
Get the nodefile of the currently active job.
get_slurm_running_jobs()
ΒΆ
Get the running jobs from sacct.
Source code in src/ezpz/slurm.py
get_slurm_running_jobs_for_user()
ΒΆ
Get all running jobs for the current user.