cluster
dummy
current_jobs(ctx, match)
async
Dummy method to find current jobs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
object
|
Context object for retrieving configuration. |
required |
match
|
str
|
Jobs to match the job list with. |
required |
Returns:
| Type | Description |
|---|---|
list
|
Current jobs. |
Source code in model_ensembler/cluster/dummy.py
find_id(job_id)
async
Dummy method to find local job id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
int
|
Local job identifier. |
required |
Returns:
| Type | Description |
|---|---|
int
|
job id. |
Raises:
| Type | Description |
|---|---|
LookupError
|
If job id not found. |
Source code in model_ensembler/cluster/dummy.py
submit_job(ctx, script=None)
async
Dummy method to submit job locally.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
object
|
Context object for retrieving configuration. |
required |
script
|
str
|
Script name to submit. |
None
|
Returns:
| Type | Description |
|---|---|
int
|
Job ID. |
Source code in model_ensembler/cluster/dummy.py
threaded_job(run_dir, script)
Dummy method to set off local job
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_dir
|
str
|
Directory script is running in. |
required |
script
|
str
|
Name of script to run. |
required |
Source code in model_ensembler/cluster/dummy.py
slurm
current_jobs(ctx, match)
async
Method to get list of current jobs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
object
|
Context object for retrieving configuration. |
required |
match
|
str
|
Jobs to match the job list with. |
required |
Returns:
| Type | Description |
|---|---|
list
|
Filtered jobs. |
Source code in model_ensembler/cluster/slurm.py
find_id(job_id)
async
Method to find SLURM job by ID.
This method provides an interface to the squeue SLURM queue utility to identify a job and return it along with it's state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
int
|
SLURM job identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
jobs |
list
|
Job objects including name and state. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If cannot retrieve job from list. |
Source code in model_ensembler/cluster/slurm.py
submit_job(ctx, script=None)
async
Method to submit jobs to SLURM.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
object
|
Context object for retrieving configuration. |
required |
script
|
str
|
Script name to submit. |
None
|
Returns:
| Type | Description |
|---|---|
int
|
Job ID. |