From 732d86613e924ebd5b019124f668f7dec83c6d7e Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Sat, 3 Mar 2018 13:04:14 +0100 Subject: [PATCH 1/2] do not mess around with GCC's optimizations generally, this is a bad idea because GCC is very good at determining which optimizations should be enabled or not and also, this may interfere with some compilers. (e.g., it produces a warning on icc) --- opm/autodiff/VFPHelpers.hpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/opm/autodiff/VFPHelpers.hpp b/opm/autodiff/VFPHelpers.hpp index fb4afc51a..5cdf43d61 100644 --- a/opm/autodiff/VFPHelpers.hpp +++ b/opm/autodiff/VFPHelpers.hpp @@ -324,12 +324,6 @@ inline VFPEvaluation operator*( /** * Helper function which interpolates data using the indices etc. given in the inputs. */ -#ifdef __GNUC__ -#pragma GCC push_options -#pragma GCC optimize ("unroll-loops") -#endif - - inline VFPEvaluation interpolate( const VFPProdTable::array_type& array, const InterpData& flo_i, @@ -502,17 +496,6 @@ inline VFPEvaluation interpolate( return nn[0][0]; } - - - -#ifdef __GNUC__ -#pragma GCC pop_options //unroll loops -#endif - - - - - inline VFPEvaluation bhp(const VFPProdTable* table, const double& aqua, const double& liquid, From 999653783b39bf5dae81b374c308c517f94243f1 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Sat, 3 Mar 2018 13:22:11 +0100 Subject: [PATCH 2/2] do not name exception objects if they are not used ICC rightfully produces a warning here... --- opm/autodiff/BlackoilModelEbos.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/autodiff/BlackoilModelEbos.hpp b/opm/autodiff/BlackoilModelEbos.hpp index af57eadd9..8ef241357 100644 --- a/opm/autodiff/BlackoilModelEbos.hpp +++ b/opm/autodiff/BlackoilModelEbos.hpp @@ -369,7 +369,7 @@ namespace Opm { // the reservoir equations as a source term. wellModel().assemble(iterationIdx, dt); } - catch ( const Dune::FMatrixError& e ) + catch ( const Dune::FMatrixError& ) { OPM_THROW(Opm::NumericalIssue,"Error encounted when solving well equations"); }