Restart/load for parallel::shared::Triangulation<dim>

17 views
Skip to first unread message

Florian Schulze

unread,
Mar 19, 2026, 11:50:15 AM (4 days ago) Mar 19
to dea...@googlegroups.com
Dear all,

I'm currently trying to implement a restart functionality for my code,
and run into some problem with the restart for the
`parallel::shared::Triangulation<dim>`.
The code is MPI parallelized and multidimensional (1,2,3 and at some
point maybe even 4D), so I use the
`parallel::shared::Triangulation<dim>` for 1D, and
`parallel::distributed::Triangulation<dim>` for 2D/3D.
To implement the restart, I follow the tutorials step-83 and step-69
(which are very well written and very helpful BTW - thanks a lot to
whoever wrote them!).
For the `parallel::distributed::Triangulation<dim>` I got it to work - I
first create a (coarse) mesh and then load the checkpoint.
But for the `parallel::shared::Triangulation<dim>` I run into the
following error (full stacktrace see below):

```
An error occurred in line <14142> of file <dealii/source/grid/tria.cc>
in function
    void dealii::Triangulation<dim, spacedim>::load(const std::string&)
[with int dim = 2; int spacedim = 2; std::string =
std::__cxx11::basic_string<char>]
The violated condition was:
    this->n_global_active_cells() == n_global_active_cells
Additional information:
    The number of cells of the triangulation differs from the number of
    cells written into the .info file.
```

I don't really understand this error - some help would be much appreciated!
I use the same logic as for the distributed triangulation: I first
create the mesh (in this example it is static) and then read the checkpoint.

Best,
Florian



Full Stacktrace:

```
--------------------------------------------------------
An error occurred in line <14142> of file <dealii/source/grid/tria.cc>
in function
    void dealii::Triangulation<dim, spacedim>::load(const std::string&)
[with int dim = 2; int spacedim = 2; std::string =
std::__cxx11::basic_string<char>]
The violated condition was:
    this->n_global_active_cells() == n_global_active_cells
Additional information:
    The number of cells of the triangulation differs from the number of
    cells written into the .info file.

Stacktrace
-----------

# 0  /home/schulze/.local/lib/dealii/lib/libdeal_II.g.so.9.8.0-pre:
dealii::Triangulation<2, 2>::load(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
# 1  ./restart: Step83::CathodeRaySimulator<2>::restart()
# 2  ./restart: Step83::CathodeRaySimulator<2>::run(bool)
# 3  ./restart: main
--------------------------------------------------------

Abort() was called during dealing with an assertion or exception.
Backtrace:
[0x790b24158105] Kokkos::Impl::save_stacktrace()
[0x790b241546dc] Kokkos::Impl::host_abort(char const*)
[0x790b240fc22a]
[0x790b2d0a33ce]
dealii::deal_II_exceptions::internals::do_issue_error_nothrow(dealii::ExceptionBase
const&)
[0x6470101ef59f] void
dealii::deal_II_exceptions::internals::issue_error_noreturn<dealii::StandardExceptions::ExcMessage>(dealii::deal_II_exceptions::internals::ExceptionHandling,
char const*, int, char const*, char const*, char const*,
dealii::StandardExceptions::ExcMessage)
[0x790b2e6a56a6] dealii::Triangulation<2,
2>::load(std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
[0x6470101f500a] Step83::CathodeRaySimulator<2>::restart()
[0x6470101f1c37] Step83::CathodeRaySimulator<2>::run(bool)
[0x6470101e5a9d] main
[0x790b10e2a1ca]
[0x790b10e2a28b]__libc_start_main
[0x6470101e5835]_start
***Process received signal***
Signal: Aborted (6)
Signal code:  (-6)
[ 0] /lib/x86_64-linux-gnu/libc.so.6[+0x45330](0x790b10e45330)
[ 1] /lib/x86_64-linux-gnu/libc.so.6[pthread_kill+0x11c](0x790b10e9eb2c)
[ 2] /lib/x86_64-linux-gnu/libc.so.6[gsignal+0x1e](0x790b10e4527e)
[ 3] /lib/x86_64-linux-gnu/libc.so.6[abort+0xdf](0x790b10e288ff)
[ 4]
/home/schulze/.local/lib/dealii/lib/libdeal_II.g.so.9.8.0-pre[+0x129546f0](0x790b241546f0)
[ 5]
/home/schulze/.local/lib/dealii/lib/libdeal_II.g.so.9.8.0-pre[+0x128fc22a](0x790b240fc22a)
[ 6]
/home/schulze/.local/lib/dealii/lib/libdeal_II.g.so.9.8.0-pre[_ZN6dealii18deal_II_exceptions9internals22do_issue_error_nothrowERKNS_13ExceptionBaseE+0x0](0x790b2d0a33ce)
[ 7]
./restart[_ZN6dealii18deal_II_exceptions9internals20issue_error_noreturnINS_18StandardExceptions10ExcMessageEEEvNS1_17ExceptionHandlingEPKciS7_S7_S7_T_+0x89](0x6470101ef59f)
[ 8]
/home/schulze/.local/lib/dealii/lib/libdeal_II.g.so.9.8.0-pre[_ZN6dealii13TriangulationILi2ELi2EE4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5e0](0x790b2e6a56a6)
[ 9]
./restart[_ZN6Step8319CathodeRaySimulatorILi2EE7restartEv+0x1a2](0x6470101f500a)
[10]
./restart[_ZN6Step8319CathodeRaySimulatorILi2EE3runEb+0x9d](0x6470101f1c37)
[11] ./restart[main+0x145](0x6470101e5a9d)
[12] /lib/x86_64-linux-gnu/libc.so.6[+0x2a1ca](0x790b10e2a1ca)
[13] /lib/x86_64-linux-gnu/libc.so.6[__libc_start_main+0x8b](0x790b10e2a28b)
[14] ./restart[_start+0x25](0x6470101e5835)
***End of error message***
Aborted (core dumped)
```

--
Florian Schulze

PhD Student
Max-Planck-Institut für Kernphysik
Saupfercheckweg 1
69117 Heidelberg

Tel.: +49 6221 516-591

Reply all
Reply to author
Forward
0 new messages