parsl.providers.LocalProvider

class parsl.providers.LocalProvider(channel=LocalChannel(envs={}, script_dir=None, userhome='/home/docs/checkouts/readthedocs.org/user_builds/parsl/checkouts/latest/docs'), nodes_per_block=1, launcher=SingleNodeLauncher(debug=True, fail_on_any=False), init_blocks=1, min_blocks=0, max_blocks=1, worker_init='', cmd_timeout=30, parallelism=1, move_files=None)[source]

Local Execution Provider

This provider is used to provide execution resources from the localhost.

Parameters
  • 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.

  • move_files (Optional[Bool]: should files be moved? by default, Parsl will try to figure) – this out itself (= None). If True, then will always move. If False, will never move.

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

__init__(channel=LocalChannel(envs={}, script_dir=None, userhome='/home/docs/checkouts/readthedocs.org/user_builds/parsl/checkouts/latest/docs'), nodes_per_block=1, launcher=SingleNodeLauncher(debug=True, fail_on_any=False), init_blocks=1, min_blocks=0, max_blocks=1, worker_init='', cmd_timeout=30, parallelism=1, move_files=None)[source]

Methods

__init__([channel, nodes_per_block, ...])

cancel(job_ids)

Cancels the jobs specified by a list of job ids

status(job_ids)

Get the status of a list of jobs identified by their ids.

submit(command, tasks_per_node[, job_name])

Submits the command onto an Local Resource Manager 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 label[source]

Provides the label for this provider

status(job_ids)[source]

Get the status of a list of jobs identified by their ids.

Parameters

job_ids (-) – List of identifiers for the jobs

Returns

  • List of status codes.

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.localprovider')[source]

Submits the command onto an Local Resource Manager job. Submit returns an ID that corresponds to the task that was just submitted.

If tasks_per_node < 1:

1/tasks_per_node is provisioned

If tasks_per_node == 1:

A single node is provisioned

If tasks_per_node > 1 :

tasks_per_node nodes are provisioned.

Parameters
  • command (-) – (String) Commandline invocation to be made on the remote side.

  • tasks_per_node (-) – command invocations to be launched per node

Kwargs:
  • job_name (String): Name for job, must be unique

Returns

At capacity, cannot provision more - job_id: (string) Identifier for the job

Return type

  • None