Issue with Parallelization

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 (6.0 KB)

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

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.

Do you get matching results with just a single process?

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.

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

Thank you for the suggestion.

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 (818 Bytes)

Do you get the expected output in ParaView?

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”

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.