From 2c1d45ea549a7f769f4394071c7de4557516e2a4 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 17 Mar 2020 15:40:52 +0100 Subject: [PATCH] remove old serialization support for ActionX --- opm/simulators/utils/ParallelRestart.cpp | 56 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 2 - tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 59 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index bda564b09..76df7a843 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -688,20 +687,6 @@ std::size_t packSize(const Action::Condition& data, packSize(data.cmp_string, comm); } -std::size_t packSize(const Action::ActionX& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.name(), comm) + - packSize(data.max_run(), comm) + - packSize(data.min_wait(), comm) + - packSize(data.start_time(), comm) + - packSize(data.getKeywords(), comm) + - packSize(data.getCondition(), comm) + - packSize(data.conditions(), comm) + - packSize(data.getRunCount(), comm) + - packSize(data.getLastRun(), comm); -} - std::size_t packSize(const Action::Actions& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1374,21 +1359,6 @@ void pack(const Action::Condition& data, pack(data.cmp_string, buffer, position, comm); } -void pack(const Action::ActionX& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.name(), buffer, position, comm); - pack(data.max_run(), buffer, position, comm); - pack(data.min_wait(), buffer, position, comm); - pack(data.start_time(), buffer, position, comm); - pack(data.getKeywords(), buffer, position, comm); - pack(data.getCondition(), buffer, position, comm); - pack(data.conditions(), buffer, position, comm); - pack(data.getRunCount(), buffer, position, comm); - pack(data.getLastRun(), buffer, position, comm); -} - void pack(const Action::Actions& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -2298,32 +2268,6 @@ void unpack(Action::Condition& data, std::vector& buffer, int& position, unpack(data.cmp_string, buffer, position, comm); } -void unpack(Action::ActionX& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::string name; - size_t max_run; - double min_wait; - std::time_t start_time; - std::vector keywords; - Action::AST condition; - std::vector conditions; - size_t run_count; - std::time_t last_run; - - unpack(name, buffer, position, comm); - unpack(max_run, buffer, position, comm); - unpack(min_wait, buffer, position, comm); - unpack(start_time, buffer, position, comm); - unpack(keywords, buffer, position, comm); - unpack(condition, buffer, position, comm); - unpack(conditions, buffer, position, comm); - unpack(run_count, buffer, position, comm); - unpack(last_run, buffer, position, comm); - data = Action::ActionX(name, max_run, min_wait, start_time, keywords, - condition, conditions, run_count, last_run); -} - void unpack(Action::Actions& 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 bbd753edd..52140455b 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -45,7 +45,6 @@ namespace Opm namespace Action { class Actions; - class ActionX; class AST; class Condition; class Quantity; @@ -388,7 +387,6 @@ void unpack(char* str, std::size_t length, std::vector& buffer, int& posit Dune::MPIHelper::MPICommunicator comm); ADD_PACK_PROTOTYPES(Action::Actions) -ADD_PACK_PROTOTYPES(Action::ActionX) ADD_PACK_PROTOTYPES(Action::AST) ADD_PACK_PROTOTYPES(Action::Condition) ADD_PACK_PROTOTYPES(Action::Quantity) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 191648022..eafe8af35 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -2040,7 +2040,7 @@ BOOST_AUTO_TEST_CASE(ActionX) { #ifdef HAVE_MPI Opm::Action::ActionX val1 = getActionX(); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(Action::ActionX) #endif }