# Continental Extension Cookbook - Mesh Refinement Bug in parallel

**URL:** <https://community.geodynamics.org/t/continental-extension-cookbook-mesh-refinement-bug-in-parallel/2422>\
**Category:** ASPECT\
**Created:** [May 19, 2022, 10:21am UTC](https://community.geodynamics.org/t/continental-extension-cookbook-mesh-refinement-bug-in-parallel/2422 "2022-05-19T10:21:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcel112358](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/marcel112358/32/1072_2.png) [@marcel112358](https://community.geodynamics.org/u/marcel112358)\
**Post date:** [May 19, 2022, 10:21am UTC](https://community.geodynamics.org/t/continental-extension-cookbook-mesh-refinement-bug-in-parallel/2422/1 "2022-05-19T10:21:35Z")

</div>

I ran the prm file `cookbooks/continental_extension/continental_extension.prm` with 16 and 1 cores and the mesh refinement is not the same (see Fig. 1&2).

 ![mpi-n-1](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/2X/f/fa773d020a0ac8e7e01c67dbd2ee6569e7539aeb.jpeg)  
Fig. 1: _continental extension cookbook after timestep 0 running with 1 MPI process_

 ![mpi-n-16](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/2X/d/d4196045de4c6f126dba2a0fc41dd8458cef518b.jpeg)  
Fig. 2: _continental extension cookbook after timestep 0 running with 16 MPI processes_

```auto
-----------------------------------------------------------------------------
-- This is ASPECT, the Advanced Solver for Problems in Earth's ConvecTion.
-- . version 2.4.0-pre (main, 48f12261d)
-- . using deal.II 9.3.3 (dealii-9.3, 7987f7338d)
-- . with 32 bit indices and vectorization level 1 (128 bits)
-- . using Trilinos 12.14.1
-- . using p4est 2.2.0
-- . running in OPTIMIZED mode
-- . running with 16 MPI processes
-----------------------------------------------------------------------------

```

---

<div class="post-metadata">

**Author:** ![tjhei](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/tjhei/32/1163_2.png) [@tjhei](https://community.geodynamics.org/u/tjhei)\
**Post date:** [June 24, 2022, 3:06pm UTC](https://community.geodynamics.org/t/continental-extension-cookbook-mesh-refinement-bug-in-parallel/2422/2 "2022-06-24T15:06:14Z")

</div>

Thank you for the great bug report. I was able to fix this in

> <https://github.com/geodynamics/aspect/pull/4860>
>
> Requesting global refinement when running with many MPI ranks often
> resulted in… cells that we forget to refine.
> 
> fixes #4524
> also see #4513
> also see various forum posts about continental\_extension cookbook with
> 16 MPI ranks and others.
> 
> continental\_extension:
> \`\`\`
> $ grep Number \*ranksafter-16-ranks:Number of active cells: 3,200 (on 4 levels)
> before-16-ranks:Number of active cells: 3,056 (on 4 levels)
> before-16-ranks:Number of degrees of freedom: 103,689 (25,122+3,201+12,561+12,561+12,561+12,561+12,561+12,561)
> before-16-ranks:Number of mesh deformation degrees of freedom: 6402
> before-8-ranks:Number of active cells: 3,200 (on 4 levels)
> before-8-ranks:Number of degrees of freedom: 107,649 (26,082+3,321+13,041+13,041+13,041+13,041+13,041+13,041)
> before-8-ranks:Number of mesh deformation degrees of freedom: 6642
> 
> after-16-ranks:Number of active cells: 3,200 (on 4 levels)
> after-16-ranks:Number of degrees of freedom: 107,649 (26,082+3,321+13,041+13,041+13,041+13,041+13,041+13,041)
> after-16-ranks:Number of mesh deformation degrees of freedom: 6642
> after-8-ranks:Number of active cells: 3,200 (on 4 levels)
> after-8-ranks:Number of degrees of freedom: 107,649 (26,082+3,321+13,041+13,041+13,041+13,041+13,041+13,041)
> after-8-ranks:Number of mesh deformation degrees of freedom: 6642
> 
> \`\`\`

You might need to wait until it is merged into the devolpment version, though.
