From 76eab9e1608e4f59d23c9691bf3023acb29257db Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 19 Jun 2019 11:57:56 +0200 Subject: [PATCH 1/2] fixed: unused variable warning without MPI --- ebos/eclwriter.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ebos/eclwriter.hh b/ebos/eclwriter.hh index 123c9db07..c284cca3b 100644 --- a/ebos/eclwriter.hh +++ b/ebos/eclwriter.hh @@ -294,9 +294,8 @@ public: } if (collectToIORank_.isParallel()) { - unsigned long buffer_size = buffer.size(); - #ifdef HAVE_MPI + unsigned long buffer_size = buffer.size(); MPI_Bcast(&buffer_size, 1, MPI_UNSIGNED_LONG, collectToIORank_.ioRank, MPI_COMM_WORLD); if (!collectToIORank_.isIORank()) buffer.resize( buffer_size ); From 34bcccef9c7e034e7bfda51221c8c6dbc1f8eba3 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 18 Jun 2019 08:50:53 +0200 Subject: [PATCH 2/2] remove unused variables quells warnings --- opm/simulators/wells/StandardWell_impl.hpp | 5 +---- opm/simulators/wells/WellConnectionAuxiliaryModule.hpp | 1 - tests/test_ecl_output.cc | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index cdf4311d9..a3f356f2c 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -606,10 +606,8 @@ namespace Opm // change temperature for injecting fluids if (well_type_ == INJECTOR && cq_s[activeCompIdx] > 0.0){ - auto injectorType = this->well_ecl_.injectorType(); - // only handles single phase injection now - assert(injectorType != WellInjector::MULTI); + assert(this->well_ecl_.injectorType() != WellInjector::MULTI); fs.setTemperature(this->well_ecl_.temperature()); typedef typename std::decay::type::Scalar FsScalar; typename FluidSystem::template ParameterCache paramCache; @@ -2005,7 +2003,6 @@ namespace Opm } const unsigned canonicalCompIdx = FluidSystem::solventComponentIndex(phaseIdx); - const std::string& compName = FluidSystem::componentName(canonicalCompIdx); const int compIdx = Indices::canonicalToActiveComponentIndex(canonicalCompIdx); if (std::isnan(well_flux_residual[compIdx])) { diff --git a/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp b/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp index a5d35ba65..726f2fd47 100644 --- a/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp +++ b/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp @@ -60,7 +60,6 @@ public: cartesianToCompressed[ *cell ] = cell - begin; } - int last_time_step = schedule.getTimeMap().size() - 1; const auto& schedule_wells = schedule.getWells2atEnd(); wells_.reserve(schedule_wells.size()); diff --git a/tests/test_ecl_output.cc b/tests/test_ecl_output.cc index e5cbf1bf6..bc008453b 100644 --- a/tests/test_ecl_output.cc +++ b/tests/test_ecl_output.cc @@ -83,8 +83,6 @@ SET_BOOL_PROP(TestEclOutputTypeTag, EnableAsyncEclOutput, false); END_PROPERTIES -static const int day = 24 * 60 * 60; - template std::unique_ptr initSimulator(const char *filename)