class wrench::ActionExecutor : public wrench::ExecutionController
An service that performs an Action.
hostname – the name of the host on which the action executor will run
num_cores – the number of cores
ram_footprint – the RAM footprint
thread_creation_overhead – the thread creation overhead in seconds
simulate_computation_as_sleep – whether to simulate computation as sleep
callback_mailbox – the callback mailbox to which a “action done” or “action failed” message will be sent
action – the action to perform
action_execution_service – the parent action execution service
virtual void cleanup(bool has_returned_from_main, int return_value) override
Cleanup method that implements the cleanup basics.
has_returned_from_main – true if main has returned
return_value – main’s return value
Returns the executor’s action.
std::shared_ptr<ActionExecutionService> getActionExecutionService() const
Get the action execution service that started this action executor (or nullptr if stand-alone action executor)
an action execution service
double getMemoryAllocated() const
Return the action executor’s allocated RAM.
a number of bytes
unsigned long getNumCoresAllocated() const
Return the action executor’s allocated nuber of cores.
a number of cores
Returns whether computation should be simulated as sleep.
true or false
Return the executor’s thread creation overhead.
an overhead (in seconds)
void kill(bool job_termination)
Kill the worker thread.
job_termination – if the reason for being killed is that the job was terminated by the submitter (as opposed to being terminated because the above service was also terminated).
virtual int main() override
Main method of the action executor.
1 if a failure timestamp should be generated, 0 otherwise