toil.batchSystems.torque¶
Attributes¶
Classes¶
A partial implementation of BatchSystemSupport for batch systems run on a |
Module Contents¶
- toil.batchSystems.torque.logger¶
- class toil.batchSystems.torque.TorqueBatchSystem(config, maxCores, maxMemory, maxDisk)[source]¶
Bases:
toil.batchSystems.abstractGridEngineBatchSystem.AbstractGridEngineBatchSystemA partial implementation of BatchSystemSupport for batch systems run on a standard HPC cluster. By default auto-deployment is not implemented.
- Parameters:
config (toil.common.Config)
maxCores (float)
maxMemory (float)
maxDisk (int)
- class GridEngineThread(newJobsQueue, updatedJobsQueue, killQueue, killedJobsQueue, boss)[source]¶
Bases:
toil.batchSystems.abstractGridEngineBatchSystem.AbstractGridEngineBatchSystem.GridEngineThread[list[str]]A class that represents a thread of control.
This class can be safely subclassed in a limited fashion. There are two ways to specify the activity: by passing a callable object to the constructor, or by overriding the run() method in a subclass.
- Parameters:
newJobsQueue (queue.Queue[toil.batchSystems.abstractGridEngineBatchSystem.JobTuple | None])
updatedJobsQueue (queue.Queue[toil.batchSystems.abstractBatchSystem.UpdatedBatchJobInfo])
killQueue (queue.Queue[int])
killedJobsQueue (queue.Queue[int])
boss (toil.batchSystems.abstractGridEngineBatchSystem.AbstractGridEngineBatchSystem)
- getRunningJobIDs()[source]¶
Get the running Toil job IDs and how long each has been running, in seconds. Implementation-specific; called by boss AbstractGridEngineBatchSystem implementation via AbstractGridEngineBatchSystem.getRunningBatchJobIDs()
- killJob(jobID)[source]¶
Kill specific job with the Toil job ID. Implementation-specific; called by GridEngineThread.killJobs()
- Parameters:
jobID (string) – Toil job ID
- Return type:
None
- prepareSubmission(cpu, memory, disk, walltime, jobID, command, jobName, job_environment=None, gpus=None)[source]¶
Preparation in putting together something submittable for submitting to batch system (via submitJob().)
- Param:
cpu: number of cores
- Param:
memory: bytes of memory
- Param:
disk: bytes of disk
- Param:
walltime: amount of wall clock time in seconds
- Param:
jobID: Toil job ID
- Param:
command: the command line string to be called
- Param:
jobName: the name of the Toil job, to provide metadata to batch systems if desired
- Param:
job_environment: the environment variables to be set on the worker
- Param:
gpus: number of gpus
- Returns:
the submission to pass to submitJob()
- Parameters:
- Return type:
- submitJob(subLine)[source]¶
Wrapper routine for submitting the actual command-line call, then processing the output to get the batch system job ID
- getJobExitCode(torqueJobID)[source]¶
Returns job exit code and possibly an instance of abstractBatchSystem.BatchJobExitReason.
Returns None if the job is still running.
If the job is not running but the exit code is not available, it will be EXIT_STATUS_UNAVAILABLE_VALUE. Implementation-specific; called by GridEngineThread.checkOnJobs().
The exit code will only be 0 if the job affirmatively succeeded.