wrench::BatchJob
-
class wrench::BatchJob
A batch job, which encapsulates a Job and additional information used by a batch.
Public Functions
Constructor.
- Parameters
job – the compound job corresponding to the BatchComputeService job
job_id – the BatchComputeService job id
time_in_minutes – the requested execution time in minutes
num_nodes – the requested number of compute nodes (hosts)
cores_per_node – the requested number of cores per node
username – the username of the user submitting the job
ending_time_stamp – the job’s end date
arrival_time_stamp – the job’s arrival date
-
inline std::vector<int> getAllocatedNodeIndices()
Get the indices of allocated nodes.
- Returns
a list of indices
-
double getArrivalTimestamp() const
Get the arrival time stamp.
- Returns
a date
-
double getBeginTimestamp() const
Get the BatchComputeService job’s begin timestamp.
- Returns
a date
-
std::shared_ptr<CompoundJob> getCompoundJob()
Get the compound job corresponding to this BatchComputeService job.
- Returns
a compound job
-
double getEndingTimestamp() const
Get the BatchComputeService job’s end timestamp.
- Returns
a date
-
unsigned long getJobID() const
Get the id of this BatchComputeService job.
- Returns
a string id
-
double getMemoryRequirement()
Get the memory_manager_service requirement.
- Returns
a size in bytes
-
unsigned long getRequestedCoresPerNode() const
Get the requested number of cores per node.
- Returns
a number of cores
-
unsigned long getRequestedNumNodes() const
Get the number of requested compute nodes (or hosts)
- Returns
a number of nodes
-
unsigned long getRequestedTime() const
Get the requested time.
- Returns
a time in seconds
-
std::map<std::string, std::tuple<unsigned long, double>> 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
-
std::string getUsername()
Get the username.
- Returns
a username
-
inline void setAllocatedNodeIndices(std::vector<int> indices)
Set the indices of the allocated nodes.
- Parameters
indices – a list of indices
-
void setAllocatedResources(const std::map<std::string, std::tuple<unsigned long, double>> &resources)
Set the resources allocated to this BatchComputeService job.
- Parameters
resources – a list of resource, each as a <hostname, number of cores, bytes of RAM> tuple
-
void setBeginTimestamp(double time_stamp)
Set the BatchComputeService job’s begin timestamp.
- Parameters
time_stamp – a date
-
void setEndingTimestamp(double time_stamp)
Set the BatchComputeService job’s end timestamp.
- Parameters
time_stamp – a date
-
void setRequestedTime(unsigned long time)
Set the requested time.
- Parameters
time – a time in seconds