WRENCH
1.11
Cyberinfrastructure Simulation Workbench
|
Overview | Installation | Getting Started | WRENCH 101 | WRENCH 102 |
Several interactions with a storage service are done simple by calling static methods of the wrench::StorageService
class. These make it possible to lookup, delete, read, and write files. For instance:
Note that the file registry service is passed to the wrench::StorageService::deleteFile()
method since the file deletion should cause the file registry to remove one of its entries.
Reading and writing files is something an execution controller typically does not do directly (instead, workflow tasks read and write files as they execute). But, if for some reason an execution controller needs to spend time doing file I/O, it is easily done:
An operation commonly performed by an execution controller is copying files between storage services (e.g., to enforce some data locality). This is typically done by specifying file copy operations as part of standard jobs. But it can also be done manually by the execution controller via the data movement manager's methods wrench::DataMovementManager::doSynchronousFileCopy()
and wrench::DataMovementManager::initiateAsynchronousFileCopy()
. Here is an example in which a file is copied between storage services:
See the execution controller implementation in examples/basic-examples/bare-metal-data-movement/DataMovementWMS.cpp
for a more complete example.