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 *, std::shared_ptr< FileLocation >, std::shared_ptr< FileLocation >>> pre_file_copies, WorkflowTask *task, std::map< WorkflowFile *, std::shared_ptr< FileLocation >> file_locations, std::set< std::tuple< WorkflowFile *, std::shared_ptr< FileLocation >, std::shared_ptr< FileLocation >>> post_file_copies, std::set< std::tuple< WorkflowFile *, std::shared_ptr< FileLocation >>> cleanup_file_deletions) | |
Constructor. More... | |
StandardJob * | getJob () |
Retrieve the standard job this workunit belongs to. More... | |
Static Public Member Functions | |
static void | addDependency (std::shared_ptr< Workunit > parent, std::shared_ptr< Workunit > child) |
Add a dependency between two work units (does nothing if the dependency already exists) More... | |
static std::set< std::shared_ptr< Workunit > > | createWorkunits (StandardJob *job) |
Create all work units for a newly dispatched job. More... | |
Public Attributes | |
std::set< std::shared_ptr< Workunit > > | children |
The Workunits that depend on this Workunit. | |
std::set< std::tuple< WorkflowFile *, std::shared_ptr< FileLocation > > > | cleanup_file_deletions |
File deletions to perform last. | |
std::map< WorkflowFile *, std::shared_ptr< FileLocation > > | 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 *, std::shared_ptr< FileLocation >, std::shared_ptr< FileLocation > > > | post_file_copies |
File copies to perform after computational tasks completes. | |
std::set< std::tuple< WorkflowFile *, std::shared_ptr< FileLocation >, std::shared_ptr< FileLocation > > > | 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 *, std::shared_ptr< FileLocation >, std::shared_ptr< FileLocation >>> | pre_file_copies, | ||
WorkflowTask * | task, | ||
std::map< WorkflowFile *, std::shared_ptr< FileLocation >> | file_locations, | ||
std::set< std::tuple< WorkflowFile *, std::shared_ptr< FileLocation >, std::shared_ptr< FileLocation >>> | post_file_copies, | ||
std::set< std::tuple< WorkflowFile *, std::shared_ptr< FileLocation >>> | 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()
|
static |
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 units for a newly dispatched job.
- Parameters
-
job the job
- Returns
- A set of work units
◆ 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:
- /home/wrench/wrench/include/wrench/services/compute/workunit_executor/Workunit.h
- /home/wrench/wrench/src/wrench/helper_services/work_unit_executor/Workunit.cpp