Error while solving a variational problem

Hi everybody,
I’m trying to solve a linear variational problem after having adopted a 3D mesh using c++ with fenics and another library called omega_h.
The problem is that in some cases when I try to solve the same variational problem after the adaptation the program stops and I get the following error:

Solving linear variational problem.
terminate called after throwing an instance of ‘std::runtime_error’
what():


  • DOLFIN encountered an error. If you are not able to resolve this issue
  • using the information listed below, you can ask for help at
  • fenics-support@googlegroups.com
    
  • Remember to include the error message listed below and, if possible,
  • include a minimal running example to reproduce the error.

  • Error: Unable to successfully call PETSc function ‘KSPSolve’.
  • Reason: PETSc error code is: 76 (Error in external library).
  • Where: This error was encountered inside /tmp/tmp.nPEFuNkCDk/dolfin-2019.$
  • Process: 0

I tried also to run the simulation from another computer, but I got the same error, unless there is another line in the output:

UFMPACK V5.7.6 (May 4, 2016): ERROR : out of memory

This is very strange since I was checking the memory of my computer during the whole simulation and there was still a lot of space available when it stops.

Is there anyone able to tell me how to solve this problem?
Thank you in advance!

See for instance: UMFPACK error: out of memory despite system having free memory - #2 by plugged

2 Likes

Ok I had to readapt that solution to c++ languange, but in the end it seems to work.
I report here my solution, it may be useful for someone else.

Parameters param(“parameters”);
param.add(“linear_solver”, “mumps”);
solve( … , param);

Thank you for the suggestion!