WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
Public Types | Public Member Functions | Public Attributes | List of all members
wrench::StandardJob Class Reference

A standard (i.e., non-pilot) workflow job that can be submitted to a ComputeService by a WMS (via a JobManager) More...

#include <StandardJob.h>

Inheritance diagram for wrench::StandardJob:
wrench::Job

Public Types

enum  State {
  NOT_SUBMITTED, PENDING, RUNNING, COMPLETED,
  FAILED, TERMINATED
}
 Standard job states. More...
 

Public Member Functions

std::map< std::shared_ptr< DataFile >, std::vector< std::shared_ptr< FileLocation > > > getFileLocations ()
 Get the file location map for the job. More...
 
unsigned long getMinimumRequiredMemory () const
 Returns the minimum RAM capacity required to run the job (i.e., at least one task in the job cannot run if less ram than this minimum is available) More...
 
unsigned long getMinimumRequiredNumCores () const
 Returns the minimum number of cores required to run the job (i.e., at least one task in the job cannot run if fewer cores than this minimum are available) More...
 
unsigned long getNumCompletedTasks () const
 Get the number of completed tasks in the job. More...
 
unsigned long getNumTasks () const
 Get the number of tasks in the job. More...
 
double getPostJobOverheadInSeconds ()
 get the job's post-overhead More...
 
double getPreJobOverheadInSeconds ()
 get the job's pre-overhead More...
 
std::shared_ptr< StandardJobgetSharedPtr ()
 Get the shared pointer for this object. More...
 
StandardJob::State getState ()
 Get the state of the standard job. More...
 
std::vector< std::shared_ptr< WorkflowTask > > getTasks ()
 Get the workflow tasks in the job. More...
 
void setPostJobOverheadInSeconds (double overhead)
 sets the job's post-overhead More...
 
void setPreJobOverheadInSeconds (double overhead)
 sets the job's pre-overhead More...
 
bool usesScratch ()
 Determines whether the job's spec uses scratch space. More...
 
- Public Member Functions inherited from wrench::Job
virtual ~Job ()
 Destructor.
 
simgrid::s4u::Mailbox * getCallbackMailbox ()
 Get the job's "next" callback mailbox, without popping it. More...
 
double getEndDate ()
 Get the date at which the job ended (<0 means "never submitted") More...
 
std::string getName ()
 Get the job's name. More...
 
simgrid::s4u::Mailbox * getOriginCallbackMailbox ()
 Get the "origin" callback mailbox. More...
 
std::shared_ptr< ComputeServicegetParentComputeService ()
 Get the compute service that is running /ran the job. More...
 
double getPriority () const
 Get the job's priority (the higher the priority value, the higher the priority) More...
 
std::map< std::string, std::string > & getServiceSpecificArguments ()
 Return the service-specific arguments that are used during job submission. More...
 
double getSubmitDate ()
 Get the date at which the job was last submitted (<0 means "never submitted") More...
 
simgrid::s4u::Mailbox * popCallbackMailbox ()
 Get the "next" callback mailbox (returns the workflow mailbox if the mailbox stack is empty), and pops it. More...
 
void printCallbackMailboxStack ()
 Method to print the call back stack.
 
void pushCallbackMailbox (simgrid::s4u::Mailbox *mailbox)
 Pushes a callback mailbox. More...
 
void setParentComputeService (std::shared_ptr< ComputeService > compute_service)
 Set the parent compute service of the job. More...
 
virtual void setPriority (double priority)
 Set the job's priority (the higher the priority value, the higher the priority) More...
 

Public Attributes

std::vector< std::tuple< std::shared_ptr< DataFile >, std::shared_ptr< FileLocation > > > cleanup_file_deletions
 The ordered file deletion operations to perform at the end.
 
std::map< std::shared_ptr< DataFile >, std::vector< std::shared_ptr< FileLocation > > > file_locations
 The file locations that tasks should read/write files from/to. Each file is given a list of locations, in preferred order.
 
std::vector< std::tuple< std::shared_ptr< DataFile >, std::shared_ptr< FileLocation >, std::shared_ptr< FileLocation > > > post_file_copies
 The ordered file copy operations to perform after computational tasks.
 
std::vector< std::tuple< std::shared_ptr< DataFile >, std::shared_ptr< FileLocation >, std::shared_ptr< FileLocation > > > pre_file_copies
 The ordered file copy operations to perform before computational tasks.
 
std::vector< std::shared_ptr< WorkflowTask > > tasks
 The job's computational tasks.
 
double total_flops
 The job's total computational cost (in flops)
 

Additional Inherited Members

- Protected Member Functions inherited from wrench::Job
 Job (std::string name, std::shared_ptr< JobManager > job_manager)
 Constructor. More...
 
unsigned long getNewUniqueNumber ()
 Generate a unique number (for each newly generated job) More...
 
void setServiceSpecificArguments (std::map< std::string, std::string > args)
 Sets the service-specific arguments that are used during job submission. More...
 
- Protected Attributes inherited from wrench::Job
bool already_submitted_to_job_manager = false
 Whether the job has already been submitted to the job manager.
 
std::stack< simgrid::s4u::Mailbox * > callback_mailbox_stack
 Stack of callback mailboxes (to pop notifications)
 
double end_date
 The date at which the job ended (with success or failure)
 
std::shared_ptr< JobManagerjob_manager
 The Job Manager in charge of this job.
 
std::string name
 The job's name.
 
simgrid::s4u::Mailbox * originator_mailbox
 The originator's mailbox.
 
std::shared_ptr< ComputeServiceparent_compute_service
 The compute service to which the job was submitted.
 
double priority = 0.0
 The job's priority (the higher the number, the higher the priority)
 
std::map< std::string, std::string > service_specific_args
 Service-specific arguments used during job submission.
 
double submit_date
 The date at which the job was last submitted.
 

Detailed Description

A standard (i.e., non-pilot) workflow job that can be submitted to a ComputeService by a WMS (via a JobManager)

Member Enumeration Documentation

◆ State

Standard job states.

Enumerator
NOT_SUBMITTED 

Not submitted yet.

PENDING 

Submitted but not running yet.

RUNNING 

Running.

COMPLETED 

Completed successfully.

FAILED 

Failed.

TERMINATED 

Terminated by submitter.

Member Function Documentation

◆ getFileLocations()

std::map< std::shared_ptr< DataFile >, std::vector< std::shared_ptr< FileLocation > > > wrench::StandardJob::getFileLocations ( )

Get the file location map for the job.

Returns
a map of files to storage services

◆ getMinimumRequiredMemory()

unsigned long wrench::StandardJob::getMinimumRequiredMemory ( ) const

Returns the minimum RAM capacity required to run the job (i.e., at least one task in the job cannot run if less ram than this minimum is available)

Returns
the number of cores

◆ getMinimumRequiredNumCores()

unsigned long wrench::StandardJob::getMinimumRequiredNumCores ( ) const

Returns the minimum number of cores required to run the job (i.e., at least one task in the job cannot run if fewer cores than this minimum are available)

Returns
the number of cores

◆ getNumCompletedTasks()

unsigned long wrench::StandardJob::getNumCompletedTasks ( ) const

Get the number of completed tasks in the job.

Returns
the number of completed tasks

◆ getNumTasks()

unsigned long wrench::StandardJob::getNumTasks ( ) const

Get the number of tasks in the job.

Returns
the number of tasks

◆ getPostJobOverheadInSeconds()

double wrench::StandardJob::getPostJobOverheadInSeconds ( )

get the job's post-overhead

Returns
a number o seconds

◆ getPreJobOverheadInSeconds()

double wrench::StandardJob::getPreJobOverheadInSeconds ( )

get the job's pre-overhead

Returns
a number o seconds

◆ getSharedPtr()

std::shared_ptr<StandardJob> wrench::StandardJob::getSharedPtr ( )
inline

Get the shared pointer for this object.

Returns
a shared pointer to the object

◆ getState()

StandardJob::State wrench::StandardJob::getState ( )

Get the state of the standard job.

Returns
the state

◆ getTasks()

std::vector< std::shared_ptr< WorkflowTask > > wrench::StandardJob::getTasks ( )

Get the workflow tasks in the job.

Returns
a vector of workflow tasks

◆ setPostJobOverheadInSeconds()

void wrench::StandardJob::setPostJobOverheadInSeconds ( double  overhead)

sets the job's post-overhead

Parameters
overheadthe overhead in seconds

◆ setPreJobOverheadInSeconds()

void wrench::StandardJob::setPreJobOverheadInSeconds ( double  overhead)

sets the job's pre-overhead

Parameters
overheadthe overhead in seconds

◆ usesScratch()

bool wrench::StandardJob::usesScratch ( )

Determines whether the job's spec uses scratch space.

Returns

The documentation for this class was generated from the following files: