MUMPS, solve and possible memory leaks

Dear all,

I am trying to parallelize a solution of a nonlinear time-dependent problem using FreeFEM++ 4.2.1 with the MUMPS package. At every time step I use “solve” in this way

load “MUMPS”

for (int m = 0; m<mmax; m++){
f=u1old^2+u2old^2;
solve PDE([u1,u2], [v1,v2], solver=sparsesolver,master=-1)=
int3d(th,mpirank)(u1 * v1/dt + u2 * v2/dt - u1old * v1/dt - u2old * v2/dt +f * u1 * v1+…)
…;
u1old=u1;
u2old=u2;
}

It works fine in the sense that the results are the same as for a non-parallel solver and there is a reasonable speed-up, but I have encountered memory leaks - something stays in the memory and after several loops, my laptop runs out of memory.

I think I use “solve” in the wrong way and the matrix or the solution stays in the memory. Is it so? Could you point out please, where I can find out about the master parameter?

I have tried to use “problem” in the same way and the results are the same (in the sense both the precision and memory leaks).

Thank you!

hi,
Have you solved the memory leak problem? I meet the same trouble when I parallelize a linear problem with MUMPS package, and don’t know how to solve. If you have solved the problem, could you give me some advices what should I do .If you haven’t , maybe we could discuss together.

You can solve this problem by using the PETSc interface to MUMPS. See this post, replace -pc_type hypre by -pc_type lu (though for simple problems such as heat equations and such, you should definitely use hypre and not MUMPS).