From 542a10e426a9c999e36969df82cabf4c889ec493 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 13 Mar 2020 10:19:28 +0100 Subject: [PATCH 1/5] remove old serialization support for Equil, EquilRecord --- opm/simulators/utils/ParallelRestart.cpp | 74 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 4 -- tests/test_ParallelRestart.cpp | 4 +- 3 files changed, 2 insertions(+), 80 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 6e61d22ec..3a2a3261a 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -541,11 +540,6 @@ std::size_t packSize(const TableContainer& data, Dune::MPIHelper::MPICommunicato return res; } -std::size_t packSize(const Equil& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.records(), comm); -} - std::size_t packSize(const FoamConfig& data, Dune::MPIHelper::MPICommunicator comm) { return packSize(data.records(), comm) + @@ -1447,20 +1441,6 @@ std::size_t packSize(const PvtwsaltTable& data, packSize(data.getTableValues(), comm); } -std::size_t packSize(const EquilRecord& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.datumDepth(), comm) + - packSize(data.datumDepthPressure(), comm) + - packSize(data.waterOilContactDepth(), comm) + - packSize(data.waterOilContactCapillaryPressure(), comm) + - packSize(data.gasOilContactDepth(), comm) + - packSize(data.gasOilContactCapillaryPressure(), comm) + - packSize(data.liveOilInitConstantRs(), comm) + - packSize(data.wetGasInitConstantRv(), comm) + - packSize(data.initializationTargetAccuracy(), comm); -} - std::size_t packSize(const FoamData& data, Dune::MPIHelper::MPICommunicator comm) { @@ -2001,12 +1981,6 @@ void pack(const TableContainer& data, std::vector& buffer, int& position, } } -void pack(const Equil& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.records(), buffer, position, comm); -} - void pack(const FoamConfig& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -2936,21 +2910,6 @@ void pack(const PvtwsaltTable& data, pack(data.getTableValues(), buffer, position, comm); } -void pack(const EquilRecord& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.datumDepth(), buffer, position, comm); - pack(data.datumDepthPressure(), buffer, position, comm); - pack(data.waterOilContactDepth(), buffer, position, comm); - pack(data.waterOilContactCapillaryPressure(), buffer, position, comm); - pack(data.gasOilContactDepth(), buffer, position, comm); - pack(data.gasOilContactCapillaryPressure(), buffer, position, comm); - pack(data.liveOilInitConstantRs(), buffer, position, comm); - pack(data.wetGasInitConstantRv(), buffer, position, comm); - pack(data.initializationTargetAccuracy(), buffer, position, comm); -} - void pack(const FoamData& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -3607,14 +3566,6 @@ void unpack(TableContainer& data, std::vector& buffer, int& position, } } -void unpack(Equil& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::vector records; - unpack(records, buffer, position, comm); - data = Equil(records); -} - void unpack(FoamConfig& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -5022,31 +4973,6 @@ void unpack(PvtwsaltTable& data, std::vector& buffer, int& position, data = PvtwsaltTable(refPressValue, refSaltConValue, tableValues); } -void unpack(EquilRecord& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - double datumDepth, datumDepthPressure, waterOilContactDepth; - double waterOilContactCapillaryPressure, gasOilContactDepth; - double gasOilContactCapillaryPressure; - bool liveOilInitConstantRs, wetGasInitConstantRv; - int initializationTargetAccuracy; - - unpack(datumDepth, buffer, position, comm); - unpack(datumDepthPressure, buffer, position, comm); - unpack(waterOilContactDepth, buffer, position, comm); - unpack(waterOilContactCapillaryPressure, buffer, position, comm); - unpack(gasOilContactDepth, buffer, position, comm); - unpack(gasOilContactCapillaryPressure, buffer, position, comm); - unpack(liveOilInitConstantRs, buffer, position, comm); - unpack(wetGasInitConstantRv, buffer, position, comm); - unpack(initializationTargetAccuracy, buffer, position, comm); - data = EquilRecord(datumDepth, datumDepthPressure, waterOilContactDepth, - waterOilContactCapillaryPressure, gasOilContactDepth, - gasOilContactCapillaryPressure, liveOilInitConstantRs, - wetGasInitConstantRv, initializationTargetAccuracy); -} - void unpack(FoamData& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 884fbd696..586c3331d 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -79,8 +79,6 @@ class EclHysterConfig; class EclipseConfig; class Eqldims; class EndpointScaling; -class Equil; -class EquilRecord; class Events; class FoamConfig; class FoamData; @@ -519,9 +517,7 @@ ADD_PACK_PROTOTYPES(Dimension) ADD_PACK_PROTOTYPES(EclHysterConfig) ADD_PACK_PROTOTYPES(EclipseConfig) ADD_PACK_PROTOTYPES(EndpointScaling) -ADD_PACK_PROTOTYPES(Equil) ADD_PACK_PROTOTYPES(Eqldims) -ADD_PACK_PROTOTYPES(EquilRecord) ADD_PACK_PROTOTYPES(Events) ADD_PACK_PROTOTYPES(FoamConfig) ADD_PACK_PROTOTYPES(FoamData) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index dd870c120..00269e5be 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -793,7 +793,7 @@ BOOST_AUTO_TEST_CASE(EquilRecord) { #if HAVE_MPI Opm::EquilRecord val1 = getEquilRecord(); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(EquilRecord) #endif } @@ -803,7 +803,7 @@ BOOST_AUTO_TEST_CASE(Equil) { #if HAVE_MPI Opm::Equil val1({getEquilRecord(), getEquilRecord()}); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(Equil) #endif } From 0dfdb2985175d734bc59bff62dc7e04651f3435a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 13 Mar 2020 10:21:26 +0100 Subject: [PATCH 2/5] remove old serialization support for FoamConfig, FoamData --- opm/simulators/utils/ParallelRestart.cpp | 67 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 4 -- tests/test_ParallelRestart.cpp | 4 +- 3 files changed, 2 insertions(+), 73 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 3a2a3261a..d88f92949 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -540,13 +539,6 @@ std::size_t packSize(const TableContainer& data, Dune::MPIHelper::MPICommunicato return res; } -std::size_t packSize(const FoamConfig& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.records(), comm) + - packSize(data.getTransportPhase(), comm) + - packSize(data.getMobilityModel(), comm); -} - std::size_t packSize(const InitConfig& data, Dune::MPIHelper::MPICommunicator comm) { return packSize(data.getEquil(), comm) + @@ -1441,16 +1433,6 @@ std::size_t packSize(const PvtwsaltTable& data, packSize(data.getTableValues(), comm); } -std::size_t packSize(const FoamData& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.referenceSurfactantConcentration(), comm) + - packSize(data.exponent(), comm) + - packSize(data.minimumSurfactantConcentration(), comm) + - packSize(data.allowDesorption(), comm) + - packSize(data.rockDensity(), comm); -} - std::size_t packSize(const RestartSchedule& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1981,14 +1963,6 @@ void pack(const TableContainer& data, std::vector& buffer, int& position, } } -void pack(const FoamConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.records(), buffer, position, comm); - pack(data.getTransportPhase(), buffer, position, comm); - pack(data.getMobilityModel(), buffer, position, comm); -} - void pack(const InitConfig& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -2910,17 +2884,6 @@ void pack(const PvtwsaltTable& data, pack(data.getTableValues(), buffer, position, comm); } -void pack(const FoamData& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.referenceSurfactantConcentration(), buffer, position, comm); - pack(data.exponent(), buffer, position, comm); - pack(data.minimumSurfactantConcentration(), buffer, position, comm); - pack(data.allowDesorption(), buffer, position, comm); - pack(data.rockDensity(), buffer, position, comm); -} - void pack(const RestartSchedule& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -3566,18 +3529,6 @@ void unpack(TableContainer& data, std::vector& buffer, int& position, } } -void unpack(FoamConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::vector records; - Phase transport_phase; - FoamConfig::MobilityModel mobility_model; - unpack(records, buffer, position, comm); - unpack(transport_phase, buffer, position, comm); - unpack(mobility_model, buffer, position, comm); - data = FoamConfig(records, transport_phase, mobility_model); -} - void unpack(InitConfig& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -4973,24 +4924,6 @@ void unpack(PvtwsaltTable& data, std::vector& buffer, int& position, data = PvtwsaltTable(refPressValue, refSaltConValue, tableValues); } -void unpack(FoamData& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - double referenceSurfactantConcentration, exponent; - double minimumSurfactantConcentration; - bool allowDesorption; - double rockDensity; - - unpack(referenceSurfactantConcentration, buffer, position, comm); - unpack(exponent, buffer, position, comm); - unpack(minimumSurfactantConcentration, buffer, position, comm); - unpack(allowDesorption, buffer, position, comm); - unpack(rockDensity, buffer, position, comm); - data = FoamData(referenceSurfactantConcentration, exponent, - minimumSurfactantConcentration, allowDesorption, rockDensity); -} - void unpack(RestartSchedule& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 586c3331d..1fffec738 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -80,8 +80,6 @@ class EclipseConfig; class Eqldims; class EndpointScaling; class Events; -class FoamConfig; -class FoamData; class InitConfig; class IOConfig; template class IOrderSet; @@ -519,8 +517,6 @@ ADD_PACK_PROTOTYPES(EclipseConfig) ADD_PACK_PROTOTYPES(EndpointScaling) ADD_PACK_PROTOTYPES(Eqldims) ADD_PACK_PROTOTYPES(Events) -ADD_PACK_PROTOTYPES(FoamConfig) -ADD_PACK_PROTOTYPES(FoamData) ADD_PACK_PROTOTYPES(GConSale) ADD_PACK_PROTOTYPES(GConSale::GCONSALEGroup) ADD_PACK_PROTOTYPES(GConSump) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 00269e5be..10cc15002 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -813,7 +813,7 @@ BOOST_AUTO_TEST_CASE(FoamData) { #if HAVE_MPI Opm::FoamData val1 = getFoamData(); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(FoamData) #endif } @@ -823,7 +823,7 @@ BOOST_AUTO_TEST_CASE(FoamConfig) { #if HAVE_MPI Opm::FoamConfig val1 = getFoamConfig(); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(FoamConfig) #endif } From fbe739ec9bc203697d572f6edca1e85778dd8d00 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 13 Mar 2020 10:22:25 +0100 Subject: [PATCH 3/5] remove old serialization support for InitConfig --- opm/simulators/utils/ParallelRestart.cpp | 43 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 2 -- tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 46 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index d88f92949..cd1a97609 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -539,17 +538,6 @@ std::size_t packSize(const TableContainer& data, Dune::MPIHelper::MPICommunicato return res; } -std::size_t packSize(const InitConfig& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.getEquil(), comm) + - packSize(data.getFoamConfig(), comm) + - packSize(data.filleps(), comm) + - packSize(data.hasGravity(), comm) + - packSize(data.restartRequested(), comm) + - packSize(data.getRestartStep(), comm) + - packSize(data.getRestartRootName(), comm); -} - std::size_t packSize(const TimeMap& data, Dune::MPIHelper::MPICommunicator comm) { return packSize(data.timeList(), comm); @@ -1963,18 +1951,6 @@ void pack(const TableContainer& data, std::vector& buffer, int& position, } } -void pack(const InitConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.getEquil(), buffer, position, comm); - pack(data.getFoamConfig(), buffer, position, comm); - pack(data.filleps(), buffer, position, comm); - pack(data.hasGravity(), buffer, position, comm); - pack(data.restartRequested(), buffer, position, comm); - pack(data.getRestartStep(), buffer, position, comm); - pack(data.getRestartRootName(), buffer, position, comm); -} - void pack(const TimeMap& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -3529,25 +3505,6 @@ void unpack(TableContainer& data, std::vector& buffer, int& position, } } -void unpack(InitConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - Equil equil; - FoamConfig foam; - bool filleps, hasGravity, restartRequested; - int restartStep; - std::string restartRootName; - unpack(equil, buffer, position, comm); - unpack(foam, buffer, position, comm); - unpack(filleps, buffer, position, comm); - unpack(hasGravity, buffer, position, comm); - unpack(restartRequested, buffer, position, comm); - unpack(restartStep, buffer, position, comm); - unpack(restartRootName, buffer, position, comm); - data = InitConfig(equil, foam, filleps, hasGravity, - restartRequested, restartStep, restartRootName); -} - void unpack(TimeMap& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 1fffec738..b5977e912 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -80,7 +80,6 @@ class EclipseConfig; class Eqldims; class EndpointScaling; class Events; -class InitConfig; class IOConfig; template class IOrderSet; class JFunc; @@ -528,7 +527,6 @@ ADD_PACK_PROTOTYPES(GuideRateModel) ADD_PACK_PROTOTYPES(Group) ADD_PACK_PROTOTYPES(Group::GroupInjectionProperties) ADD_PACK_PROTOTYPES(Group::GroupProductionProperties) -ADD_PACK_PROTOTYPES(InitConfig) ADD_PACK_PROTOTYPES(IOConfig) ADD_PACK_PROTOTYPES(JFunc) ADD_PACK_PROTOTYPES(Location) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 10cc15002..e3921a54a 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -835,7 +835,7 @@ BOOST_AUTO_TEST_CASE(InitConfig) Opm::InitConfig val1(Opm::Equil({getEquilRecord(), getEquilRecord()}), getFoamConfig(), true, true, true, 20, "test1"); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(InitConfig) #endif } From 4d5d25bcb6b6205a2c4270a8b038a9555db37e73 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 13 Mar 2020 10:23:29 +0100 Subject: [PATCH 4/5] remove old serialization support for IOConfig --- opm/simulators/utils/ParallelRestart.cpp | 58 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 2 - tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 61 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index cd1a97609..47733c5b9 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -553,22 +552,6 @@ std::size_t packSize(const RestartConfig& data, Dune::MPIHelper::MPICommunicator packSize(data.saveKeywords(), comm); } -std::size_t packSize(const IOConfig& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.getWriteINITFile(), comm) + - packSize(data.getWriteEGRIDFile(), comm) + - packSize(data.getUNIFIN(), comm) + - packSize(data.getUNIFOUT(), comm) + - packSize(data.getFMTIN(), comm) + - packSize(data.getFMTOUT(), comm) + - packSize(data.getDeckFileName(), comm) + - packSize(data.getOutputEnabled(), comm) + - packSize(data.getOutputDir(), comm) + - packSize(data.getNoSim(), comm) + - packSize(data.getBaseName(), comm) + - packSize(data.getEclCompatibleRST(), comm); -} - std::size_t packSize(const Phases& data, Dune::MPIHelper::MPICommunicator comm) { return packSize(data.getBits(), comm); @@ -1968,23 +1951,6 @@ void pack(const RestartConfig& data, std::vector& buffer, int& position, pack(data.saveKeywords(), buffer, position, comm); } -void pack(const IOConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.getWriteINITFile(), buffer, position, comm); - pack(data.getWriteEGRIDFile(), buffer, position, comm); - pack(data.getUNIFIN(), buffer, position, comm); - pack(data.getUNIFOUT(), buffer, position, comm); - pack(data.getFMTIN(), buffer, position, comm); - pack(data.getFMTOUT(), buffer, position, comm); - pack(data.getDeckFileName(), buffer, position, comm); - pack(data.getOutputEnabled(), buffer, position, comm); - pack(data.getOutputDir(), buffer, position, comm); - pack(data.getNoSim(), buffer, position, comm); - pack(data.getBaseName(), buffer, position, comm); - pack(data.getEclCompatibleRST(), buffer, position, comm); -} - void pack(const Phases& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -3533,30 +3499,6 @@ void unpack(RestartConfig& data, std::vector& buffer, int& position, restart_keyw, save_keyw); } -void unpack(IOConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - bool write_init, write_egrid, unifin, unifout, fmtin, fmtout; - std::string deck_name, output_dir, base_name; - bool output_enabled, no_sim, ecl_compatible_rst; - - unpack(write_init, buffer, position, comm); - unpack(write_egrid, buffer, position, comm); - unpack(unifin, buffer, position, comm); - unpack(unifout, buffer, position, comm); - unpack(fmtin, buffer, position, comm); - unpack(fmtout, buffer, position, comm); - unpack(deck_name, buffer, position, comm); - unpack(output_enabled, buffer, position, comm); - unpack(output_dir, buffer, position, comm); - unpack(no_sim, buffer, position, comm); - unpack(base_name, buffer, position, comm); - unpack(ecl_compatible_rst, buffer, position, comm); - data = IOConfig(write_init, write_egrid, unifin, unifout, fmtin, fmtout, - deck_name, output_enabled, output_dir, - no_sim, base_name, ecl_compatible_rst); -} - void unpack(Phases& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index b5977e912..71222f605 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -80,7 +80,6 @@ class EclipseConfig; class Eqldims; class EndpointScaling; class Events; -class IOConfig; template class IOrderSet; class JFunc; class Location; @@ -527,7 +526,6 @@ ADD_PACK_PROTOTYPES(GuideRateModel) ADD_PACK_PROTOTYPES(Group) ADD_PACK_PROTOTYPES(Group::GroupInjectionProperties) ADD_PACK_PROTOTYPES(Group::GroupProductionProperties) -ADD_PACK_PROTOTYPES(IOConfig) ADD_PACK_PROTOTYPES(JFunc) ADD_PACK_PROTOTYPES(Location) ADD_PACK_PROTOTYPES(MessageLimits) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index e3921a54a..60f1fff1b 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -901,7 +901,7 @@ BOOST_AUTO_TEST_CASE(IOConfig) #if HAVE_MPI Opm::IOConfig val1(true, false, true, false, false, true, "test1", true, "test2", true, "test3", false); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(IOConfig) #endif } From d1b04944d7a9ebb4a4a0d54f2eb1aad12a15014a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 13 Mar 2020 10:24:19 +0100 Subject: [PATCH 5/5] remove old serialization support for EclipseConfig --- opm/simulators/utils/ParallelRestart.cpp | 28 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 2 -- tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 47733c5b9..c424f6533 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -23,7 +23,6 @@ #include "ParallelRestart.hpp" #include -#include #include #include #include @@ -1477,13 +1476,6 @@ std::size_t packSize(const GuideRateConfig::GroupTarget& data, packSize(data.target, comm); } -std::size_t packSize(const EclipseConfig& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.init(), comm) + - packSize(data.io(), comm); -} - std::size_t packSize(const SolventDensityTable& data, Dune::MPIHelper::MPICommunicator comm) { @@ -2907,14 +2899,6 @@ void pack(const GuideRateConfig::GroupTarget& data, pack(data.target, buffer, position, comm); } -void pack(const EclipseConfig& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.init(), buffer, position, comm); - pack(data.io(), buffer, position, comm); -} - void pack(const SolventDensityTable& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -4920,18 +4904,6 @@ void unpack(GuideRateConfig::GroupTarget& data, unpack(data.target, buffer, position, comm); } -void unpack(EclipseConfig& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - InitConfig init; - IOConfig io; - - unpack(init, buffer, position, comm); - unpack(io, buffer, position, comm); - data = EclipseConfig(init, io); -} - void unpack(SolventDensityTable& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 71222f605..55ac34756 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -76,7 +76,6 @@ class DENSITYRecord; class DensityTable; class Dimension; class EclHysterConfig; -class EclipseConfig; class Eqldims; class EndpointScaling; class Events; @@ -511,7 +510,6 @@ ADD_PACK_PROTOTYPES(DenT) ADD_PACK_PROTOTYPES(DenT::entry) ADD_PACK_PROTOTYPES(Dimension) ADD_PACK_PROTOTYPES(EclHysterConfig) -ADD_PACK_PROTOTYPES(EclipseConfig) ADD_PACK_PROTOTYPES(EndpointScaling) ADD_PACK_PROTOTYPES(Eqldims) ADD_PACK_PROTOTYPES(Events) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 60f1fff1b..7fa76ed78 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -2267,7 +2267,7 @@ BOOST_AUTO_TEST_CASE(EclipseConfig) true, true, true, 20, "test1"); Opm::EclipseConfig val1{init, io}; - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(EclipseConfig) #endif }