parsl.providers.LSFProvider

class parsl.providers.LSFProvider(channel=LocalChannel(envs={}, script_dir=None, userhome='/home/docs/checkouts/readthedocs.org/user_builds/parsl/checkouts/stable/docs'), nodes_per_block=1, cores_per_block=None, cores_per_node=None, init_blocks=1, min_blocks=0, max_blocks=1, parallelism=1, walltime='00:10:00', scheduler_options='', worker_init='', project=None, queue=None, cmd_timeout=120, move_files=True, bsub_redirection=False, request_by_nodes=True, launcher=SingleNodeLauncher(debug=True, fail_on_any=False))[source]

LSF Execution Provider

This provider uses sbatch to submit, squeue for status and scancel to cancel jobs. The sbatch script to be used is created from a template file in this same module.

Parameters
  • channel (Channel) – Channel for accessing this provider. Possible channels include LocalChannel (the default), SSHChannel, or SSHInteractiveLoginChannel.

  • nodes_per_block (int) – Nodes to provision per block. When request_by_nodes is False, it is computed by cores_per_block / cores_per_node.

  • cores_per_block (int) – Cores to provision per block. Enabled only when request_by_nodes is False.

  • cores_per_node (int) – Cores to provision per node. Enabled only when request_by_nodes is False.

  • init_blocks (int) – Number of blocks to request at the start of the run.

  • min_blocks (int) – Minimum number of blocks to maintain.

  • max_blocks (int) – Maximum number of blocks to maintain.

  • parallelism (float) – Ratio of provisioned task slots to active tasks. A parallelism value of 1 represents aggressive scaling where as many resources as possible are used; parallelism close to 0 represents the opposite situation in which as few resources as possible (i.e., min_blocks) are used.

  • walltime (str) – Walltime requested per block in HH:MM:SS.

  • project (str) – Project to which the resources must be charged

  • queue (str) – Queue to which to submit the job request

  • scheduler_options (str) – String to prepend to the #SBATCH blocks in the submit script to the scheduler.

  • worker_init (str) – Command to be run before starting a worker, such as ‘module load Anaconda; source activate env’.

  • cmd_timeout (int) – Seconds after which requests to the scheduler will timeout. Default: 120s

  • launcher (Launcher) – Launcher for this provider. Possible launchers include SingleNodeLauncher (the default), SrunLauncher, or AprunLauncher

  • move_files (Optional[Bool]: should files be moved? by default, Parsl will try to move files.) –

  • bsub_redirection (Bool) – Should a redirection symbol “<” be included when submitting jobs, i.e., Bsub < job_script.

  • request_by_nodes (Bool) – Request by nodes or request by cores per block. When this is set to false, nodes_per_block is computed by cores_per_block / cores_per_node. Default is True.

__init__(channel=LocalChannel(envs={}, script_dir=None, userhome='/home/docs/checkouts/readthedocs.org/user_builds/parsl/checkouts/stable/docs'), nodes_per_block=1, cores_per_block=None, cores_per_node=None, init_blocks=1, min_blocks=0, max_blocks=1, parallelism=1, walltime='00:10:00', scheduler_options='', worker_init='', project=None, queue=None, cmd_timeout=120, move_files=True, bsub_redirection=False, request_by_nodes=True, launcher=SingleNodeLauncher(debug=True, fail_on_any=False))[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([channel, nodes_per_block, …])

Initialize self.

cancel(job_ids)

Cancels the jobs specified by a list of job ids

execute_wait(cmd[, timeout])

status(job_ids)

Get the status of a list of jobs identified by the job identifiers returned from the submit request.

submit(command, tasks_per_node[, job_name])

Submit the command as an LSF job.

Attributes

cores_per_node

Number of cores to provision per node.

label

Provides the label for this provider

mem_per_node

Real memory to provision per node in GB.

status_polling_interval

Returns the interval, in seconds, at which the status method should be called.

cancel(job_ids)[source]

Cancels the jobs specified by a list of job ids

Args: job_ids : [<job_id> …]

Returns : [True/False…] : If the cancel operation fails the entire list will be False.

property status_polling_interval[source]

Returns the interval, in seconds, at which the status method should be called.

Returns

the number of seconds to wait between calls to status()

submit(command, tasks_per_node, job_name='parsl.lsf')[source]

Submit the command as an LSF job.

Parameters
  • command (str) – Command to be made on the remote side.

  • tasks_per_node (int) – Command invocations to be launched per node

  • job_name (str) – Name for the job (must be unique).

Returns

If at capacity, returns None; otherwise, a string identifier for the job

Return type

None or str