wrench::BatchJob Class Reference

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

#include <BatchJob.h>

Public Member Functions

 BatchJob (std::shared_ptr< WorkflowJob > job, unsigned long job_id, unsigned long time_in_minutes, unsigned long number_nodes, unsigned long cores_per_node, std::string username, double ending_time_stamp, double arrival_time_stamp)
 Constructor. More...
 
std::vector< int > getAllocatedNodeIndices ()
 Get the indices of allocated nodes. 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_manager_service requirement. More...
 
unsigned long getRequestedCoresPerNode ()
 Get the requested number of cores per node. More...
 
unsigned long getRequestedNumNodes ()
 Get the number of requested compute nodes (or hosts) More...
 
unsigned long getRequestedTime ()
 Get the requested time. More...
 
std::map< std::string, std::tuple< unsigned long, double > > getResourcesAllocated ()
 Get the resources allocated to this batch job. More...
 
std::string getUsername ()
 Get the username. More...
 
std::shared_ptr< WorkflowJobgetWorkflowJob ()
 Get the workflow job corresponding to this batch job. More...
 
void setAllocatedNodeIndices (std::vector< int > indices)
 Set the indices of the allocated nodes. More...
 
void setAllocatedResources (std::map< std::string, std::tuple< unsigned long, double >> resources)
 Set the resources allocated to this batch job. More...
 
void setBeginTimestamp (double time_stamp)
 Set the batch job's begin timestamp. More...
 
void setEndingTimestamp (double time_stamp)
 Set the batch job's end timestamp. More...
 
void setRequestedTime (unsigned long time)
 Set the requested time. More...
 

Public Attributes

std::string csv_allocated_processors
 The allocated processors field for BatSim-style CSV output.
 
std::string csv_metadata
 The meta-data field for BatSim-style CSV output.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ BatchJob()

wrench::BatchJob::BatchJob ( std::shared_ptr< WorkflowJob job,
unsigned long  job_id,
unsigned long  time_in_minutes,
unsigned long  num_nodes,
unsigned long  cores_per_node,
std::string  username,
double  ending_time_stamp,
double  arrival_time_stamp 
)

Constructor.

Parameters
jobthe workflow job corresponding to the batch job
job_idthe 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
usernamethe username of the user submitting the job
ending_time_stampthe job's end date
arrival_time_stampthe job's arrival date

Member Function Documentation

◆ getAllocatedNodeIndices()

std::vector<int> wrench::BatchJob::getAllocatedNodeIndices ( )
inline

Get the indices of allocated nodes.

Returns
a list of indices

◆ 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_manager_service requirement.

Returns
a size in bytes

◆ getRequestedCoresPerNode()

unsigned long wrench::BatchJob::getRequestedCoresPerNode ( )

Get the requested number of cores per node.

Returns
a number of cores

◆ getRequestedNumNodes()

unsigned long wrench::BatchJob::getRequestedNumNodes ( )

Get the number of requested compute nodes (or hosts)

Returns
a number of nodes

◆ getRequestedTime()

unsigned long wrench::BatchJob::getRequestedTime ( )

Get the requested time.

Returns
a time in seconds

◆ 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

◆ getUsername()

std::string wrench::BatchJob::getUsername ( )

Get the username.

Returns
a username

◆ getWorkflowJob()

std::shared_ptr< WorkflowJob > wrench::BatchJob::getWorkflowJob ( )

Get the workflow job corresponding to this batch job.

Returns
a workflow job

◆ setAllocatedNodeIndices()

void wrench::BatchJob::setAllocatedNodeIndices ( std::vector< int >  indices)
inline

Set the indices of the allocated nodes.

Parameters
indicesa list of indices

◆ 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

◆ 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

◆ setRequestedTime()

void wrench::BatchJob::setRequestedTime ( unsigned long  time)

Set the requested time.

Parameters
timea time in seconds

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