From 1e5a07d42af2cb3fc8b8cbcac51f77380d83457a Mon Sep 17 00:00:00 2001 From: alberto sartori Date: Mon, 23 May 2016 14:46:21 +0200 Subject: [PATCH 1/2] implemented checkpoint-restart --- include/pidomus.h | 88 +++- source/pidomus.cc | 32 +- source/pidomus_checkpoint_restart.cc | 411 ++++++++++++++++++ source/pidomus_eigen.cc | 1 - source/pidomus_helper_functions.cc | 7 +- source/pidomus_parameters.cc | 19 + tests/checkpoint_restart_01.cc | 30 ++ ...t_01.with_zlib.with_mpi=on.mpirun=3.output | 8 + tests/checkpoint_restart_02.cc | 34 ++ ...t_02.with_zlib.with_mpi=on.mpirun=3.output | 8 + tests/checkpoint_restart_03.cc | 31 ++ tests/checkpoint_restart_03.output | 2 + tests/checkpoint_restart_04.cc | 32 ++ tests/checkpoint_restart_04.output | 2 + tests/parameters/checkpoint_restart_01.prm | 173 ++++++++ tests/parameters/checkpoint_restart_02.prm | 173 ++++++++ tests/parameters/checkpoint_restart_03.prm | 173 ++++++++ tests/parameters/checkpoint_restart_04.prm | 173 ++++++++ tests/snapshots/__dealii__test___restart.mesh | Bin 0 -> 3456 bytes .../__dealii__test___restart.mesh.info | 2 + .../__dealii__test___restart.resume.z | Bin 0 -> 78 bytes tests/snapshots/__dealii__test___y.bin | Bin 0 -> 2318 bytes tests/snapshots/__dealii__test___y_dot.bin | Bin 0 -> 2318 bytes tests/snapshots/__dealii__test___y_expl.bin | Bin 0 -> 2318 bytes .../snapshots/__trilinos__test___restart.mesh | Bin 0 -> 29088 bytes .../__trilinos__test___restart.mesh.info | 2 + .../__trilinos__test___restart.mesh.info.old | 2 + .../__trilinos__test___restart.mesh.old | Bin 0 -> 29088 bytes .../__trilinos__test___restart.resume.z | Bin 0 -> 83 bytes .../__trilinos__test___restart.resume.z.old | Bin 0 -> 83 bytes 30 files changed, 1387 insertions(+), 16 deletions(-) create mode 100644 source/pidomus_checkpoint_restart.cc create mode 100644 tests/checkpoint_restart_01.cc create mode 100644 tests/checkpoint_restart_01.with_zlib.with_mpi=on.mpirun=3.output create mode 100644 tests/checkpoint_restart_02.cc create mode 100644 tests/checkpoint_restart_02.with_zlib.with_mpi=on.mpirun=3.output create mode 100644 tests/checkpoint_restart_03.cc create mode 100644 tests/checkpoint_restart_03.output create mode 100644 tests/checkpoint_restart_04.cc create mode 100644 tests/checkpoint_restart_04.output create mode 100644 tests/parameters/checkpoint_restart_01.prm create mode 100644 tests/parameters/checkpoint_restart_02.prm create mode 100644 tests/parameters/checkpoint_restart_03.prm create mode 100644 tests/parameters/checkpoint_restart_04.prm create mode 100644 tests/snapshots/__dealii__test___restart.mesh create mode 100644 tests/snapshots/__dealii__test___restart.mesh.info create mode 100644 tests/snapshots/__dealii__test___restart.resume.z create mode 100644 tests/snapshots/__dealii__test___y.bin create mode 100644 tests/snapshots/__dealii__test___y_dot.bin create mode 100644 tests/snapshots/__dealii__test___y_expl.bin create mode 100644 tests/snapshots/__trilinos__test___restart.mesh create mode 100644 tests/snapshots/__trilinos__test___restart.mesh.info create mode 100644 tests/snapshots/__trilinos__test___restart.mesh.info.old create mode 100644 tests/snapshots/__trilinos__test___restart.mesh.old create mode 100644 tests/snapshots/__trilinos__test___restart.resume.z create mode 100644 tests/snapshots/__trilinos__test___restart.resume.z.old diff --git a/include/pidomus.h b/include/pidomus.h index e5e9455e..b14fff93 100644 --- a/include/pidomus.h +++ b/include/pidomus.h @@ -17,23 +17,17 @@ #include -// #include #include #include #include - - #include - -// #include - - #include "base_interface.h" #include "simulator_access.h" #include "pidomus_signals.h" +#include "copy_data.h" #include #include @@ -522,6 +516,86 @@ class piDoMUS : public ParameterAcceptor, public SundialsInterfacesource/checkpoint_restart.cc. + */ + void create_snapshot() const; + + void save_solutions_and_triangulation(const LADealII::VectorType &y, + const LADealII::VectorType &y_dot, + const LADealII::VectorType &locally_relevant_y_expl, + const LADealII::VectorType &, + const LADealII::VectorType &) const; + + void save_solutions_and_triangulation(const LATrilinos::VectorType &y, + const LATrilinos::VectorType &y_dot, + const LATrilinos::VectorType &locally_relevant_y_expl, + const LATrilinos::VectorType &, + const LATrilinos::VectorType &) const; + + + /** + * Restore the state of this program from a set of files in the output + * directory. + * + * This function is implemented in + * source/checkpoint_restart.cc. + */ + void resume_from_snapshot(); + + void load_solutions(LADealII::VectorType &y, + LADealII::VectorType &y_expl, + LADealII::VectorType &y_dot); + + void load_solutions(LATrilinos::VectorType &y, + LATrilinos::VectorType &y_expl, + LATrilinos::VectorType &y_dot); + +public: + /** + * Save a number of variables using BOOST serialization mechanism. + * + * This function is implemented in + * source/checkpoint_restart.cc. + */ + template + void serialize (Archive &ar, const unsigned int /*version*/); + +private: + + + + /** * Struct containing the signals */ diff --git a/source/pidomus.cc b/source/pidomus.cc index 180addaf..6540002d 100644 --- a/source/pidomus.cc +++ b/source/pidomus.cc @@ -100,7 +100,9 @@ piDoMUS::piDoMUS (const std::string &name, ida(*this), euler(*this), - we_are_parallel(Utilities::MPI::n_mpi_processes(comm) > 1) + we_are_parallel(Utilities::MPI::n_mpi_processes(comm) > 1), + step_number(0), + old_step(0) { interface.initialize_simulator (*this); @@ -123,15 +125,31 @@ void piDoMUS::run () interface.connect_to_signals(); - for (current_cycle = 0; current_cycle < n_cycles; ++current_cycle) + if (resume_computation) { - if (current_cycle == 0) + resume_from_snapshot(); + + syncronize(current_time,solution,solution_dot); + ida.set_initial_time(current_time); + euler.set_initial_time(current_time+current_dt); + } + + current_cycle = (resume_computation? current_cycle : 0); + old_step = (resume_computation? step_number : 0); + + for (; current_cycle < n_cycles; ++current_cycle) + { + if (!resume_computation) { - make_grid_fe(); - setup_dofs(true); + if (current_cycle == 0) + { + make_grid_fe(); + setup_dofs(true); + } + else + refine_mesh(); } - else - refine_mesh(); + resume_computation = false; constraints.distribute(solution); constraints_dot.distribute(solution_dot); diff --git a/source/pidomus_checkpoint_restart.cc b/source/pidomus_checkpoint_restart.cc new file mode 100644 index 00000000..222bf5c9 --- /dev/null +++ b/source/pidomus_checkpoint_restart.cc @@ -0,0 +1,411 @@ +#include "pidomus.h" +#include "pidomus_macros.h" + +#include + +#include + +#include + +#ifdef DEAL_II_WITH_ZLIB +#include +#endif + +#include +#include + +using namespace dealii; +using namespace deal2lkit; + +template +void piDoMUS::create_snapshot() const +{ + auto _timer = computing_timer.scoped_timer ("Create snapshot"); + unsigned int my_id = Utilities::MPI::this_mpi_process (comm); + + if (my_id == 0) + { + // if we have previously written a snapshot, then keep the last + // snapshot in case this one fails to save. Note: static variables + // will only be initialied once per model run. + static bool previous_snapshot_exists = + (resume_computation == true && file_exists(snap_prefix+"restart.mesh")); + + if (previous_snapshot_exists == true) + { + copy_file (snap_prefix + "restart.mesh", + snap_prefix + "restart.mesh.old"); + copy_file (snap_prefix + "restart.mesh.info", + snap_prefix + "restart.mesh.info.old"); + copy_file (snap_prefix + "restart.resume.z", + snap_prefix + "restart.resume.z.old"); + } + // from now on, we know that if we get into this + // function again that a snapshot has previously + // been written + previous_snapshot_exists = true; + } + + + typename LAC::VectorType tmp(solution); + tmp = locally_relevant_explicit_solution; + + // save triangulation and solution vectors + save_solutions_and_triangulation(solution, + solution_dot, + locally_relevant_explicit_solution, + locally_relevant_solution, + locally_relevant_solution_dot); + +// save general information. This calls serialize() on all +// processes but only writes to the restart file on process 0 + { + std::ostringstream oss; + + // serialize into a stringstream + boost::archive::binary_oarchive oa (oss); + oa << (*this); + + // compress with zlib and write to file on the root processor +#ifdef DEAL_II_WITH_ZLIB + if (my_id == 0) + { + uLongf compressed_data_length = compressBound (oss.str().length()); + std::vector compressed_data (compressed_data_length); + int err = compress2 ((Bytef *) &compressed_data[0], + &compressed_data_length, + (const Bytef *) oss.str().data(), + oss.str().length(), + Z_BEST_COMPRESSION); + (void)err; + Assert (err == Z_OK, ExcInternalError()); + + // build compression header + const uint32_t compression_header[4] + = { 1, /* number of blocks */ + (uint32_t)oss.str().length(), /* size of block */ + (uint32_t)oss.str().length(), /* size of last block */ + (uint32_t)compressed_data_length + }; /* list of compressed sizes of blocks */ + + std::ofstream f ((snap_prefix + "restart.resume.z").c_str()); + f.write((const char *)compression_header, 4 * sizeof(compression_header[0])); + f.write((char *)&compressed_data[0], compressed_data_length); + } +#else + AssertThrow (false, + ExcMessage ("You need to have deal.II configured with the 'libz' " + "option to support checkpoint/restart, but deal.II " + "did not detect its presence when you called 'cmake'.")); +#endif + + } + pcout << "*** Snapshot created!" << std::endl << std::endl; +} + + +template +void +piDoMUS:: +save_solutions_and_triangulation(const LADealII::VectorType &y, + const LADealII::VectorType &y_dot, + const LADealII::VectorType &y_expl, + const LADealII::VectorType &, + const LADealII::VectorType &) const +{ + std::string sy = snap_prefix+"y.bin"; + std::string sdot = snap_prefix+"y_dot.bin"; + std::string sexpl = snap_prefix+"y_expl.bin"; + const char *file_y = sy.c_str(); + const char *file_y_dot = sdot.c_str(); + const char *file_y_expl = sexpl.c_str(); + + if (file_exists(file_y)) + copy_file(file_y,snap_prefix+"y.bin.old"); + if (file_exists(file_y_dot)) + copy_file(file_y_dot,snap_prefix+"y_dot.bin.old"); + if (file_exists(file_y_expl)) + copy_file(file_y_expl,snap_prefix+"y_expl.bin.old"); + + std::ofstream out_y (file_y); + std::ofstream out_y_dot (file_y_dot); + std::ofstream out_y_expl (file_y_expl); + + y.block_write(out_y); + out_y.close(); + + y_dot.block_write(out_y_dot); + out_y_dot.close(); + + y_expl.block_write(out_y_expl); + out_y_expl.close(); + + triangulation->save ((snap_prefix + "restart.mesh").c_str()); +} + +template +void +piDoMUS:: +save_solutions_and_triangulation(const LATrilinos::VectorType &, + const LATrilinos::VectorType &, + const LATrilinos::VectorType &y_expl, + const LATrilinos::VectorType &y, + const LATrilinos::VectorType &y_dot) const +{ + std::vector x_system (3); + x_system[0] = &y; + x_system[1] = &y_dot; + x_system[2] = &y_expl; + + + parallel::distributed::SolutionTransfer > + system_trans (*dof_handler); + + system_trans.prepare_serialization (x_system); + + triangulation->save ((snap_prefix + "restart.mesh").c_str()); +} + + +template +void piDoMUS::resume_from_snapshot() +{ + // first check existence of the two restart files + { + const std::string filename = snap_prefix + "restart.mesh"; + std::ifstream in (filename.c_str()); + if (!in) + AssertThrow (false, + ExcMessage (std::string("You are trying to restart a previous computation, " + "but the restart file <") + + + filename + + + "> does not appear to exist!")); + } + { + const std::string filename = snap_prefix + "restart.resume.z"; + std::ifstream in (filename.c_str()); + if (!in) + AssertThrow (false, + ExcMessage (std::string("You are trying to restart a previous computation, " + "but the restart file <") + + + filename + + + "> does not appear to exist!")); + } + + pcout << "*** Resuming from snapshot!" << std::endl << std::endl; + + // first try to load from the most recent snapshot (i.e., without "old" suffix) + triangulation = SP(pgg.distributed(comm)); + try + { + triangulation->load ((snap_prefix + "restart.mesh").c_str()); + } + catch (...) + { + try + { + copy_file (snap_prefix + "restart.mesh.old", + snap_prefix + "restart.mesh"); + copy_file (snap_prefix + "restart.mesh.info.old", + snap_prefix + "restart.mesh.info"); + copy_file (snap_prefix + "restart.resume.z.old", + snap_prefix + "restart.resume.z"); + triangulation->load ((snap_prefix + "restart.mesh").c_str()); + } + catch (...) + { + AssertThrow(false, ExcMessage("Cannot open snapshot mesh file or read the triangulation stored there.")); + } + } + dof_handler = SP(new DoFHandler(*triangulation)); + fe = SP(interface.pfe()); + setup_dofs(false); + + load_solutions(locally_relevant_solution, + locally_relevant_solution_dot, + locally_relevant_explicit_solution); + solution= locally_relevant_solution; + solution_dot = locally_relevant_solution_dot; + // read zlib compressed resume.z + try + { +#ifdef DEAL_II_WITH_ZLIB + std::ifstream ifs ((snap_prefix + "restart.resume.z").c_str()); + + AssertThrow(ifs.is_open(), + ExcMessage("Cannot open snapshot resume file.")); + + uint32_t compression_header[4]; + ifs.read((char *)compression_header, 4 * sizeof(compression_header[0])); + Assert(compression_header[0]==1, ExcInternalError()); + + std::vector compressed(compression_header[3]); + std::vector uncompressed(compression_header[1]); + ifs.read(&compressed[0],compression_header[3]); + uLongf uncompressed_size = compression_header[1]; + + const int err = uncompress((Bytef *)&uncompressed[0], &uncompressed_size, + (Bytef *)&compressed[0], compression_header[3]); + AssertThrow (err == Z_OK, + ExcMessage (std::string("Uncompressing the data buffer resulted in an error with code <") + + + Utilities::int_to_string(err))); + + { + std::istringstream ss; + ss.str(std::string (&uncompressed[0], uncompressed_size)); + boost::archive::binary_iarchive ia (ss); + ia >> (*this); + } +#else + AssertThrow (false, + ExcMessage ("You need to have deal.II configured with the 'libz' " + "option to support checkpoint/restart, but deal.II " + "did not detect its presence when you called 'cmake'.")); +#endif + } + catch (std::exception &e) + { + AssertThrow (false, + ExcMessage (std::string("Cannot seem to deserialize the data previously stored!\n") + + + "Some part of the machinery generated an exception that says <" + + + e.what() + + + ">")); + } +} + + +template +void +piDoMUS::load_solutions(LATrilinos::VectorType &y, + LATrilinos::VectorType &y_dot, + LATrilinos::VectorType &y_expl) +{ + LATrilinos::VectorType distributed_system; + LATrilinos::VectorType expl_distributed_system; + LATrilinos::VectorType distributed_system_dot; + + distributed_system.reinit(partitioning,comm); + expl_distributed_system.reinit(partitioning,comm); + distributed_system_dot.reinit(partitioning,comm); + + + std::vector x_system (3); + x_system[0] = & (distributed_system); + x_system[1] = & (distributed_system_dot); + x_system[2] = & (expl_distributed_system); + + parallel::distributed::SolutionTransfer > + system_trans (*dof_handler); + + system_trans.deserialize (x_system); + + y = distributed_system; + y_expl = expl_distributed_system; + y_dot = distributed_system_dot; + +} + + +template +void +piDoMUS::load_solutions(LADealII::VectorType &y, + LADealII::VectorType &y_dot, + LADealII::VectorType &y_expl) +{ + try + { + std::string sy = snap_prefix+"y.bin"; + std::string sdot = snap_prefix+"y_dot.bin"; + std::string sexpl = snap_prefix+"y_expl.bin"; + const char *file_y = sy.c_str(); + const char *file_y_dot = sdot.c_str(); + const char *file_y_expl = sexpl.c_str(); + + std::ifstream in_y (file_y); + std::ifstream in_y_dot (file_y_dot); + std::ifstream in_y_expl (file_y_expl); + + y.block_read(in_y); + in_y.close(); + + y_dot.block_read(in_y_dot); + in_y_dot.close(); + + y_expl.block_read(in_y_expl); + in_y_expl.close(); + } + catch (...) + { + std::string sy = snap_prefix+"y.bin.old"; + std::string sdot = snap_prefix+"y_dot.bin.old"; + std::string sexpl = snap_prefix+"y_expl.bin.old"; + const char *file_y = sy.c_str(); + const char *file_y_dot = sdot.c_str(); + const char *file_y_expl = sexpl.c_str(); + + std::ifstream in_y (file_y); + std::ifstream in_y_dot (file_y_dot); + std::ifstream in_y_expl (file_y_expl); + + y.block_read(in_y); + in_y.close(); + + y_dot.block_read(in_y_dot); + in_y_dot.close(); + + y_expl.block_read(in_y_expl); + in_y_expl.close(); + } + +} + +// BOOST_CLASS_TRACKING (aspect::Simulator<2>, boost::serialization::track_never) +// BOOST_CLASS_TRACKING (aspect::Simulator<3>, boost::serialization::track_never) + +template +template +void +piDoMUS::serialize (Archive &ar, const unsigned int /*version*/) +{ + ar ¤t_time; + ar ¤t_alpha; + ar ¤t_dt; + ar &step_number; + ar ¤t_cycle; +} + + +// instantiate all but serialize() +#define INSTANTIATE(dim,spacedim,LAC) \ + template void piDoMUS::resume_from_snapshot(); \ + template void piDoMUS::create_snapshot() const; \ + template void piDoMUS::save_solutions_and_triangulation(const LADealII::VectorType &y, \ + const LADealII::VectorType &y_dot, \ + const LADealII::VectorType &y_expl, \ + const LADealII::VectorType &, \ + const LADealII::VectorType &) const; \ + template void piDoMUS::save_solutions_and_triangulation(const LATrilinos::VectorType &, \ + const LATrilinos::VectorType &, \ + const LATrilinos::VectorType &y_expl, \ + const LATrilinos::VectorType &y, \ + const LATrilinos::VectorType &y_dot) const; \ + template void piDoMUS::load_solutions(LADealII::VectorType &y, \ + LADealII::VectorType &y_expl, \ + LADealII::VectorType &y_dot); \ + template void piDoMUS::load_solutions(LATrilinos::VectorType &y, \ + LATrilinos::VectorType &y_expl, \ + LATrilinos::VectorType &y_dot); + + + + + +PIDOMUS_INSTANTIATE(INSTANTIATE) diff --git a/source/pidomus_eigen.cc b/source/pidomus_eigen.cc index 51e5f28d..9323fa4b 100644 --- a/source/pidomus_eigen.cc +++ b/source/pidomus_eigen.cc @@ -30,7 +30,6 @@ #include - #include "lac/lac_initializer.h" using namespace dealii; diff --git a/source/pidomus_helper_functions.cc b/source/pidomus_helper_functions.cc index 255b56c1..f5246727 100644 --- a/source/pidomus_helper_functions.cc +++ b/source/pidomus_helper_functions.cc @@ -216,8 +216,13 @@ piDoMUS::output_step(const double t, syncronize(t,solution,solution_dot); + this->step_number = old_step + step_number; + + if (save_snapshot) + create_snapshot(); + interface.output_solution(current_cycle, - step_number); + this->step_number); } diff --git a/source/pidomus_parameters.cc b/source/pidomus_parameters.cc index 8336fde9..ecb27d47 100644 --- a/source/pidomus_parameters.cc +++ b/source/pidomus_parameters.cc @@ -146,6 +146,25 @@ declare_parameters (ParameterHandler &prm) "|smallest_imaginary_part" "|both_ends")); #endif + + add_parameter (prm, + &resume_computation, + "Resume computation from snapshot", + "false", + Patterns::Bool()); + + add_parameter(prm, + &snap_prefix, + "Snapshot prefix", + "", + Patterns::Anything()); + + add_parameter (prm, + &save_snapshot, + "Save snapshots during simulation", + "true", + Patterns::Bool()); + } diff --git a/tests/checkpoint_restart_01.cc b/tests/checkpoint_restart_01.cc new file mode 100644 index 00000000..0c4e3ecb --- /dev/null +++ b/tests/checkpoint_restart_01.cc @@ -0,0 +1,30 @@ +#include "pidomus.h" +#include "interfaces/poisson_problem_signals.h" +#include "tests.h" + +using namespace dealii; +int main (int argc, char *argv[]) +{ + + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, + numbers::invalid_unsigned_int); + + MPILogInitAll log; + deallog.depth_file(1); + + const int dim = 2; + const int spacedim = 2; + + PoissonProblem p; + piDoMUS solver ("pidomus",p); + ParameterAcceptor::initialize(SOURCE_DIR "/parameters/checkpoint_restart_01.prm", "used_parameters.prm"); + + + solver.run (); + + auto sol = solver.get_solution(); + deallog.depth_file(10); + deallog << sol.l2_norm() << std::endl; + + return 0; +} diff --git a/tests/checkpoint_restart_01.with_zlib.with_mpi=on.mpirun=3.output b/tests/checkpoint_restart_01.with_zlib.with_mpi=on.mpirun=3.output new file mode 100644 index 00000000..021d8f53 --- /dev/null +++ b/tests/checkpoint_restart_01.with_zlib.with_mpi=on.mpirun=3.output @@ -0,0 +1,8 @@ + +DEAL:0::1.99593 + +DEAL:1::1.99593 + + +DEAL:2::1.99593 + diff --git a/tests/checkpoint_restart_02.cc b/tests/checkpoint_restart_02.cc new file mode 100644 index 00000000..7d4e3916 --- /dev/null +++ b/tests/checkpoint_restart_02.cc @@ -0,0 +1,34 @@ +#include "pidomus.h" +#include "interfaces/poisson_problem_signals.h" +#include "tests.h" + + +// test that we can write snapshots +using namespace dealii; +int main (int argc, char *argv[]) +{ + + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, + numbers::invalid_unsigned_int); + + MPILogInitAll log; + deallog.depth_file(1); + + deallog.depth_file(1); + const int dim = 2; + const int spacedim = 2; + + PoissonProblem p; + piDoMUS solver ("pidomus",p); + ParameterAcceptor::initialize(SOURCE_DIR "/parameters/checkpoint_restart_02.prm", "used_parameters.prm"); + + + solver.run (); + + deallog.depth_file(10); + + deallog << "OK" << std::endl; + + + return 0; +} diff --git a/tests/checkpoint_restart_02.with_zlib.with_mpi=on.mpirun=3.output b/tests/checkpoint_restart_02.with_zlib.with_mpi=on.mpirun=3.output new file mode 100644 index 00000000..3342d14f --- /dev/null +++ b/tests/checkpoint_restart_02.with_zlib.with_mpi=on.mpirun=3.output @@ -0,0 +1,8 @@ + +DEAL:0::OK + +DEAL:1::OK + + +DEAL:2::OK + diff --git a/tests/checkpoint_restart_03.cc b/tests/checkpoint_restart_03.cc new file mode 100644 index 00000000..ee1fcbd8 --- /dev/null +++ b/tests/checkpoint_restart_03.cc @@ -0,0 +1,31 @@ +#include "pidomus.h" +#include "interfaces/poisson_problem_signals.h" +#include "tests.h" + + +// test that we can write snapshots +using namespace dealii; +int main (int argc, char *argv[]) +{ + + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, + numbers::invalid_unsigned_int); + + initlog(); + deallog.depth_file(1); + + const int dim = 2; + const int spacedim = 2; + + PoissonProblem p; + piDoMUS solver ("pidomus",p); + ParameterAcceptor::initialize(SOURCE_DIR "/parameters/checkpoint_restart_03.prm", "used_parameters.prm"); + + + solver.run (); + + deallog.depth_file(10); + deallog << "OK" << std::endl; + + return 0; +} diff --git a/tests/checkpoint_restart_03.output b/tests/checkpoint_restart_03.output new file mode 100644 index 00000000..0fd8fc12 --- /dev/null +++ b/tests/checkpoint_restart_03.output @@ -0,0 +1,2 @@ + +DEAL::OK diff --git a/tests/checkpoint_restart_04.cc b/tests/checkpoint_restart_04.cc new file mode 100644 index 00000000..49553509 --- /dev/null +++ b/tests/checkpoint_restart_04.cc @@ -0,0 +1,32 @@ +#include "pidomus.h" +#include "interfaces/poisson_problem_signals.h" +#include "tests.h" + + +//test that we can resume a computation from snapshots +using namespace dealii; +int main (int argc, char *argv[]) +{ + + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, + numbers::invalid_unsigned_int); + + initlog(); + deallog.depth_file(1); + + const int dim = 2; + const int spacedim = 2; + + PoissonProblem p; + piDoMUS solver ("pidomus",p); + ParameterAcceptor::initialize(SOURCE_DIR "/parameters/checkpoint_restart_04.prm", "used_parameters.prm"); + + + solver.run (); + + auto sol = solver.get_solution(); + deallog.depth_file(10); + deallog << sol.l2_norm() << std::endl; + + return 0; +} diff --git a/tests/checkpoint_restart_04.output b/tests/checkpoint_restart_04.output new file mode 100644 index 00000000..1fa33429 --- /dev/null +++ b/tests/checkpoint_restart_04.output @@ -0,0 +1,2 @@ + +DEAL::2.08144 diff --git a/tests/parameters/checkpoint_restart_01.prm b/tests/parameters/checkpoint_restart_01.prm new file mode 100644 index 00000000..30ce8b84 --- /dev/null +++ b/tests/parameters/checkpoint_restart_01.prm @@ -0,0 +1,173 @@ +# Parameter file generated with +# D2K_GIT_BRANCH= checkpoint_restart +# D2K_GIT_SHORTREV= 7dd3c7e +# DEAL_II_GIT_BRANCH= master +# DEAL_II_GIT_SHORTREV= 372f54d +subsection Dirichlet boundary conditions + set IDs and component masks = 0=ALL + set IDs and expressions = 0=(1-y)*y*sin(2*pi*(x-t)) + set Known component names = u + set Used constants = +end +subsection Domain + set Colorize = false + set Copy boundary to manifold ids = false + set Copy material to manifold ids = false + set Create default manifolds = true + set Grid to generate = rectangle + set Input grid file name = + set Manifold descriptors = + set Mesh smoothing alogrithm = none + set Optional Point 1 = 0,0 + set Optional Point 2 = 1,1 + set Optional double 1 = 1.0 + set Optional double 2 = 0.5 + set Optional double 3 = 1.5 + set Optional int 1 = 1 + set Optional int 2 = 2 + set Optional vector of dim int = 1,1 + set Output grid file name = +end +subsection Error Tables + set Compute error = true + set Error file format = tex + set Error precision = 3 + set Output error tables = true + set Solution names = u + set Solution names for latex = u + set Table names = error + set Write error files = false + subsection Table 0 + set Add convergence rates = true + set Extra terms = cells,dofs + set Latex table caption = error + set List of error norms to compute = L2,H1 + set Rate key = + end +end +subsection Exact solution + set Function constants = + set Function expression = (1-y)*y*sin(2*pi*(x-t)) + set Variable names = x,y,t +end +subsection Forcing terms + set IDs and component masks = 0=u + set IDs and expressions = 0=2*pi*(y-1)*y*cos(-2*pi*(t-x))-2*(2*pi^2*(y-1)*y*sin(-2*pi*(t-x))-sin(-2*pi*(t-x))) + set Known component names = u + set Used constants = +end +subsection IDA Solver Parameters + set Absolute error tolerance = 1e-4 + set Final time = 1 + set Ignore algebraic terms for error computations = false + set Initial condition Newton max iterations = 5 + set Initial condition Newton parameter = 0.33 + set Initial condition type = use_y_dot + set Initial condition type after restart = use_y_dot + set Initial step size = 1e-4 + set Initial time = 0. + set Maximum number of nonlinear iterations = 10 + set Maximum order of BDF = 5 + set Min step size = 5e-5 + set Relative error tolerance = 1e-3 + set Seconds between each output = 1e-2 + set Show output of time steps = true + set Use local tolerances = false +end +subsection IMEX Parameters + set Absolute error tolerance = 1e-6 + set Final time = 0.1 + set Initial time = 0 + set Intervals between outputs = 1 + set Maximum number of inner nonlinear iterations = 3 + set Maximum number of outer nonlinear iterations = 5 + set Method used = fixed_alpha + set Newton relaxation parameter = 1.000000 + set Number of elements in backtracking sequence = 5 + set Print useful informations = false + set Relative error tolerance = 0.000000 + set Step size = 0.01 + set Update continuously Jacobian = true + set Use the KINSOL solver = true +end +subsection Initial solution + set Function constants = + set Function expression = 0 + set Variable names = x,y,t +end +subsection Initial solution_dot + set Function constants = + set Function expression = 0 + set Variable names = x,y,t +end +subsection KINSOL for IMEX + set Level of verbosity of the KINSOL solver = 0 + set Maximum number of iteration before Jacobian update = 10 + set Maximum number of iterations = 200 + set Step tolerance = 1e-11 + set Strategy = newton + set Tolerance for residuals = 1e-9 + set Use internal KINSOL direct solver = false +end +subsection Neumann boundary conditions + set IDs and component masks = + set IDs and expressions = + set Known component names = u + set Used constants = +end +subsection Output Parameters + set Files to save in run directory = + set Incremental run prefix = + set Output format = vtu + set Output partitioning = false + set Problem base name = checkpoint + set Solution names = u + set Subdivisions = 1 +end +subsection Poisson problem + set Block of differential components = 1 + set Blocking of the finite element = u + set Finite element space = FESystem[FE_Q(1)] +end +subsection Refinement + set Bottom fraction = 0.2 + set Maximum number of cells (if available) = 0 + set Order (optimize) = 2 + set Refinement strategy = fraction + set Top fraction = 0.2 +end +subsection Time derivative of Dirichlet boundary conditions + set IDs and component masks = + set IDs and expressions = + set Known component names = u + set Used constants = +end +subsection Zero average constraints + set Known component names = u + set Zero average on boundary = + set Zero average on whole domain = +end +subsection pidomus + set Adaptive refinement = true + set Enable finer preconditioner = false + set Initial global refinement = 4 + set Jacobian solver tolerance = 1e-8 + set Max iterations = 500 + set Max iterations finer prec. = 0 + set Max tmp vectors = 30 + set Max tmp vectors for finer system = 50 + set Maximum number of time steps = 10000 + set Number of cycles = 1 + set Number of eigenvalues to compute = 10 + set Number of used Arnoldi vectors = 0 + set Overwrite Newton's iterations = true + set Print some useful informations about processes = true + set Refine mesh during transient = false + set Resume computation from snapshot = true + set Save snapshots during simulation = false + set Snapshot prefix = ../../../../tests/snapshots/__trilinos__test___ + set Threshold for solver's restart = 1e-2 + set Time stepper = imex + set Use direct solver if available = true + set Which eigenvalues = smallest_real_part +end diff --git a/tests/parameters/checkpoint_restart_02.prm b/tests/parameters/checkpoint_restart_02.prm new file mode 100644 index 00000000..2621e4b5 --- /dev/null +++ b/tests/parameters/checkpoint_restart_02.prm @@ -0,0 +1,173 @@ +# Parameter file generated with +# D2K_GIT_BRANCH= checkpoint_restart +# D2K_GIT_SHORTREV= 7dd3c7e +# DEAL_II_GIT_BRANCH= master +# DEAL_II_GIT_SHORTREV= 372f54d +subsection Dirichlet boundary conditions + set IDs and component masks = 0=ALL + set IDs and expressions = 0=(1-y)*y*sin(2*pi*(x-t)) + set Known component names = u + set Used constants = +end +subsection Domain + set Colorize = false + set Copy boundary to manifold ids = false + set Copy material to manifold ids = false + set Create default manifolds = true + set Grid to generate = rectangle + set Input grid file name = + set Manifold descriptors = + set Mesh smoothing alogrithm = none + set Optional Point 1 = 0,0 + set Optional Point 2 = 1,1 + set Optional double 1 = 1.0 + set Optional double 2 = 0.5 + set Optional double 3 = 1.5 + set Optional int 1 = 1 + set Optional int 2 = 2 + set Optional vector of dim int = 1,1 + set Output grid file name = +end +subsection Error Tables + set Compute error = true + set Error file format = tex + set Error precision = 3 + set Output error tables = true + set Solution names = u + set Solution names for latex = u + set Table names = error + set Write error files = false + subsection Table 0 + set Add convergence rates = true + set Extra terms = cells,dofs + set Latex table caption = error + set List of error norms to compute = L2,H1 + set Rate key = + end +end +subsection Exact solution + set Function constants = + set Function expression = (1-y)*y*sin(2*pi*(x-t)) + set Variable names = x,y,t +end +subsection Forcing terms + set IDs and component masks = 0=u + set IDs and expressions = 0=2*pi*(y-1)*y*cos(-2*pi*(t-x))-2*(2*pi^2*(y-1)*y*sin(-2*pi*(t-x))-sin(-2*pi*(t-x))) + set Known component names = u + set Used constants = +end +subsection IDA Solver Parameters + set Absolute error tolerance = 1e-4 + set Final time = 1 + set Ignore algebraic terms for error computations = false + set Initial condition Newton max iterations = 5 + set Initial condition Newton parameter = 0.33 + set Initial condition type = use_y_dot + set Initial condition type after restart = use_y_dot + set Initial step size = 1e-4 + set Initial time = 0. + set Maximum number of nonlinear iterations = 10 + set Maximum order of BDF = 5 + set Min step size = 5e-5 + set Relative error tolerance = 1e-3 + set Seconds between each output = 1e-2 + set Show output of time steps = true + set Use local tolerances = false +end +subsection IMEX Parameters + set Absolute error tolerance = 1e-6 + set Final time = 0.03 + set Initial time = 0 + set Intervals between outputs = 1 + set Maximum number of inner nonlinear iterations = 3 + set Maximum number of outer nonlinear iterations = 5 + set Method used = fixed_alpha + set Newton relaxation parameter = 1.000000 + set Number of elements in backtracking sequence = 5 + set Print useful informations = false + set Relative error tolerance = 0.000000 + set Step size = 0.01 + set Update continuously Jacobian = true + set Use the KINSOL solver = true +end +subsection Initial solution + set Function constants = + set Function expression = 0 + set Variable names = x,y,t +end +subsection Initial solution_dot + set Function constants = + set Function expression = 0 + set Variable names = x,y,t +end +subsection KINSOL for IMEX + set Level of verbosity of the KINSOL solver = 0 + set Maximum number of iteration before Jacobian update = 10 + set Maximum number of iterations = 200 + set Step tolerance = 1e-11 + set Strategy = newton + set Tolerance for residuals = 1e-9 + set Use internal KINSOL direct solver = false +end +subsection Neumann boundary conditions + set IDs and component masks = + set IDs and expressions = + set Known component names = u + set Used constants = +end +subsection Output Parameters + set Files to save in run directory = + set Incremental run prefix = + set Output format = vtu + set Output partitioning = false + set Problem base name = checkpoint + set Solution names = u + set Subdivisions = 1 +end +subsection Poisson problem + set Block of differential components = 1 + set Blocking of the finite element = u + set Finite element space = FESystem[FE_Q(1)] +end +subsection Refinement + set Bottom fraction = 0.2 + set Maximum number of cells (if available) = 0 + set Order (optimize) = 2 + set Refinement strategy = fraction + set Top fraction = 0.2 +end +subsection Time derivative of Dirichlet boundary conditions + set IDs and component masks = + set IDs and expressions = + set Known component names = u + set Used constants = +end +subsection Zero average constraints + set Known component names = u + set Zero average on boundary = + set Zero average on whole domain = +end +subsection pidomus + set Adaptive refinement = true + set Enable finer preconditioner = false + set Initial global refinement = 4 + set Jacobian solver tolerance = 1e-8 + set Max iterations = 500 + set Max iterations finer prec. = 0 + set Max tmp vectors = 30 + set Max tmp vectors for finer system = 50 + set Maximum number of time steps = 10000 + set Number of cycles = 1 + set Number of eigenvalues to compute = 10 + set Number of used Arnoldi vectors = 0 + set Overwrite Newton's iterations = true + set Print some useful informations about processes = true + set Refine mesh during transient = false + set Resume computation from snapshot = false + set Save snapshots during simulation = false + set Snapshot prefix = + set Threshold for solver's restart = 1e-2 + set Time stepper = imex + set Use direct solver if available = true + set Which eigenvalues = smallest_real_part +end diff --git a/tests/parameters/checkpoint_restart_03.prm b/tests/parameters/checkpoint_restart_03.prm new file mode 100644 index 00000000..bb7a4e20 --- /dev/null +++ b/tests/parameters/checkpoint_restart_03.prm @@ -0,0 +1,173 @@ +# Parameter file generated with +# D2K_GIT_BRANCH= checkpoint_restart +# D2K_GIT_SHORTREV= 7dd3c7e +# DEAL_II_GIT_BRANCH= master +# DEAL_II_GIT_SHORTREV= 372f54d +subsection Dirichlet boundary conditions + set IDs and component masks = 0=ALL + set IDs and expressions = 0=(1-y)*y*sin(2*pi*(x-t)) + set Known component names = u + set Used constants = +end +subsection Domain + set Colorize = false + set Copy boundary to manifold ids = false + set Copy material to manifold ids = false + set Create default manifolds = true + set Grid to generate = rectangle + set Input grid file name = + set Manifold descriptors = + set Mesh smoothing alogrithm = none + set Optional Point 1 = 0,0 + set Optional Point 2 = 1,1 + set Optional double 1 = 1.0 + set Optional double 2 = 0.5 + set Optional double 3 = 1.5 + set Optional int 1 = 1 + set Optional int 2 = 2 + set Optional vector of dim int = 1,1 + set Output grid file name = +end +subsection Error Tables + set Compute error = true + set Error file format = tex + set Error precision = 3 + set Output error tables = true + set Solution names = u + set Solution names for latex = u + set Table names = error + set Write error files = false + subsection Table 0 + set Add convergence rates = true + set Extra terms = cells,dofs + set Latex table caption = error + set List of error norms to compute = L2,H1 + set Rate key = + end +end +subsection Exact solution + set Function constants = + set Function expression = (1-y)*y*sin(2*pi*(x-t)) + set Variable names = x,y,t +end +subsection Forcing terms + set IDs and component masks = 0=u + set IDs and expressions = 0=2*pi*(y-1)*y*cos(-2*pi*(t-x))-2*(2*pi^2*(y-1)*y*sin(-2*pi*(t-x))-sin(-2*pi*(t-x))) + set Known component names = u + set Used constants = +end +subsection IDA Solver Parameters + set Absolute error tolerance = 1e-4 + set Final time = 1 + set Ignore algebraic terms for error computations = false + set Initial condition Newton max iterations = 5 + set Initial condition Newton parameter = 0.33 + set Initial condition type = use_y_dot + set Initial condition type after restart = use_y_dot + set Initial step size = 1e-4 + set Initial time = 0. + set Maximum number of nonlinear iterations = 10 + set Maximum order of BDF = 5 + set Min step size = 5e-5 + set Relative error tolerance = 1e-3 + set Seconds between each output = 1e-2 + set Show output of time steps = true + set Use local tolerances = false +end +subsection IMEX Parameters + set Absolute error tolerance = 1e-6 + set Final time = 0.03 + set Initial time = 0 + set Intervals between outputs = 1 + set Maximum number of inner nonlinear iterations = 3 + set Maximum number of outer nonlinear iterations = 5 + set Method used = fixed_alpha + set Newton relaxation parameter = 1.000000 + set Number of elements in backtracking sequence = 5 + set Print useful informations = false + set Relative error tolerance = 0.000000 + set Step size = 0.01 + set Update continuously Jacobian = true + set Use the KINSOL solver = true +end +subsection Initial solution + set Function constants = + set Function expression = 0 + set Variable names = x,y,t +end +subsection Initial solution_dot + set Function constants = + set Function expression = 0 + set Variable names = x,y,t +end +subsection KINSOL for IMEX + set Level of verbosity of the KINSOL solver = 0 + set Maximum number of iteration before Jacobian update = 10 + set Maximum number of iterations = 200 + set Step tolerance = 1e-11 + set Strategy = newton + set Tolerance for residuals = 1e-9 + set Use internal KINSOL direct solver = false +end +subsection Neumann boundary conditions + set IDs and component masks = + set IDs and expressions = + set Known component names = u + set Used constants = +end +subsection Output Parameters + set Files to save in run directory = + set Incremental run prefix = + set Output format = vtu + set Output partitioning = false + set Problem base name = checkpoint + set Solution names = u + set Subdivisions = 1 +end +subsection Poisson problem + set Block of differential components = 1 + set Blocking of the finite element = u + set Finite element space = FESystem[FE_Q(1)] +end +subsection Refinement + set Bottom fraction = 0.2 + set Maximum number of cells (if available) = 0 + set Order (optimize) = 2 + set Refinement strategy = fraction + set Top fraction = 0.2 +end +subsection Time derivative of Dirichlet boundary conditions + set IDs and component masks = + set IDs and expressions = + set Known component names = u + set Used constants = +end +subsection Zero average constraints + set Known component names = u + set Zero average on boundary = + set Zero average on whole domain = +end +subsection pidomus + set Adaptive refinement = true + set Enable finer preconditioner = false + set Initial global refinement = 4 + set Jacobian solver tolerance = 1e-8 + set Max iterations = 500 + set Max iterations finer prec. = 0 + set Max tmp vectors = 30 + set Max tmp vectors for finer system = 50 + set Maximum number of time steps = 10000 + set Number of cycles = 1 + set Number of eigenvalues to compute = 10 + set Number of used Arnoldi vectors = 0 + set Overwrite Newton's iterations = true + set Print some useful informations about processes = true + set Refine mesh during transient = false + set Resume computation from snapshot = false + set Save snapshots during simulation = true + set Snapshot prefix = + set Threshold for solver's restart = 1e-2 + set Time stepper = imex + set Use direct solver if available = true + set Which eigenvalues = smallest_real_part +end diff --git a/tests/parameters/checkpoint_restart_04.prm b/tests/parameters/checkpoint_restart_04.prm new file mode 100644 index 00000000..880a3d1a --- /dev/null +++ b/tests/parameters/checkpoint_restart_04.prm @@ -0,0 +1,173 @@ +# Parameter file generated with +# D2K_GIT_BRANCH= checkpoint_restart +# D2K_GIT_SHORTREV= 7dd3c7e +# DEAL_II_GIT_BRANCH= master +# DEAL_II_GIT_SHORTREV= 372f54d +subsection Dirichlet boundary conditions + set IDs and component masks = 0=ALL + set IDs and expressions = 0=(1-y)*y*sin(2*pi*(x-t)) + set Known component names = u + set Used constants = +end +subsection Domain + set Colorize = false + set Copy boundary to manifold ids = false + set Copy material to manifold ids = false + set Create default manifolds = true + set Grid to generate = rectangle + set Input grid file name = + set Manifold descriptors = + set Mesh smoothing alogrithm = none + set Optional Point 1 = 0,0 + set Optional Point 2 = 1,1 + set Optional double 1 = 1.0 + set Optional double 2 = 0.5 + set Optional double 3 = 1.5 + set Optional int 1 = 1 + set Optional int 2 = 2 + set Optional vector of dim int = 1,1 + set Output grid file name = +end +subsection Error Tables + set Compute error = true + set Error file format = tex + set Error precision = 3 + set Output error tables = true + set Solution names = u + set Solution names for latex = u + set Table names = error + set Write error files = false + subsection Table 0 + set Add convergence rates = true + set Extra terms = cells,dofs + set Latex table caption = error + set List of error norms to compute = L2,H1 + set Rate key = + end +end +subsection Exact solution + set Function constants = + set Function expression = (1-y)*y*sin(2*pi*(x-t)) + set Variable names = x,y,t +end +subsection Forcing terms + set IDs and component masks = 0=u + set IDs and expressions = 0=2*pi*(y-1)*y*cos(-2*pi*(t-x))-2*(2*pi^2*(y-1)*y*sin(-2*pi*(t-x))-sin(-2*pi*(t-x))) + set Known component names = u + set Used constants = +end +subsection IDA Solver Parameters + set Absolute error tolerance = 1e-4 + set Final time = 1 + set Ignore algebraic terms for error computations = false + set Initial condition Newton max iterations = 5 + set Initial condition Newton parameter = 0.33 + set Initial condition type = use_y_dot + set Initial condition type after restart = use_y_dot + set Initial step size = 1e-4 + set Initial time = 0. + set Maximum number of nonlinear iterations = 10 + set Maximum order of BDF = 5 + set Min step size = 5e-5 + set Relative error tolerance = 1e-3 + set Seconds between each output = 1e-2 + set Show output of time steps = true + set Use local tolerances = false +end +subsection IMEX Parameters + set Absolute error tolerance = 1e-6 + set Final time = 0.03 + set Initial time = 0 + set Intervals between outputs = 1 + set Maximum number of inner nonlinear iterations = 3 + set Maximum number of outer nonlinear iterations = 5 + set Method used = fixed_alpha + set Newton relaxation parameter = 1.000000 + set Number of elements in backtracking sequence = 5 + set Print useful informations = false + set Relative error tolerance = 0.000000 + set Step size = 0.01 + set Update continuously Jacobian = true + set Use the KINSOL solver = true +end +subsection Initial solution + set Function constants = + set Function expression = 0 + set Variable names = x,y,t +end +subsection Initial solution_dot + set Function constants = + set Function expression = 0 + set Variable names = x,y,t +end +subsection KINSOL for IMEX + set Level of verbosity of the KINSOL solver = 0 + set Maximum number of iteration before Jacobian update = 10 + set Maximum number of iterations = 200 + set Step tolerance = 1e-11 + set Strategy = newton + set Tolerance for residuals = 1e-9 + set Use internal KINSOL direct solver = false +end +subsection Neumann boundary conditions + set IDs and component masks = + set IDs and expressions = + set Known component names = u + set Used constants = +end +subsection Output Parameters + set Files to save in run directory = + set Incremental run prefix = + set Output format = vtu + set Output partitioning = false + set Problem base name = checkpoint + set Solution names = u + set Subdivisions = 1 +end +subsection Poisson problem + set Block of differential components = 1 + set Blocking of the finite element = u + set Finite element space = FESystem[FE_Q(1)] +end +subsection Refinement + set Bottom fraction = 0.2 + set Maximum number of cells (if available) = 0 + set Order (optimize) = 2 + set Refinement strategy = fraction + set Top fraction = 0.2 +end +subsection Time derivative of Dirichlet boundary conditions + set IDs and component masks = + set IDs and expressions = + set Known component names = u + set Used constants = +end +subsection Zero average constraints + set Known component names = u + set Zero average on boundary = + set Zero average on whole domain = +end +subsection pidomus + set Adaptive refinement = true + set Enable finer preconditioner = false + set Initial global refinement = 4 + set Jacobian solver tolerance = 1e-8 + set Max iterations = 500 + set Max iterations finer prec. = 0 + set Max tmp vectors = 30 + set Max tmp vectors for finer system = 50 + set Maximum number of time steps = 10000 + set Number of cycles = 1 + set Number of eigenvalues to compute = 10 + set Number of used Arnoldi vectors = 0 + set Overwrite Newton's iterations = true + set Print some useful informations about processes = true + set Refine mesh during transient = false + set Resume computation from snapshot = true + set Save snapshots during simulation = false + set Snapshot prefix = ../../../tests/snapshots/__dealii__test___ + set Threshold for solver's restart = 1e-2 + set Time stepper = imex + set Use direct solver if available = true + set Which eigenvalues = smallest_real_part +end diff --git a/tests/snapshots/__dealii__test___restart.mesh b/tests/snapshots/__dealii__test___restart.mesh new file mode 100644 index 0000000000000000000000000000000000000000..9d49dff81000e192ecfe02cce4de77f028402015 GIT binary patch literal 3456 zcma*lu}&3X6h+}tDKMd+prD|bf`S4KCKMDTzKj-jMs0j+AHjd&eC9}u(L`s>y8G^X zay*~!KYsnTZQHxI@7{d)^yS<4#q-bWZF|}K$ss*o%+O$;dybF(1An~#cj)=&-aUVP zyV)B0)lv5R{m{Q2FJ3;yX6CQ6AGtriyI!8}=kj^rc>ldG;CXz0{N~eR{Qk-C__VJa z{%mkwCXb7pjvkyp8y?pqQxDF|cM%LJYKk+k3Hc0#qhX2$g~HXm&xOW+vVuN`K#e^Ju>y+yi6Xq2Q#z>oHs)rw+ET_ zfb%kWT#p&*!Fe;}aXm8i;Ji#8?~C2f_29f4$m5%lxgDIB$>V*o8>k28-9R4KBU2B~ z%jEIhV)Ne*&YK~RA4cYJa9$>l>oG$;IB$kLu1BUGoR`VteX$#84><1z^0+<7vV*o8>k28-9R4KBU2B~%j9u;FhhI5c{Aj3dyr`lI4_gO^_Za^oHs)r*CSI8&dcQS z!fik4-}QgK{^H)RhsUQQb2d0HlgA6Uo6&>wx5MLlWa`0rnLIvUZ03u>c{Akk<;YwO z&dcO+J!Yr}=gpAE^~ltN^D=q7aJw6O!1?>(aeI(y4>&KA#|yWI(S!4k!{d5n>cM%L zJZ=wWXb(7VhCFT$GVKB9W%9TlGt`6gX2|1uWa`0rnLOSXyPxa9c{h;9HzRX9I4_gO z`(igx56-)RJg!Hk9-NoSN_JH$d$m8}P(;jeMCXeee TLp?ZehCHrErXHM^$v^Q=BhE?w literal 0 HcmV?d00001 diff --git a/tests/snapshots/__dealii__test___restart.mesh.info b/tests/snapshots/__dealii__test___restart.mesh.info new file mode 100644 index 00000000..9938466c --- /dev/null +++ b/tests/snapshots/__dealii__test___restart.mesh.info @@ -0,0 +1,2 @@ +version nproc attached_bytes n_attached_objs n_coarse_cells +2 1 0 0 1 diff --git a/tests/snapshots/__dealii__test___restart.resume.z b/tests/snapshots/__dealii__test___restart.resume.z new file mode 100644 index 0000000000000000000000000000000000000000..63b0f02591c23ed2b89aca2fee69b1ae08863387 GIT binary patch literal 78 zcmZQ%U|{ftVmlyRaZ5P4q2bY$MQ4u8IkW1>q%(hPv{xTl^rYv^rVu+eF+MRqw-r)t dSrbd&@vmNX!?|K2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%3A0JK(%ztq_)dPq5FRBL)`cw}bng8PQnZ_e|Y`LAkr13}|yH`7Y z{*uNcdF3xX*|MV{*uNc z97Je5!jbt)&QH~2-zSoz>Vd=YF?u+~(d=(@Jk?__isYzz?DOvM7(MQs`QiToJ@9pS literal 0 HcmV?d00001 diff --git a/tests/snapshots/__trilinos__test___restart.resume.z b/tests/snapshots/__trilinos__test___restart.resume.z new file mode 100644 index 0000000000000000000000000000000000000000..c809f20a372db65a578cbfaa533780fd40a8aae6 GIT binary patch literal 83 zcmZQ%U|{ftVrL*-aZ5P4q2bY$MQ4u8IkW1>q%(hPv{xTl^rYv^rVu+eF+MRqw-r)t j=8e`*qT=(nw0}^N&2qW6(|%3X#^(*Em>Eu237!N1{_Y}@ literal 0 HcmV?d00001 diff --git a/tests/snapshots/__trilinos__test___restart.resume.z.old b/tests/snapshots/__trilinos__test___restart.resume.z.old new file mode 100644 index 0000000000000000000000000000000000000000..16e22712343f82e3cb8288e925dbad84ec31a2a2 GIT binary patch literal 83 zcmZQ%U|{ftVrL*-aZ5P4q2bY$MQ4u8IkW1>q%(hPv{xTl^rYv^rVu+eF+MRqw-r)t jbBorlXD(l}x&4EZY?jNlo%U<8Hm0|qVrDpURB#di3il$n literal 0 HcmV?d00001 From 9a9ba12e1d8e912cf98258b8720ca8365aa806f6 Mon Sep 17 00:00:00 2001 From: alberto sartori Date: Tue, 31 May 2016 15:41:41 +0200 Subject: [PATCH 2/2] fix mpi comm --- include/lac/lac_initializer.h | 17 +++++++++-------- include/pidomus.h | 4 ++-- source/pidomus.cc | 4 ++-- tests/checkpoint_restart_02.cc | 6 +----- tests/parameters/checkpoint_restart_02.prm | 2 +- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/include/lac/lac_initializer.h b/include/lac/lac_initializer.h index e2e22eb0..847e9854 100644 --- a/include/lac/lac_initializer.h +++ b/include/lac/lac_initializer.h @@ -3,6 +3,7 @@ // This includes all types we know of. #include "lac/lac_type.h" +#include #include /** @@ -15,12 +16,12 @@ class ScopedLACInitializer ScopedLACInitializer(const std::vector &dofs_per_block, const std::vector &owned, const std::vector &relevant, - const MPI_Comm &comm = MPI_COMM_WORLD): + const MPI_Comm extcomm= MPI_COMM_WORLD): dofs_per_block(dofs_per_block), owned(owned), relevant(relevant), - comm(comm) - {}; + comm(Utilities::MPI::duplicate_communicator(extcomm)) + {} /** * Initialize a non ghosted TrilinosWrappers::MPI::BlockVector. @@ -28,7 +29,7 @@ class ScopedLACInitializer void operator() (TrilinosWrappers::MPI::BlockVector &v, bool fast=false) { v.reinit(owned, comm, fast); - }; + } /** @@ -37,7 +38,7 @@ class ScopedLACInitializer void ghosted(TrilinosWrappers::MPI::BlockVector &v, bool fast=false) { v.reinit(owned, relevant, comm, fast); - }; + } /** * Initialize a serial BlockVector. @@ -45,7 +46,7 @@ class ScopedLACInitializer void operator() (BlockVector &v, bool fast=false) { v.reinit(dofs_per_block, fast); - }; + } /** @@ -56,7 +57,7 @@ class ScopedLACInitializer { Assert(false, ExcInternalError("You tried to create a ghosted vector in a serial run.")); (void)fast; - }; + } /** * Initialize a Trilinos Sparsity Pattern. @@ -112,7 +113,7 @@ class ScopedLACInitializer /** * MPI Communicator. */ - const MPI_Comm &comm; + MPI_Comm comm; }; diff --git a/include/pidomus.h b/include/pidomus.h index b14fff93..3d7a13a9 100644 --- a/include/pidomus.h +++ b/include/pidomus.h @@ -66,7 +66,7 @@ class piDoMUS : public ParameterAcceptor, public SundialsInterface &energy, - const MPI_Comm &comm = MPI_COMM_WORLD); + const MPI_Comm comm = MPI_COMM_WORLD); virtual void declare_parameters(ParameterHandler &prm); virtual void parse_parameters_call_back(); @@ -301,7 +301,7 @@ class piDoMUS : public ParameterAcceptor, public SundialsInterface &interface; unsigned int n_cycles; diff --git a/source/pidomus.cc b/source/pidomus.cc index 6540002d..c7b35db4 100644 --- a/source/pidomus.cc +++ b/source/pidomus.cc @@ -44,11 +44,11 @@ using namespace deal2lkit; template piDoMUS::piDoMUS (const std::string &name, const BaseInterface &interface, - const MPI_Comm &communicator) + const MPI_Comm communicator) : ParameterAcceptor(name), SundialsInterface(communicator), - comm(communicator), + comm(Utilities::MPI::duplicate_communicator(communicator)), interface(interface), pcout (std::cout, (Utilities::MPI::this_mpi_process(comm) diff --git a/tests/checkpoint_restart_02.cc b/tests/checkpoint_restart_02.cc index 7d4e3916..ad06409f 100644 --- a/tests/checkpoint_restart_02.cc +++ b/tests/checkpoint_restart_02.cc @@ -1,9 +1,7 @@ #include "pidomus.h" -#include "interfaces/poisson_problem_signals.h" +#include "interfaces/poisson_problem.h" #include "tests.h" - -// test that we can write snapshots using namespace dealii; int main (int argc, char *argv[]) { @@ -12,7 +10,6 @@ int main (int argc, char *argv[]) numbers::invalid_unsigned_int); MPILogInitAll log; - deallog.depth_file(1); deallog.depth_file(1); const int dim = 2; @@ -29,6 +26,5 @@ int main (int argc, char *argv[]) deallog << "OK" << std::endl; - return 0; } diff --git a/tests/parameters/checkpoint_restart_02.prm b/tests/parameters/checkpoint_restart_02.prm index 2621e4b5..bb7a4e20 100644 --- a/tests/parameters/checkpoint_restart_02.prm +++ b/tests/parameters/checkpoint_restart_02.prm @@ -164,7 +164,7 @@ subsection pidomus set Print some useful informations about processes = true set Refine mesh during transient = false set Resume computation from snapshot = false - set Save snapshots during simulation = false + set Save snapshots during simulation = true set Snapshot prefix = set Threshold for solver's restart = 1e-2 set Time stepper = imex