base¶
Module: environments.backends.base¶
Backend Base Class and Methods
Inheritance diagram for pySPACE.environments.backends.base:
Backend¶
-
class
pySPACE.environments.backends.base.Backend[source]¶ Bases:
objectInterface for backends
All other backends must implement several methods of this interface in order to execute an operation on a specific modality.
Class Components Summary
STATES__abstractmethods____del__()__str__()_abc_cache_abc_negative_cache_abc_negative_cache_version_abc_registry_log(message[, level])Logs the given message with the given logging level _start_logging()Configures and starts the logging of this operation _stop_logging()Stops the logging of this operation check_status()Returns a description of the current state of the operations execution. cleanup()Remove the current operation and all potential results that consolidate()Consolidates the results of the single processes into a consistent result of the whole execute([timeout])Executes all processes specified in the currently staged operation. get_result_directory()Return the result directory of the current operation (if any) retrieve([timeout])Fetches the results of the operation’s processes. stage_in(operation)Stage the current operation -
__metaclass__¶ alias of
ABCMeta
-
STATES= set(['consolidated', 'idling', 'executing', 'staged', 'retrieved'])¶
-
execute(timeout=1000000.0)[source]¶ Executes all processes specified in the currently staged operation.
Parameters: timeout (int) – The timeout for this method, after which the execution is aborted
-
retrieve(timeout=1000000.0)[source]¶ Fetches the results of the operation’s processes.
... note:: This call might block until all processes are finished
-
consolidate()[source]¶ Consolidates the results of the single processes into a consistent result of the whole operation
-
cleanup()[source]¶ Remove the current operation and all potential results that have been stored in this object
-
__abstractmethods__= frozenset(['consolidate', 'check_status', 'execute', 'cleanup', 'retrieve'])¶
-
__weakref__¶ list of weak references to the object (if defined)
-
_abc_cache= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version= 29¶
-
_abc_registry= <_weakrefset.WeakSet object>¶
-
create_backend()¶
-
pySPACE.environments.backends.base.create_backend(backend_type='serial')[source]¶ Creates the
backend objectbased on the given optionsThe following backends are available:
serial:SerialBackendmcore:MulticoreBackendmpi:MpiBackendloadl:LoadLevelerBackend