pymatgen.io.abinit.qjobs module¶
Objects and methods to contact the resource manager to get info on the status of the job and useful statistics. Note that this is not a wrapper for the C API but a collection of simple wrappers around the shell commands provided by the resource manager (qsub, qdel and qstat for PBS, sinfo, squeue… for Slurm). The main goal indeed is providing a simplified common interface for different resource managers without having to rely on external libraries.
-
class
BlueGeneJob(queue_id, qname='UnknownQueue')[source]¶ Bases:
pymatgen.io.abinit.qjobs.QueueJobNot supported
Parameters: - queue_id – Job identifier.
- qname – Name of the queue (optional).
-
QTYPE= 'bluegene'¶
-
class
JobStatus[source]¶ Bases:
intThis object is an integer representing the status of a
QueueJob.Slurm API, see man squeue.
- JOB STATE CODES
- Jobs typically pass through several states in the course of their execution. The typical states are PENDING, RUNNING, SUSPENDED, COMPLETING, and COMPLETED. An explanation of each state follows.
- BF BOOT_FAIL Job terminated due to launch failure, typically due to a hardware failure (e.g.
- unable to boot the node or block and the job can not be requeued).
- CA CANCELLED Job was explicitly cancelled by the user or system administrator.
- The job may or may not have been initiated.
CD COMPLETED Job has terminated all processes on all nodes. CF CONFIGURING Job has been allocated resources, but are waiting for them to become ready for use (e.g. booting). CG COMPLETING Job is in the process of completing. Some processes on some nodes may still be active. F FAILED Job terminated with non-zero exit code or other failure condition. NF NODE_FAIL Job terminated due to failure of one or more allocated nodes. PD PENDING Job is awaiting resource allocation. PR PREEMPTED Job terminated due to preemption. R RUNNING Job currently has an allocation. S SUSPENDED Job has an allocation, but execution has been suspended. TO TIMEOUT Job terminated upon reaching its time limit. SE SPECIAL_EXIT The job was requeued in a special state. This state can be set by users, typically
in EpilogSlurmctld, if the job has terminated with a particular exit value.
-
class
MoabJob(queue_id, qname='UnknownQueue')[source]¶ Bases:
pymatgen.io.abinit.qjobs.QueueJobNot supported
Parameters: - queue_id – Job identifier.
- qname – Name of the queue (optional).
-
QTYPE= 'moab'¶
-
class
PbsProJob(queue_id, qname='UnknownQueue')[source]¶ Bases:
pymatgen.io.abinit.qjobs.QueueJobHandler for PbsPro Jobs.
See also https://github.com/plediii/pbs_util for a similar project.
Parameters: - queue_id – Job identifier.
- qname – Name of the queue (optional).
-
PBSSTAT_TO_SLURM= defaultdict(<function PbsProJob.<lambda>>, {'E': <JobStatus: FAILED, at 4715886024>, 'F': <JobStatus: COMPLETED, at 4715885704>, 'Q': <JobStatus: PENDING, at 4715886152>, 'R': <JobStatus: RUNNING, at 4715885896>, 'S': <JobStatus: SUSPENDED, at 4715886344>})¶
-
QTYPE= 'pbspro'¶
-
class
QueueJob(queue_id, qname='UnknownQueue')[source]¶ Bases:
objectThis object provides methods to contact the resource manager to get info on the status of the job and useful statistics. This is an abstract class.
Parameters: - queue_id – Job identifier.
- qname – Name of the queue (optional).
-
QTYPE= None¶
-
S_CANCELLED= <JobStatus: CANCELLED, at 4715886984>¶
-
S_COMPLETED= <JobStatus: COMPLETED, at 4715885704>¶
-
S_FAILED= <JobStatus: FAILED, at 4715886024>¶
-
S_NODEFAIL= <JobStatus: NODEFAIL, at 4715885832>¶
-
S_PENDING= <JobStatus: PENDING, at 4715886152>¶
-
S_PREEMPTED= <JobStatus: PREEMPTED, at 4715885256>¶
-
S_RESIZING= <JobStatus: RESIZING, at 4715886472>¶
-
S_RUNNING= <JobStatus: RUNNING, at 4715885896>¶
-
S_SUSPENDED= <JobStatus: SUSPENDED, at 4715886344>¶
-
S_TIMEOUT= <JobStatus: TIMEOUT, at 4715885384>¶
-
S_UNKNOWN= <JobStatus: UNKNOWN, at 4717485640>¶
-
estimated_start_time()[source]¶ Return date with estimated start time. None if it cannot be detected
-
static
from_qtype_and_id(qtype, queue_id, qname=None)[source]¶ Return a new istance of the appropriate subclass.
Parameters: - qtype – String specifying the Resource manager type.
- queue_id – Job identifier.
- qname – Name of the queue (optional).
-
has_node_failures¶
-
is_completed¶
-
is_failed¶
-
is_running¶
-
likely_code_error()[source]¶ See http://man7.org/linux/man-pages/man7/signal.7.html
SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process SIGINT 2 Term Interrupt from keyboard SIGQUIT 3 Core Quit from keyboard SIGILL 4 Core Illegal Instruction SIGABRT 6 Core Abort signal from abort(3) SIGFPE 8 Core Floating point exception SIGKILL 9 Term Kill signal SIGSEGV 11 Core Invalid memory reference SIGPIPE 13 Term Broken pipe: write to pipe with no readers SIGALRM 14 Term Timer signal from alarm(2) SIGTERM 15 Term Termination signal SIGUSR1 30,10,16 Term User-defined signal 1 SIGUSR2 31,12,17 Term User-defined signal 2 SIGCHLD 20,17,18 Ign Child stopped or terminated SIGCONT 19,18,25 Cont Continue if stopped SIGSTOP 17,19,23 Stop Stop process SIGTSTP 18,20,24 Stop Stop typed at terminal SIGTTIN 21,21,26 Stop Terminal input for background process SIGTTOU 22,22,27 Stop Terminal output for background process
The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and POSIX.1-2001.
Signal Value Action Comment SIGBUS 10,7,10 Core Bus error (bad memory access) SIGPOLL Term Pollable event (Sys V).
Synonym for SIGIOSIGPROF 27,27,29 Term Profiling timer expired SIGSYS 12,31,12 Core Bad argument to routine (SVr4) SIGTRAP 5 Core Trace/breakpoint trap SIGURG 16,23,21 Ign Urgent condition on socket (4.2BSD) SIGVTALRM 26,26,28 Term Virtual alarm clock (4.2BSD) SIGXCPU 24,24,30 Core CPU time limit exceeded (4.2BSD) SIGXFSZ 25,25,31 Core File size limit exceeded (4.2BSD)
-
timeout¶
-
unknown_status¶
-
class
SgeJob(queue_id, qname='UnknownQueue')[source]¶ Bases:
pymatgen.io.abinit.qjobs.QueueJobNot supported
Parameters: - queue_id – Job identifier.
- qname – Name of the queue (optional).
-
QTYPE= 'sge'¶
-
class
ShellJob(queue_id, qname='UnknownQueue')[source]¶ Bases:
pymatgen.io.abinit.qjobs.QueueJobHandler for Shell jobs.
Parameters: - queue_id – Job identifier.
- qname – Name of the queue (optional).
-
QTYPE= 'shell'¶
-
class
SlurmJob(queue_id, qname='UnknownQueue')[source]¶ Bases:
pymatgen.io.abinit.qjobs.QueueJobHandler for Slurm jobs.
Parameters: - queue_id – Job identifier.
- qname – Name of the queue (optional).
-
QTYPE= 'slurm'¶
-
class
TorqueJob(queue_id, qname='UnknownQueue')[source]¶ Bases:
pymatgen.io.abinit.qjobs.QueueJobNot supported
Parameters: - queue_id – Job identifier.
- qname – Name of the queue (optional).
-
QTYPE= 'torque'¶