From 5aab0dfb7bf7b3c056bd0100b3f4a2393ef52580 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Wed, 5 Sep 2018 16:03:51 +0200 Subject: [PATCH] Really only warn about CASENAME.[0-9]+.[A-Z]+. Previously we did warn about files not starting with CASENAME. --- opm/simulators/ParallelFileMerger.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opm/simulators/ParallelFileMerger.hpp b/opm/simulators/ParallelFileMerger.hpp index 052b9787a..097d8f52c 100644 --- a/opm/simulators/ParallelFileMerger.hpp +++ b/opm/simulators/ParallelFileMerger.hpp @@ -50,7 +50,8 @@ public: ParallelFileMerger(const fs::path& output_dir, const std::string& deckname) : debugFileRegex_(deckname+"\\.\\d+\\.DBG"), - logFileRegex_(deckname+"\\.\\d+\\.PRT") + logFileRegex_(deckname+"\\.\\d+\\.PRT"), + fileWarningRegex_(deckname+"\\.(\\d+)\\.[^.]+") { auto debugPath = output_dir; debugPath /= (deckname + ".DBG"); @@ -68,7 +69,7 @@ public: boost::smatch matches; std::string filename = file.filename().native(); - if ( boost::regex_match(filename, matches, regex) ) + if ( boost::regex_match(filename, matches, fileWarningRegex_) ) { std::string rank = boost::regex_replace(filename, regex, "\\1"); @@ -123,6 +124,8 @@ private: boost::regex debugFileRegex_; /// \brief Regex to capture *.PRT boost::regex logFileRegex_; + /// \brief Regex to capture CASENAME.[0-9]+.[A-Z]+ + boost::regex fileWarningRegex_; /// \brief Stream to *.DBG file std::unique_ptr debugStream_; /// \brief Stream to *.PRT file