romtools.hpc.components.transfer_manager#
Moving a campaign’s input files to where it runs, and its results back.
Classes
|
Stages the files a campaign needs into its run directory, and brings its results back afterwards. |
|
Copies the configured upload patterns from the current directory into the run directory. |
|
Moves the files a campaign needs onto the remote host, and its results back, in both directions through a single tar.gz archive. |
- class romtools.hpc.components.transfer_manager.BaseTransferManager(*, files, config=None, logger=None, campaign_directory=None)[source]#
Bases:
CampaignComponentStages the files a campaign needs into its run directory, and brings its results back afterwards.
Nothing moves by default: a dispatcher whose work already runs against the files in place needs neither half. Subclasses override whichever half genuinely has work to do.
- Parameters:
files (BaseFileManager) – The file manager whose resolve_path decides what paths mean
campaign_directory (str) – The campaign directory results are gathered into
config (dict) – The dispatcher’s configuration dictionary
logger (Logger) – An instance of the Logger class for logging
- Raises:
ValueError – if the configured collect or upload patterns are invalid.
- class romtools.hpc.components.transfer_manager.LocalTransferManager(*, files, config=None, logger=None, campaign_directory=None)[source]#
Bases:
BaseTransferManagerCopies the configured upload patterns from the current directory into the run directory.
The work runs on this machine against these same files, so there is nothing to pack up and nothing to bring back: only upload does anything.
- Parameters:
files (BaseFileManager)
config (dict)
logger (Logger)
campaign_directory (str)
- class romtools.hpc.components.transfer_manager.RemoteTransferManager(connection, *, files, config=None, logger=None, campaign_directory=None)[source]#
Bases:
BaseTransferManagerMoves the files a campaign needs onto the remote host, and its results back, in both directions through a single tar.gz archive.
- Parameters:
connection (Connection) – An established Connection to the remote host
campaign_directory (str) – The campaign directory, mirrored locally and remotely
files (RemoteFileManager) – The remote file manager, whose resolve_path decides what paths mean
config (dict)
logger (Logger)