wrench::BatchJob Class Reference

A batch job, which encapsulates a WorkflowJob and additional information used by a BatchService. More...

#include <BatchJob.h>

Public Member Functions

 BatchJob (WorkflowJob *job, unsigned long jobid, unsigned long time_in_minutes, unsigned long number_nodes, unsigned long cores_per_node, double ending_time_stamp, double arrival_time_stamp)
 Constructor. More...
 
unsigned long getAllocatedCoresPerNode ()
 Get the number of cores per node. More...
 
double getAllocatedTime ()
 Get the allocated time. More...
 
double getArrivalTimeStamp ()
 Get the arrival time stamp. More...
 
double getBeginTimeStamp ()
 Get the batch job's begin timestamp. More...
 
double getEndingTimeStamp ()
 Get the batch job's end timestamp. More...
 
unsigned long getJobID ()
 Get the id of this batch job. More...
 
double getMemoryRequirement ()
 Get the memory requirement. More...
 
unsigned long getNumNodes ()
 Get the number of allocated compute nodes (or hosts) More...
 
std::map< std::string, std::tuple< unsigned long, double > > getResourcesAllocated ()
 Get the resources allocated to this batch job. More...
 
WorkflowJobgetWorkflowJob ()
 Get the workflow job corresponding to this batch job. More...
 
void setAllocatedResources (std::map< std::string, std::tuple< unsigned long, double >>)
 Set the resources allocated to this batch job. More...
 
void setAllocatedTime (double)
 Set the allocated time. More...
 
void setBeginTimeStamp (double)
 Set the batch job's begin timestamp. More...
 
void setEndingTimeStamp (double)
 Set the batch job's end timestamp. More...
 

Public Attributes

std::string csv_allocated_processors
 
std::string csv_metadata
 

Detailed Description

A batch job, which encapsulates a WorkflowJob and additional information used by a BatchService.

Constructor & Destructor Documentation

◆ BatchJob()

wrench::BatchJob::BatchJob ( WorkflowJob job,
unsigned long  jobid,
unsigned long  time_in_minutes,
unsigned long  num_nodes,
unsigned long  cores_per_node,
double  ending_time_stamp,
double  arrival_time_stamp 
)

Constructor.

Parameters
jobthe workflow job corresponding to the batch job
jobidthe batch job id
time_in_minutesthe requested execution time in minutes
num_nodesthe requested number of compute nodes (hosts)
cores_per_nodethe requested number of cores per node
ending_time_stampthe job's end date
arrival_time_stampthe job's arrival date

Member Function Documentation

◆ getAllocatedCoresPerNode()

unsigned long wrench::BatchJob::getAllocatedCoresPerNode ( )

Get the number of cores per node.

Returns
a number of cores

◆ getAllocatedTime()

double wrench::BatchJob::getAllocatedTime ( )

Get the allocated time.

Returns
a time in seconds

◆ getArrivalTimeStamp()

double wrench::BatchJob::getArrivalTimeStamp ( )

Get the arrival time stamp.

Returns
a date

◆ getBeginTimeStamp()

double wrench::BatchJob::getBeginTimeStamp ( )

Get the batch job's begin timestamp.

Returns
a date

◆ getEndingTimeStamp()

double wrench::BatchJob::getEndingTimeStamp ( )

Get the batch job's end timestamp.

Returns
a date

◆ getJobID()

unsigned long wrench::BatchJob::getJobID ( )

Get the id of this batch job.

Returns
a string id

◆ getMemoryRequirement()

double wrench::BatchJob::getMemoryRequirement ( )

Get the memory requirement.

Returns
a size in bytes

◆ getNumNodes()

unsigned long wrench::BatchJob::getNumNodes ( )

Get the number of allocated compute nodes (or hosts)

Returns
a number of nodes

◆ getResourcesAllocated()

std::map< std::string, std::tuple< unsigned long, double > > wrench::BatchJob::getResourcesAllocated ( )

Get the resources allocated to this batch job.

Returns
a list of resource, each as a <hostname, number of cores, bytes of RAM> tuple

◆ getWorkflowJob()

WorkflowJob * wrench::BatchJob::getWorkflowJob ( )

Get the workflow job corresponding to this batch job.

Returns
a workflow job

◆ setAllocatedResources()

void wrench::BatchJob::setAllocatedResources ( std::map< std::string, std::tuple< unsigned long, double >>  resources)

Set the resources allocated to this batch job.

Parameters
resourcesa list of resource, each as a <hostname, number of cores, bytes of RAM> tuple

◆ setAllocatedTime()

void wrench::BatchJob::setAllocatedTime ( double  time)

Set the allocated time.

Parameters
timea time in seconds

◆ setBeginTimeStamp()

void wrench::BatchJob::setBeginTimeStamp ( double  time_stamp)

Set the batch job's begin timestamp.

Parameters
time_stampa date

◆ setEndingTimeStamp()

void wrench::BatchJob::setEndingTimeStamp ( double  time_stamp)

Set the batch job's end timestamp.

Parameters
time_stampa date

The documentation for this class was generated from the following files:
  • /Users/rafsilva/Documents/isi/workspace/wrench/wrench/include/wrench/services/compute/batch/BatchJob.h
  • /Users/rafsilva/Documents/isi/workspace/wrench/wrench/src/wrench/services/compute/batch/BatchJob.cpp