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...
 
StandardJobgetJob ()
 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.
 
StandardJobjob
 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.
 
WorkflowTasktask = 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
jobthe job this workunit belongs to
pre_file_copiesa set of file copy actions to perform in sequence first
taska WorkflowTask
file_locationslocations where tasks should read/write files
post_file_copiesa set of file copy actions to perform in sequence after all tasks
cleanup_file_deletionsa set of file deletion actions to perform last

Member Function Documentation

◆ addDependency()

void wrench::Workunit::addDependency ( Workunit parent,
Workunit child 
)
static

Add a dependency between two work units (does nothing if the dependency already exists)

Parameters
parentthe parent work unit
childthe child work unit
Exceptions
std::invalid_argument

◆ createWorkunits()

std::set< std::unique_ptr< Workunit > > wrench::Workunit::createWorkunits ( StandardJob job)
static

Create all work for a newly dispatched job.

Parameters
jobthe 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