# Error from the code with PETSc when the mesh is refined

**URL:** <https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080>\
**Category:** General Discussion\
**Created:** [October 23, 2022, 11:53am UTC](https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080 "2022-10-23T11:53:27Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [November 2, 2022, 7:04am UTC](https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080/21 "2022-11-02T07:04:00Z")

</div>

In this context, for example, it would mean where exactly did the problem stopped.

---

<div class="post-metadata">

**Author:** ![SHENG](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@SHENG](https://community.freefem.org/u/SHENG)\
**Post date:** [November 2, 2022, 7:29am UTC](https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080/22 "2022-11-02T07:29:25Z")

</div>

Maybe, I could tell you that the code stopped at the 42nd iteration.  
And I have captured a screenshot of the reported error of the code and have posted here.  
I do not know where can reflect the place which made the code stop.

So, I want to confirm a question. Could the elasticity problem of a 3D mesh with the size of 854 MB be solved by FF++ with PETSc using 25 processors or more? If the above problem could be solved, could you give me some advice about the solvers, for example, the template about set (A, “…”, bs=…, and more ), or other advice about the additional command line option. This is because I think the code is no problem, and my code can run but would stop at the 42nd iteration, this maybe caused by the improper solver or algorithm. Do you think so?

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [November 2, 2022, 7:49am UTC](https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080/23 "2022-11-02T07:49:43Z")

</div>

Without a back trace, it’s not even sure that the problem is in the solver and not in the distributed mesh setup.

---

<div class="post-metadata">

**Author:** ![SHENG](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@SHENG](https://community.freefem.org/u/SHENG)\
**Post date:** [November 2, 2022, 7:55am UTC](https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080/24 "2022-11-02T07:55:25Z")

</div>

So, Professor, How can I show you the back trace?

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [November 2, 2022, 8:04am UTC](https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080/25 "2022-11-02T08:04:02Z")

</div>

You need to find where the error appears in your code.

---

<div class="post-metadata">

**Author:** ![SHENG](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@SHENG](https://community.freefem.org/u/SHENG)\
**Post date:** [November 2, 2022, 8:12am UTC](https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080/26 "2022-11-02T08:12:54Z")

</div>

Thank you very much professor.

[Previous page](https://community.freefem.org/t/error-from-the-code-with-petsc-when-the-mesh-is-refined/2080.md?page=1)
