10 #ifndef WRENCH_COMPUTEACTION_H
11 #define WRENCH_COMPUTEACTION_H
15 #include "wrench/action/Action.h"
38 std::shared_ptr<CompoundJob> job,
41 unsigned long min_core,
42 unsigned long max_core,
43 std::shared_ptr<ParallelModel> parallel_model);
45 void execute(std::shared_ptr<ActionExecutor> action_executor)
override;
46 void terminate(std::shared_ptr<ActionExecutor> action_executor)
override;
50 unsigned long min_num_cores;
51 unsigned long max_num_cores;
53 std::shared_ptr<ParallelModel> parallel_model;
55 void simulateComputationAsSleep(std::shared_ptr<ActionExecutor> action_executor, std::vector<double> &work_per_thread);
56 void simulateComputationWithComputeThreads(std::shared_ptr<ActionExecutor> action_executor, std::vector<double> &work_per_thread);
58 std::vector<std::shared_ptr<ComputeThread>> compute_threads;
65 #endif //WRENCH_COMPUTEACTION_H
unsigned long getMinNumCores() const override
Returns the action's minimum number of required cores.
Definition: ComputeAction.cpp:64
unsigned long getMaxNumCores() const override
Returns the action's maximum number of required cores.
Definition: ComputeAction.cpp:72
Definition: Action.cpp:28
void terminate(std::shared_ptr< ActionExecutor > action_executor) override
Method called when the task terminates.
Definition: ComputeAction.cpp:115
double getMinRAMFootprint() const override
Returns the action's minimum required memory footprint.
Definition: ComputeAction.cpp:80
A class that implements a compute action.
Definition: ComputeAction.h:25
double getFlops() const
Returns the action's flops.
Definition: ComputeAction.cpp:56
ComputeAction(std::string name, std::shared_ptr< CompoundJob > job, double flops, double ram, unsigned long min_core, unsigned long max_core, std::shared_ptr< ParallelModel > parallel_model)
Constructor.
Definition: ComputeAction.cpp:35
std::shared_ptr< ParallelModel > getParallelModel() const
Returns the action's parallel model.
Definition: ComputeAction.cpp:88
void execute(std::shared_ptr< ActionExecutor > action_executor) override
Method to execute the task.
Definition: ComputeAction.cpp:96
An abstract class that implements the concept of an action.
Definition: Action.h:28
A compound job.
Definition: CompoundJob.h:47