clusterjob.backends.lsf module¶
LSF backend
-
class
clusterjob.backends.lsf.LsfBackend[source]¶ Bases:
clusterjob.backends.ClusterjobBackendLSF Backend
Attributes: - name (str) – Name of the backend
- extension (str) – Extension for job scripts
- prefix (str) – The prefix for every line in the resource header
- resource_replacements (dict) – mapping of the common clusterjob resource keys to command line options of the bsub command.
- job_vars (dict) – mapping of core environment variables to LSF-specific environment variables.
-
name= 'lsf'¶
-
extension= 'lsf'¶
-
prefix= '#BSUB'¶
-
cmd_submit(jobscript)[source]¶ Given a
JobScriptinstance, return absubcommand that submits the job to the scheduler, as a string. Specifically, the jobscript is piped intobsubfor instant scheduling.
-
get_job_id(response)[source]¶ Given the stdout from the command returned by
cmd_submit(), return a job ID
-
cmd_status(run, finished=False)[source]¶ Given a
AsyncResultinstance, return abjobscommand that queries the scheduler for the job status, as a list of command arguments. The same command is used for running or finished jobs.
-
get_status(response, finished=False)[source]¶ Given the stdout from the command returned by
cmd_status(), return one of the status code defined inclusterjob.status
-
cmd_cancel(run)[source]¶ Given a
AsyncResultinstance, return anbkillcommand that cancels the run, as a list of command arguments.