additional output from compareECL related to rsm files

This commit is contained in:
Torbjørn Skille 2022-10-03 18:43:58 +02:00
parent cea1dea368
commit 16af572080
2 changed files with 18 additions and 2 deletions

View File

@ -213,8 +213,17 @@ void ERsm::load_block(std::deque<std::string>& lines, std::size_t& vector_length
double value;
if (keyword == "WSTAT")
value = convert_wstat(data_row[data_index + 1]);
else
value = std::stod(data_row[data_index + 1]) * mult_list[data_index + 1];
else {
try {
value = std::stod(data_row[data_index + 1]) * mult_list[data_index + 1];
} catch (...) {
std::string message = "Error loading RSM file. Not able to convert '";
message = message + data_row[data_index + 1] + "' to a float value";
throw std::runtime_error(message);
}
}
block_data[data_index].data.push_back(value);
}

View File

@ -1002,9 +1002,16 @@ void ECLRegressionTest::results_smry()
namespace fs = std::filesystem;
std::string rsm_file = rootName2 + ".RSM";
if (fs::is_regular_file(fs::path(rsm_file))) {
std::cout << "\nLoading RSM file " << rsm_file << " .... " << std::flush;
auto rsm = ERsm(rsm_file);
std::cout << " done " << std::endl << std::flush;;
std::cout << "\nComparing RSM file against SMRY file .... " << std::flush;
if (!cmp(smry2, rsm))
HANDLE_ERROR(std::runtime_error, "The RSM file did not compare equal to the summary file");
std::cout << " done " << std::endl << std::flush;;
}
} else {