Remove enforced inline schedule testing
This commit is contained in:
@@ -11,7 +11,6 @@ option(ENABLE_MOCKSIM "Build the mock simulator for io testing" ON)
|
||||
option(OPM_ENABLE_PYTHON "Enable python bindings?" OFF)
|
||||
option(OPM_INSTALL_PYTHON "Enable python bindings?" OFF)
|
||||
option(OPM_ENABLE_EMBEDDED_PYTHON "Enable python bindings?" OFF)
|
||||
option(ENABLE_SCHEDULE_DEBUG "Enable runtime integration testing of Schedule construction" OFF)
|
||||
|
||||
# Output implies input
|
||||
if(ENABLE_ECL_OUTPUT)
|
||||
|
||||
@@ -4,7 +4,7 @@ declare -A configurations
|
||||
|
||||
declare -A EXTRA_MODULE_FLAGS
|
||||
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_EBOS_EXTENSIONS=ON -DBUILD_EBOS_DEBUG_EXTENSIONS=ON -DBUILD_FLOW_VARIANTS=ON -DOPM_ENABLE_PYTHON=ON -DBUILD_FLOW_POLY_GRID=ON"
|
||||
EXTRA_MODULE_FLAGS[opm-common]="-DOPM_ENABLE_PYTHON=ON -DOPM_ENABLE_EMBEDDED_PYTHON=ON -DOPM_INSTALL_PYTHON=ON -DENABLE_SCHEDULE_DEBUG=ON"
|
||||
EXTRA_MODULE_FLAGS[opm-common]="-DOPM_ENABLE_PYTHON=ON -DOPM_ENABLE_EMBEDDED_PYTHON=ON -DOPM_INSTALL_PYTHON=ON"
|
||||
|
||||
# Parse revisions from trigger comment and setup arrays
|
||||
# Depends on: 'upstreams', upstreamRev',
|
||||
|
||||
@@ -122,39 +122,6 @@ namespace {
|
||||
} else
|
||||
this->iterateScheduleSection( 0, this->m_sched_deck.size(), parseContext, errors, false, nullptr, &grid, &fp);
|
||||
|
||||
/*
|
||||
The code in the #ifdef SCHEDULE_DEBUG is an enforced integration test
|
||||
to assert the sanity of the ongoing Schedule refactoring. This will be
|
||||
removed when the Schedule refactoring is complete.
|
||||
*/
|
||||
#ifdef SCHEDULE_DEBUG
|
||||
if (this->size() == 0)
|
||||
return;
|
||||
|
||||
// Verify that the time schedule is correct.
|
||||
for (std::size_t report_step = 0; report_step < this->size() - 1; report_step++) {
|
||||
const auto& this_block = this->m_sched_deck[report_step];
|
||||
if (this_block.start_time() != std::chrono::system_clock::from_time_t(this->m_timeMap[report_step])) {
|
||||
auto msg = fmt::format("Block: Bug in start_time for report_step: {} ", report_step);
|
||||
throw std::logic_error(msg);
|
||||
}
|
||||
|
||||
const auto& next_block = this->m_sched_deck[report_step + 1];
|
||||
if (this_block.end_time() != next_block.start_time())
|
||||
throw std::logic_error("Block: Internal bug in sched_block start / end inconsistent");
|
||||
|
||||
const auto& this_step = this->operator[](report_step);
|
||||
if (this_step.start_time() != std::chrono::system_clock::from_time_t(this->m_timeMap[report_step])) {
|
||||
auto msg = fmt::format("Bug in start_time for report_step: {} ", report_step);
|
||||
throw std::logic_error(msg);
|
||||
}
|
||||
|
||||
const auto& next_step = this->operator[](report_step + 1);
|
||||
if (this_step.end_time() != next_step.start_time())
|
||||
throw std::logic_error(
|
||||
fmt::format("Internal bug in sched_step start / end inconsistent report:{}", report_step));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
catch (const OpmInputError& opm_error) {
|
||||
throw;
|
||||
|
||||
Reference in New Issue
Block a user