# UMFPACK WARNING singular matrix

**URL:** https://community.freefem.org/t/umfpack-warning-singular-matrix/3685
**Category:** General Discussion
**Created:** [January 11, 2025, 12:07am UTC](https://community.freefem.org/t/umfpack-warning-singular-matrix/3685 "2025-01-11T00:07:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bchen-00](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/bchen-00/32/2819_2.png) [@bchen-00](https://community.freefem.org/u/bchen-00)
#### Post date: [January 11, 2025, 12:07am UTC](https://community.freefem.org/t/umfpack-warning-singular-matrix/3685/1 "2025-01-11T00:07:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![bchen-00](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/bchen-00/32/2819_2.png) [@bchen-00](https://community.freefem.org/u/bchen-00)
#### Post date: [January 13, 2025, 7:29pm UTC](https://community.freefem.org/t/umfpack-warning-singular-matrix/3685/2 "2025-01-13T19:29:07Z")

</div>

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

```auto
-- 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

```auto
-- 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?

---

<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: [January 13, 2025, 9:31pm UTC](https://community.freefem.org/t/umfpack-warning-singular-matrix/3685/3 "2025-01-13T21:31:30Z")

</div>

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

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

```

---

<div class="post-metadata">

### Author: ![bchen-00](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/bchen-00/32/2819_2.png) [@bchen-00](https://community.freefem.org/u/bchen-00)
#### Post date: [January 14, 2025, 4:10am UTC](https://community.freefem.org/t/umfpack-warning-singular-matrix/3685/4 "2025-01-14T04:10:37Z")

</div>

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

---

<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: [January 14, 2025, 6:18am UTC](https://community.freefem.org/t/umfpack-warning-singular-matrix/3685/5 "2025-01-14T06:18:25Z")

</div>

Did you install PETSc via `make petsc-slepc`?
