7.2. Application Manager API

class radical.entk.AppManager(config_path=None, reattempts=None, resubmit_failed=None, autoterminate=None, write_workflow=None, rts=None, rts_config=None, name=None, base_path=None, **kwargs)[source]

An application manager takes the responsibility of setting up the communication infrastructure, instantiates the ResourceManager, TaskManager, WFProcessor objects and all their threads and processes. This is the Master object running in the main process and is designed to recover from errors from all other objects, threads and processes.

Arguments
config_path

Url to config path to be read for AppManager

reattempts

number of attempts to re-invoke any failed EnTK components

resubmit_failed

resubmit failed tasks (True/False)

autoterminate

terminate resource reservation upon execution of all tasks of first workflow (True/False)

write_workflow

write workflow and mapping to rts entities to a file (post-termination)

rts

Specify RTS to use. Current options: ‘mock’, ‘radical.pilot’ (default if unspecified)

rts_config

Configuration for the RTS, accepts {‘sandbox_cleanup’: True/False,’db_cleanup’: True/False} when RTS is RP

name

Name of the Application. It should be unique between executions. (default is randomly assigned)

base_path

base path of logger and profiler with a session id, None (default) will use a current working directory

property name

Name for the application manager. Allows the user to setup the name of the application manager, as well as its session ID. This name should be unique between different EnTK executions, otherwise it will produce an error.

Getter

Returns the name of the application manager

Setter

Assigns the name of the application manager

Type

String

property outputs
Getter

Return list of filenames that are to be staged out after execution

Setter

Assign a list of names of files that need to be staged from the remote machine

property resource_desc

The resource description is a dictionary that holds information about the reousrce that will be used to execute a workflow.

The following keys are mandatory in all resource descritpions:
‘resource’ : Label of the resource that will be used.
‘runtime’ : Amount of time the workflow is expected to execute.
‘cores’ : Number of CPU cores.
Optional keys include:
‘project’ : The project that will be charged.
‘gpus’ : Number of GPU devices to be used by the workflow.
‘access_schema’ : The key of an access mechanism to use.
‘queue’ : The name of the job queue RE will use to execute the workflow
‘job_name’ : self._job_name
Getter

Returns the resource description

Setter

Assigns a resource description

run()[source]

Purpose: Run the application manager. Once the workflow and resource manager have been assigned. Invoking this method will start the setting up the communication infrastructure, submitting a resource request and then submission of all the tasks.

property shared_data
Getter

Return list of filenames that are shared between multiple tasks of the application

Setter

Assign a list of names of files that need to be staged to the remote machine

property sid

Get the session ID of the current EnTK execution

Getter

Returns the session ID of the EnTK execution

Type

String

property workflow
Getter

Return the last workflow assigned for execution

Setter

Assign a new workflow to be executed

property workflows
Getter

Return a list of workflows assigned for execution