mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use the failure flag of the tasklet runner to detect a failure while writing output and throw an error if that happens
This commit is contained in:
parent
c243620057
commit
e2126ae817
@ -598,20 +598,23 @@ doWriteOutput(const int reportStepNum,
|
|||||||
restartValue.addExtra(flores.name, UnitSystem::measure::rate, flores.values);
|
restartValue.addExtra(flores.name, UnitSystem::measure::rate, flores.values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// make sure that the previous I/O request has been completed
|
||||||
|
// and the number of incomplete tasklets does not increase between
|
||||||
|
// time steps
|
||||||
|
this->taskletRunner_->barrier();
|
||||||
|
|
||||||
// first, create a tasklet to write the data for the current time
|
// check if there might have been a failure in the TaskletRunner
|
||||||
// step to disk
|
if (this->taskletRunner_->failure()) {
|
||||||
|
throw std::runtime_error("Failure in the TaskletRunner while writing output.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// create a tasklet to write the data for the current time step to disk
|
||||||
auto eclWriteTasklet = std::make_shared<EclWriteTasklet>(
|
auto eclWriteTasklet = std::make_shared<EclWriteTasklet>(
|
||||||
actionState,
|
actionState,
|
||||||
isParallel ? this->collectOnIORank_.globalWellTestState() : std::move(localWTestState),
|
isParallel ? this->collectOnIORank_.globalWellTestState() : std::move(localWTestState),
|
||||||
summaryState, udqState, *this->eclIO_,
|
summaryState, udqState, *this->eclIO_,
|
||||||
reportStepNum, timeStepNum, isSubStep, curTime, std::move(restartValue), doublePrecision);
|
reportStepNum, timeStepNum, isSubStep, curTime, std::move(restartValue), doublePrecision);
|
||||||
|
|
||||||
// then, make sure that the previous I/O request has been completed
|
|
||||||
// and the number of incomplete tasklets does not increase between
|
|
||||||
// time steps
|
|
||||||
this->taskletRunner_->barrier();
|
|
||||||
|
|
||||||
// finally, start a new output writing job
|
// finally, start a new output writing job
|
||||||
this->taskletRunner_->dispatch(std::move(eclWriteTasklet));
|
this->taskletRunner_->dispatch(std::move(eclWriteTasklet));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user