qtoolkit.io.sge module#
- class qtoolkit.io.sge.SGEIO(get_job_executable: str = 'qstat')[source]#
Bases:
PBSIOBase- CANCEL_CMD: str | None = 'qdel'#
- SUBMIT_CMD: str | None = 'qsub'#
- default_unit: str = 'M'#
- extract_job_id_from_cancel(stderr: str) str | None[source]#
Extract the job ID from the cancellation output.
- header_template: str = '#$ -cwd $${cwd}\n#$ -q $${queue}\n#$ -N $${job_name}\n#$ -P $${device}\n#$ -l $${select}\n#$ -l h_rt=$${walltime}\n#$ -l s_rt=$${soft_walltime}\n#$ -pe $${model}\n#$ -binding $${place}\n#$ -W group_list=$${group_list}\n#$ -M $${mail_user}\n#$ -m $${mail_type}\n#$ -o $${qout_path}\n#$ -e $${qerr_path}\n#$ -p $${priority}\n#$ -r $${rerunnable}\n#$ -t $${array}\n$${qverbatim}\n'#
- header_template_file: str = 'sge'#
- job_id_regex: str | None = '^\\d+(\\.[\\w.-]+)?(\\[\\d+(-\\d+)?(,\\d+)*\\])?$'#
- parse_job_output(exit_code: int, stdout: str | bytes, stderr: str | bytes, job_id: str | None = None) QJob | None[source]#
Parse the output of the qstat command for a single job.
- parse_jobs_list_output(exit_code: int, stdout: str | bytes, stderr: str | bytes, job_ids: list[str] | None = None) list[QJob][source]#
Parse the output of the qstat command for a list of jobs.
- power_labels: ClassVar[dict] = {'g': 2, 'k': 0, 'm': 1, 't': 3}#
- sanitize_options(options: dict) dict[source]#
Sanitize the values in the options used to generate the header.
- Parameters:
options – Dictionary of options to sanitize.
- Returns:
Sanitized options.
- Return type:
dict
- system_name: str = 'SGE'#
- class qtoolkit.io.sge.SGEState(value)[source]#
Bases:
QSubState- DELETION = 'd'#
- DELETION_RUNNING = 'dr'#
- DELETION_RUNNING_RESUBMIT = 'dRr'#
- DELETION_SUSPENDED_ALARM = 'dT'#
- DELETION_SUSPENDED_JOB = 'ds'#
- DELETION_SUSPENDED_QUEUE = 'dS'#
- DELETION_SUSPENDED_RESUBMIT_ALARM = 'dRT'#
- DELETION_SUSPENDED_RESUBMIT_JOB = 'dRs'#
- DELETION_SUSPENDED_RESUBMIT_QUEUE = 'dRS'#
- DELETION_TRANSFERRING = 'dt'#
- DELETION_TRANSFERRING_RESUBMIT = 'dRt'#
- ERROR_PENDING = 'Eqw'#
- ERROR_PENDING_HOLD = 'Ehqw'#
- ERROR_PENDING_HOLD_REQUEUE = 'EhRqw'#
- FINISHED = 'z'#
- HOLD = 'hqw'#
- JOB_SUSPENDED = 's'#
- QUEUED_WAITING = 'qw'#
- RESTARTED = 'R'#
- RUNNING = 'r'#
- TRANSFERRING = 't'#
- WAITING = 'w'#