Merge pull request #969 from andlaus/reset_locale

flow*: reset the locale settings on startup
This commit is contained in:
Andreas Lauser 2016-12-08 18:02:47 +01:00 committed by GitHub
commit c7807a99a2
2 changed files with 10 additions and 0 deletions

View File

@ -82,6 +82,7 @@
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
#include <opm/common/ResetLocale.hpp>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
@ -133,6 +134,10 @@ namespace Opm
/// flow.cpp.
int execute(int argc, char** argv)
try {
// we always want to use the default locale, and thus spare us the trouble
// with incorrect locale settings.
resetLocale();
// Setup.
asImpl().setupParallelism(argc, argv);
asImpl().printStartupMessage();

View File

@ -39,6 +39,7 @@
#include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/common/OpmLog/EclipsePRTLog.hpp>
#include <opm/common/OpmLog/LogUtil.hpp>
#include <opm/common/ResetLocale.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
@ -74,6 +75,10 @@ namespace Opm
int execute(int argc, char** argv)
{
try {
// we always want to use the default locale, and thus spare us the trouble
// with incorrect locale settings.
resetLocale();
setupParallelism(argc, argv);
printStartupMessage();
const bool ok = setupParameters(argc, argv);