wrench::Workunit Class Reference
A class to describe a unit of work that's a sub-component of a StandardJob. More...
#include <Workunit.h>
Public Member Functions | |
Workunit (StandardJob *job, std::set< std::tuple< WorkflowFile *, StorageService *, StorageService *>> pre_file_copies, WorkflowTask *task, std::map< WorkflowFile *, StorageService *> file_locations, std::set< std::tuple< WorkflowFile *, StorageService *, StorageService *>> post_file_copies, std::set< std::tuple< WorkflowFile *, StorageService *>> cleanup_file_deletions) | |
Constructor. More... | |
StandardJob * | getJob () |
Retrieve the standard job this workunit belongs to. More... | |
Static Public Member Functions | |
static void | addDependency (Workunit *parent, Workunit *child) |
Add a dependency between two work units (does nothing if the dependency already exists) More... | |
static std::set< std::unique_ptr< Workunit > > | createWorkunits (StandardJob *job) |
Create all work for a newly dispatched job. More... | |
Public Attributes | |
std::set< Workunit * > | children |
The Workunits that depend on this Workunit. | |
std::set< std::tuple< WorkflowFile *, StorageService * > > | cleanup_file_deletions |
File deletions to perform last. | |
std::map< WorkflowFile *, StorageService * > | file_locations |
Locations where computational tasks should read/write files. | |
StandardJob * | job |
The StandardJob this Workunit belongs to. | |
unsigned long | num_pending_parents |
The number of Workunits this Workunit depends on. | |
std::set< std::tuple< WorkflowFile *, StorageService *, StorageService * > > | post_file_copies |
File copies to perform after computational tasks completes. | |
std::set< std::tuple< WorkflowFile *, StorageService *, StorageService * > > | pre_file_copies |
File copies to perform before computational tasks begin. | |
WorkflowTask * | task = nullptr |
Computational task to perform. | |
Detailed Description
A class to describe a unit of work that's a sub-component of a StandardJob.
Constructor & Destructor Documentation
◆ Workunit()
wrench::Workunit::Workunit | ( | StandardJob * | job, |
std::set< std::tuple< WorkflowFile *, StorageService *, StorageService *>> | pre_file_copies, | ||
WorkflowTask * | task, | ||
std::map< WorkflowFile *, StorageService *> | file_locations, | ||
std::set< std::tuple< WorkflowFile *, StorageService *, StorageService *>> | post_file_copies, | ||
std::set< std::tuple< WorkflowFile *, StorageService *>> | cleanup_file_deletions | ||
) |
Constructor.
- Parameters
-
job the job this workunit belongs to pre_file_copies a set of file copy actions to perform in sequence first task a WorkflowTask file_locations locations where tasks should read/write files post_file_copies a set of file copy actions to perform in sequence after all tasks cleanup_file_deletions a set of file deletion actions to perform last
Member Function Documentation
◆ addDependency()
Add a dependency between two work units (does nothing if the dependency already exists)
- Parameters
-
parent the parent work unit child the child work unit
- Exceptions
-
std::invalid_argument
◆ createWorkunits()
|
static |
Create all work for a newly dispatched job.
- Parameters
-
job the job
◆ getJob()
StandardJob * wrench::Workunit::getJob | ( | ) |
Retrieve the standard job this workunit belongs to.
- Returns
- a standard job
The documentation for this class was generated from the following files:
- /Users/rafsilva/Documents/isi/workspace/wrench/wrench/include/wrench/services/compute/workunit_executor/Workunit.h
- /Users/rafsilva/Documents/isi/workspace/wrench/wrench/src/wrench/services/compute/work_unit_executor/Workunit.cpp