*
* @param host Where to create the process.
* @param name The name of the process.
- * @param args The arguments of main method of the process.
+ * @param argsParam The arguments of main method of the process.
*/
public Process(Host host, String name, String[]argsParam)
{
/* let's see which tasks are done */
for (auto const& model : *all_existing_models) {
surf_action_t action = surf_model_extract_done_action_set(model);
- while (action != nullptr) {
+ while (action != nullptr && action->getData() != nullptr) {
SD_task_t task = static_cast<SD_task_t>(action->getData());
XBT_VERB("Task '%s' done", SD_task_get_name(task));
SD_task_set_state(task, SD_DONE);
}
/** @brief Start a new execution on this CPU lasting @param size flops and using one core */
-CpuAction *CpuCas01::execution_start(double size)
+CpuAction* CpuCas01::execution_start(double size)
{
return new CpuCas01Action(model(), size, isOff(), speed_.scale * speed_.peak, constraint());
}
+
CpuAction* CpuCas01::execution_start(double size, int requestedCores)
{
return new CpuCas01Action(model(), size, isOff(), speed_.scale * speed_.peak, constraint(), requestedCores);
CpuCas01(CpuCas01Model *model, simgrid::s4u::Host *host, std::vector<double> *speedPerPstate, int core);
~CpuCas01() override;
void apply_event(tmgr_trace_event_t event, double value) override;
- CpuAction *execution_start(double size) override;
+ CpuAction* execution_start(double size) override;
CpuAction* execution_start(double size, int requestedCore) override;
- CpuAction *sleep(double duration) override;
+ CpuAction* sleep(double duration) override;
bool isUsed() override;
~CpuL07() override;
bool isUsed() override;
void apply_event(tmgr_trace_event_t event, double value) override;
- Action *execution_start(double size) override;
- Action *sleep(double duration) override;
+ Action* execution_start(double size) override;
+ Action* sleep(double duration) override;
+
protected:
void onSpeedChange() override;
};