# Issue with Parallelization

**URL:** <https://community.freefem.org/t/issue-with-parallelization/4314>\
**Category:** General Discussion\
**Created:** [June 17, 2026, 6:00pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314 "2026-06-17T18:00:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![goutham2023](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/goutham2023/32/1759_2.png) [@goutham2023](https://community.freefem.org/u/goutham2023)\
**Post date:** [June 17, 2026, 6:00pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314/1 "2026-06-17T18:00:24Z")

</div>

I am currently learning parallelization in FreeFEM and started with a simple diffusion problem. The serial version works as expected, but after parallelizing it using PETSc and `macro_ddm.idp`, the contour plots do not appear correct. Could you please review the code and point out any issues or suggest improvements to the parallel implementation?

Thank you for your time.

[parallell\_heat2.edp](https://community.freefem.org/uploads/short-url/cwZCFedIiXLRL4pij93LVAz4e1w.edp) (6.0 KB)

---

<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:** [June 18, 2026, 12:42pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314/2 "2026-06-18T12:42:01Z")

</div>

Use the command-line parameter `-wg` if you want the plot to appear with `FreeFem++-mpi`.

---

<div class="post-metadata">

**Author:** ![goutham2023](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/goutham2023/32/1759_2.png) [@goutham2023](https://community.freefem.org/u/goutham2023)\
**Post date:** [June 18, 2026, 2:36pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314/3 "2026-06-18T14:36:28Z")

</div>

Thank you for your response. The contour plot was being generated, but the results did not match the serial solution and appeared incorrect. Since I am new to FreeFEM parallelization, I was hoping to understand what might be causing this discrepancy and whether there are any issues with my implementation.

---

<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:** [June 19, 2026, 1:19pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314/4 "2026-06-19T13:19:22Z")

</div>

Do you get matching results with just a single process?

---

<div class="post-metadata">

**Author:** ![goutham2023](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/goutham2023/32/1759_2.png) [@goutham2023](https://community.freefem.org/u/goutham2023)\
**Post date:** [June 19, 2026, 4:47pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314/5 "2026-06-19T16:47:02Z")

</div>

Yes, with a single process, the code outputs the contour plot correctly and writes the data as expected. However, when running with multiple processes, the through-depth temperature output is incorrect.

Thank you for your time and assistance.

---

<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:** [June 20, 2026, 4:02pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314/6 "2026-06-20T16:02:13Z")

</div>

Stick to an exact factorization instead of `PCHYPRE` until you have sorted things out.

---

<div class="post-metadata">

**Author:** ![goutham2023](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/goutham2023/32/1759_2.png) [@goutham2023](https://community.freefem.org/u/goutham2023)\
**Post date:** [June 25, 2026, 9:34am UTC](https://community.freefem.org/t/issue-with-parallelization/4314/7 "2026-06-25T09:34:55Z")

</div>

Thank you for the suggestion.

---

<div class="post-metadata">

**Author:** ![goutham2023](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/goutham2023/32/1759_2.png) [@goutham2023](https://community.freefem.org/u/goutham2023)\
**Post date:** [June 25, 2026, 5:07pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314/8 "2026-06-25T17:07:03Z")

</div>

Dear Pierre Jolivet,

I am running a parallel simulation using PETSc and DDM in FreeFEM. I want to properly export my solution fields to VTK. Can you verify if my setup correctly handles the local-to-global mesh mapping (`n2o`), or if I need to modify it for parallel execution?

[trial.edp](https://community.freefem.org/uploads/short-url/bqzdR8d8mMbPxxoqfmbSC9WMIl5.edp) (818 Bytes)

---

<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:** [June 27, 2026, 2:52pm UTC](https://community.freefem.org/t/issue-with-parallelization/4314/9 "2026-06-27T14:52:01Z")

</div>

Do you get the expected output in ParaView?

---

<div class="post-metadata">

**Author:** ![goutham2023](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/goutham2023/32/1759_2.png) [@goutham2023](https://community.freefem.org/u/goutham2023)\
**Post date:** [June 28, 2026, 4:57am UTC](https://community.freefem.org/t/issue-with-parallelization/4314/10 "2026-06-28T04:57:48Z")

</div>

In ParaView only a single processor’s subdomain is opening.

I also tried opening in tecplot it is showing this error

“VTK cell type “Line” has a dimensionality of 1 but one or more cells of dimensionality 2 have already been discovered”

---

<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:** [June 28, 2026, 5:08am UTC](https://community.freefem.org/t/issue-with-parallelization/4314/11 "2026-06-28T05:08:44Z")

</div>

> In ParaView only a single processor’s subdomain is opening.

That’s because you are using `load "iovtk"`. Remove that from your `.edp`, and you should have all processes writing their solution.
