JobStep
Note
This supersedes the pyslurm.jobstep class, which will be removed in a future release
pyslurm.JobStep
A Slurm Jobstep
Parameters:
Other Parameters:
Name | Type | Description |
---|---|---|
time_limit |
int
|
Time limit in Minutes for this step. |
Attributes:
Name | Type | Description |
---|---|---|
id |
Union[str, int]
|
The id for this step. |
job_id |
int
|
The id for the Job this step belongs to. |
name |
str
|
Name of the step. |
user_id |
int
|
User ID who owns this step. |
user_name |
str
|
Name of the User who owns this step. |
time_limit |
int
|
Time limit in Minutes for this step. |
network |
str
|
Network specification for the step. |
cpu_frequency_min |
Union[str, int]
|
Minimum CPU-Frequency requested. |
cpu_frequency_max |
Union[str, int]
|
Maximum CPU-Frequency requested. |
cpu_frequency_governor |
Union[str, int]
|
CPU-Frequency Governor requested. |
reserved_ports |
str
|
Reserved ports for the step. |
cluster |
str
|
Name of the cluster this step runs on. |
srun_host |
str
|
Name of the host srun was executed on. |
srun_process_id |
int
|
Process ID of the srun command. |
container |
str
|
Path to the container OCI. |
allocated_nodes |
str
|
Nodes the Job is using. |
start_time |
int
|
Time this step started, as unix timestamp. |
run_time |
int
|
Seconds this step has been running for. |
partition |
str
|
Name of the partition this step runs in. |
state |
str
|
State the step is in. |
allocated_cpus |
int
|
Number of CPUs this step uses in total. |
ntasks |
int
|
Number of tasks this step uses. |
distribution |
dict
|
Task distribution specification for the step. |
command |
str
|
Command that was specified with srun. |
slurm_protocol_version |
int
|
Slurm protocol version in use. |
cancel()
method descriptor
Cancel a Job step.
Implements the slurm_kill_job_step RPC.
Raises:
Type | Description |
---|---|
RPCError
|
When cancelling the Job was not successful. |
Examples:
load(job_id, step_id)
staticmethod
Load information for a specific job step.
Implements the slurm_get_job_steps RPC.
Parameters:
Returns:
Raises:
Type | Description |
---|---|
RPCError
|
When retrieving Step information from the slurmctld was not successful. |
Examples:
modify(changes)
method descriptor
Modify a job step.
Implements the slurm_update_step RPC.
Parameters:
Raises:
Type | Description |
---|---|
RPCError
|
When updating the JobStep was not successful. |
Examples:
send_signal(signal)
method descriptor
Send a signal to a running Job step.
Implements the slurm_signal_job_step RPC.
Parameters:
Raises:
Type | Description |
---|---|
RPCError
|
When sending the signal was not successful. |
Examples:
Specifying the signal as a string:
or passing in a numeric signal:
to_dict()
method descriptor
JobStep information formatted as a dictionary.
Returns:
Type | Description |
---|---|
dict
|
JobStep information as dict |
pyslurm.JobSteps
Bases: dict
A dict of pyslurm.JobStep objects for a given Job.
Raises:
Type | Description |
---|---|
RPCError
|
When getting the Job steps from the slurmctld failed. |
load(job)
staticmethod
Load the Job Steps from the system.
Parameters:
Returns:
Examples:
load_all()
staticmethod
Loads all the steps in the system.
Returns:
Type | Description |
---|---|
dict
|
A dict where every JobID (key) is mapped with an instance of its JobSteps (value). |