PBS Job Class¶
- class pbs4py.job.PBSJob(id)¶
A class for querying information and managing a particular submitted pbs job. For the id number in the constructor, the qstat command will be used to populate the attributes of the job.
- Parameters
id (
str
) – The id of the PBS job
- id: str¶
The ID of the PBS job
- name: str¶
The name of the job
- model: str¶
The model attribute on the select line from the job submission
- requested_number_of_nodes: int¶
The number of resources on the select line
- ncpus_per_node¶
The number of cpus for node
- queue: str¶
The queue which this job was submitted to
- state: str¶
Whether the job is queued, running, or finished
- workdir: str¶
The value of $PBS_O_WORKDIR
- exit_status: int¶
The exit status of the pbs job
- read_properties_from_qstat()¶
Use qstat to get the current attributes of this job
- qdel(echo_command=True)¶
Call qdel to delete this job
- Parameters
echo_command (
bool
) – Whether to print the command before running it- Returns
command_output – The output of the shell command
- Return type
str
- update_job_state()¶
Get the job’s status after it has been submitted. Returns the entry of job_state in the qstat information, e.g., ‘Q’, ‘R’, ‘F’, ‘H’, etc.
- Return type
str