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

A batch_standard_and_pilot_jobs job, which encapsulates a Job and additional information used by a batch_standard_and_pilot_jobs. More...

#include <BatchJob.h>

Public Member Functions

 BatchJob (std::shared_ptr< CompoundJob > 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 BatchComputeService job's begin timestamp. More...
 
std::shared_ptr< CompoundJobgetCompoundJob ()
 Get the compound job corresponding to this BatchComputeService job. More...
 
double getEndingTimestamp ()
 Get the BatchComputeService job's end timestamp. More...
 
unsigned long getJobID ()
 Get the id of this BatchComputeService 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 BatchComputeService job. More...
 
std::string getUsername ()
 Get the username. 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 BatchComputeService job. More...
 
void setBeginTimestamp (double time_stamp)
 Set the BatchComputeService job's begin timestamp. More...
 
void setEndingTimestamp (double time_stamp)
 Set the BatchComputeService 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_standard_and_pilot_jobs job, which encapsulates a Job and additional information used by a batch_standard_and_pilot_jobs.

Constructor & Destructor Documentation

◆ BatchJob()

wrench::BatchJob::BatchJob ( std::shared_ptr< CompoundJob 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 compound job corresponding to the BatchComputeService job
job_idthe BatchComputeService 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 BatchComputeService job's begin timestamp.

Returns
a date

◆ getCompoundJob()

std::shared_ptr< CompoundJob > wrench::BatchJob::getCompoundJob ( )

Get the compound job corresponding to this BatchComputeService job.

Returns
a compound job

◆ getEndingTimestamp()

double wrench::BatchJob::getEndingTimestamp ( )

Get the BatchComputeService job's end timestamp.

Returns
a date

◆ getJobID()

unsigned long wrench::BatchJob::getJobID ( )

Get the id of this BatchComputeService 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 BatchComputeService 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

◆ 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 BatchComputeService 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 BatchComputeService job's begin timestamp.

Parameters
time_stampa date

◆ setEndingTimestamp()

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

Set the BatchComputeService 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: