# Saving meshes in a list: RuntimeError: \*\*\* Error: Duplication of MPI communicator failed

**URL:** <https://fenicsproject.discourse.group/t/saving-meshes-in-a-list-runtimeerror-error-duplication-of-mpi-communicator-failed/7749>\
**Category:** mesh\
**Created:** [February 28, 2022, 9:15am UTC](https://fenicsproject.discourse.group/t/saving-meshes-in-a-list-runtimeerror-error-duplication-of-mpi-communicator-failed/7749 "2022-02-28T09:15:05Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [March 4, 2025, 12:46pm UTC](https://fenicsproject.discourse.group/t/saving-meshes-in-a-list-runtimeerror-error-duplication-of-mpi-communicator-failed/7749/8 "2025-03-04T12:46:11Z")

</div>

> [@chenyongxin](#):
>
> I think I met a similar situation, where my code terminates at around 1,900 steps with the following error output. If I save checkpoint at 1,000 step and restart from that point, the simulation can pass it. I have no direction why it happens. From the error output, if it can be deduced to the MPI duplication problem? In my code, I did not have an explcit call of generating new mesh in every time step.
> 
> ``

Generating a mesh at each time step might be problematic, as MPI only allows for a limited number of `duplicate`-calls within each simulation.

Without the actual code you are running, it is hard to give any guidance on how to avoid it.

---

_[View the full topic](https://fenicsproject.discourse.group/t/saving-meshes-in-a-list-runtimeerror-error-duplication-of-mpi-communicator-failed/7749)._
