dragon.workflows.parsl_mpi_app

Functions

mpi_app([function, data_flow_kernel, cache, ...])

wraps an mpi application

Classes

DragonMPIExecutor

Dragon based @mpi_app executor.

MPIApp

Extends AppBase to cover the MPI App.

class DragonMPIExecutor

Dragon based @mpi_app executor. It executes an MPI application that is started using a ProcessGroup within an existing allocation of nodes.

__init__(label: str = 'dragon_process_group', storage_access: Optional[List[Staging]] = None, working_dir: Optional[str] = None)
start()

Since we cannot start a ProcessGroup without the executable start does not initialize anything

submit(func, resource_specification, *args)

Defines a dragon.native.ProcessGroup and launches the specified MPI executable with that process group. It returns stdin

Parameters
  • func (callable) – function with mpi_app decorator that defines ProcessGroup and mpi app parameters

  • resource_specification (dict) – specifies resources to use. not utilized by the DragonMPI executor.

Raises

UnsupportedFeatureError – DragonMPI executor doesn’t use resource specification

Returns

Future that is completed and holds connections to stdin and stdout to rank 0.

Return type

concurrent.futures.Future

shutdown()

Shutdown the executor.

This includes all attached resources such as workers and controllers.

class MPIApp

Extends AppBase to cover the MPI App.

__init__(func, data_flow_kernel=None, cache=False, executors=['dragon_process_group'], ignore_for_cache=None, join=False)

Construct the App object.

Args:
  • func (function): Takes the function to be made into an App

Kwargs:
  • data_flow_kernel (DataFlowKernel): The DataFlowKernel responsible for managing this app. This can be omitted only after calling parsl.dataflow.dflow.DataFlowKernelLoader.load().

  • executors (str|list) : Labels of the executors that this app can execute over. Default is ‘all’.

  • cache (Bool) : Enable caching of this app ?

Returns:
  • App object.

mpi_app(function: callable = None, data_flow_kernel: Optional[DataFlowKernel] = None, cache: bool = False, executors: Union[List[str], Literal['all']] = ['dragon_process_group'], ignore_for_cache: Optional[List[str]] = None)

wraps an mpi application

Parameters
  • function (callable, optional) – function that returns arguments to start Process group and run the mpi app, defaults to None

  • data_flow_kernel (Optional[DataFlowKernel], optional) – dataflow kernel to use, defaults to None

  • cache (bool, optional) – whether to cache. Passed to the dataflow kernel, defaults to False

  • executors (Union[List[str], Literal["all"]], optional) – executor used to launch mpi app. This has to be the dragon_process_group executor, defaults to [“dragon_process_group”]

  • ignore_for_cache (Optional[List[str]], optional) – whether to ignore for cache. Passed to the dataflow kernel, defaults to None