UMFPACK WARNING singular matrix

Hello,

I have compiled the FreeFEM++ code successfully using the source code on main branch, but cannot use it to solve any problem (even the ones in example) without encountering

" UMFPACK WARNING singular matrix "

This seems to only be a problem on a specific machine running Ubuntu 22.04, as I have been able to use FreeFEM++ without a problem on another machine running Ubuntu 20.04. Is there something wrong with my installation?

Thanks in advance,
Boyuan

Sorry about the lack of information in the initial post. Both Machines are actually Ubuntu 22.04. The issue is specific to UMFPACK on one of them, but when I select the solver to be GMRES, it returns the expected result. More specifically, using the default solver for an example case gives

-- FreeFem++ v4.13 (Mon Jan 13 11:07:38 AM PST 2025 - git v4.13)
   file : 2D-test.edp
 Load: lg_fem lg_mesh lg_mesh3 eigenvalue 
    1 : // Parameters
    2 :  real theta = 4.*pi/3.;
    3 :  real a = 2.; //The length of the semimajor axis
    4 :  real b = 1.; //The length of the semiminor axis
    5 :  func z = x;
 *** Warning  The identifier z hide a Global identifier  

    6 : 
    7 :  // Mesh
    8 :  border Gamma1(t=0., theta){x=a*cos(t); y=b*sin(t);}
    9 :  border Gamma2(t=theta, 2.*pi){x=a*cos(t); y=b*sin(t);}
   10 :  mesh Th = buildmesh(Gamma1(100) + Gamma2(50));
   11 : 
   12 :  // Fespace
   13 :  fespace Vh(Th, P2); //P2 conforming triangular FEM
   14 :  Vh phi, w, f=1;
   15 : 
   16 :  // Solve
   17 :  solve Laplace(phi, w)
   18 :  = int2d(Th)(
   19 :  dx(phi)*dx(w)
   20 :  + dy(phi)*dy(w)
   21 :  )
   22 :  - int2d(Th)(
   23 :  f*w
   24 :  )
   25 :  + on(Gamma1, phi=z)
   26 :  ;
   27 : 
   28 :  // Plot
   29 :  plot(phi, wait=true, ps="membrane.eps"); //Plot phi
   30 :  plot(Th, wait=true, ps="membraneTh.eps"); //Plot Th
   31 : 
   32 :  // Save mesh
   33 :  savemesh(Th,"Th.msh");
   34 :  sizestack + 1024 =1896  ( 872 )

  --  mesh:  Nb of Triangles =   2568, Nb of Vertices 1360
1 UMFPACK WARNING singular matrix 
1 UMFPACK WARNING singular matrix 
  -- Solve : 
          min -nan  max -nan
  number of required edges : 0
times: compile 0.09037s, execution 2.72271s,  mpirank:0
 CodeAlloc : nb ptr  3866,  size :515232 mpirank: 0
Ok: Normal End

But GMRES returns the expected outcome

-- FreeFem++ v4.13 (Mon Jan 13 11:07:38 AM PST 2025 - git v4.13)
   file : 2D-test.edp
 Load: lg_fem lg_mesh lg_mesh3 eigenvalue 
    1 : // Parameters
    2 :  real theta = 4.*pi/3.;
    3 :  real a = 2.; //The length of the semimajor axis
    4 :  real b = 1.; //The length of the semiminor axis
    5 :  func z = x;
 *** Warning  The identifier z hide a Global identifier  

    6 : 
    7 :  // Mesh
    8 :  border Gamma1(t=0., theta){x=a*cos(t); y=b*sin(t);}
    9 :  border Gamma2(t=theta, 2.*pi){x=a*cos(t); y=b*sin(t);}
   10 :  mesh Th = buildmesh(Gamma1(100) + Gamma2(50));
   11 : 
   12 :  // Fespace
   13 :  fespace Vh(Th, P2); //P2 conforming triangular FEM
   14 :  Vh phi, w, f=1;
   15 : 
   16 :  // Solve
   17 :  solve Laplace(phi, w, solver=GMRES)
   18 :  = int2d(Th)(
   19 :  dx(phi)*dx(w)
   20 :  + dy(phi)*dy(w)
   21 :  )
   22 :  - int2d(Th)(
   23 :  f*w
   24 :  )
   25 :  + on(Gamma1, phi=z)
   26 :  ;
   27 : 
   28 :  // Plot
   29 :  plot(phi, wait=true, ps="membrane.eps"); //Plot phi
   30 :  plot(Th, wait=true, ps="membraneTh.eps"); //Plot Th
   31 : 
   32 :  // Save mesh
   33 :  savemesh(Th,"Th.msh");
   34 :  sizestack + 1024 =1896  ( 872 )

  --  mesh:  Nb of Triangles =   2568, Nb of Vertices 1360
  **  fgmres has converged in 325 iterations The relative residual is 9.93524e-07 Cl: 0.107376
  -- Solve : 
          min -2  max 2
  number of required edges : 0
times: compile 0.22081s, execution 1.77229s,  mpirank:0

This issue is not present on another machine - does anyone has insights on what the issue might be?

There is probably an issue with your installation.
I ran the code, and get on both macOS and Linux:

[...]
  --  mesh:  Nb of Triangles =   2568, Nb of Vertices 1360
  -- Solve : 
          min -2  max 2
[...]

Do you know what could be the issue? I tried to reinstalling a few times in different ways and nothing changes.

Did you install PETSc via make petsc-slepc?