Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change solver in mixed Poisson #3558

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

jorgensd
Copy link
Member

"superlu_dist" fails with

Traceback (most recent call last):
  File "/root/shared/demo/demo_mixed-poisson.py", line 196, in <module>
    raise e
  File "/root/shared/demo/demo_mixed-poisson.py", line 189, in <module>
    w_h = problem.solve()
          ^^^^^^^^^^^^^^^
  File "/usr/local/dolfinx-real/lib/python3.12/dist-packages/dolfinx/fem/petsc.py", line 906, in solve
    self._solver.solve(self._b, self._x)
  File "petsc4py/PETSc/KSP.pyx", line 1782, in petsc4py.PETSc.KSP.solve
petsc4py.PETSc.Error: error code 71
[0] KSPSolve() at /usr/local/petsc/src/ksp/ksp/interface/itfunc.c:1075
[0] KSPSolve_Private() at /usr/local/petsc/src/ksp/ksp/interface/itfunc.c:826
[0] KSPSetUp() at /usr/local/petsc/src/ksp/ksp/interface/itfunc.c:415
[0] PCSetUp() at /usr/local/petsc/src/ksp/pc/interface/precon.c:1071
[0] PCSetUp_LU() at /usr/local/petsc/src/ksp/pc/impls/factor/lu/lu.c:121
[0] MatLUFactorNumeric() at /usr/local/petsc/src/mat/interface/matrix.c:3307
[0] MatLUFactorNumeric_SuperLU_DIST() at /usr/local/petsc/src/mat/impls/aij/mpi/superlu_dist/superlu_dist.c:561
[0] Zero pivot in LU factorization: https://petsc.org/release/faq/#zeropivot
[0] Zero pivot in row 1862

Changing to "mumps" resolves the issue.
Also adding assertion if ksp fails to demo to avoid this slipping in at a future release of mumps.

@jorgensd jorgensd requested a review from garth-wells December 10, 2024 15:48
@jorgensd jorgensd requested a review from jpdean December 10, 2024 16:10
@jorgensd
Copy link
Member Author

Mumps doesnt like int64, so either we skip int64 or change to an iterative solver?

@jhale
Copy link
Member

jhale commented Dec 10, 2024

Hasn't this been running ok for years?

@jorgensd
Copy link
Member Author

Hasn't this been running ok for years?

That is unclear. We never had the ksp error if not converged on. We would have to work our way backwards on an int64 system to check that it actually converge

@garth-wells
Copy link
Member

Hasn't this been running ok for years?

Yes, but the underlying solvers have changed and we never checked the correctness of the solution.

I've been planning to change this demo to using a block-preconditioned solver (perhaps alongside the direct solver). Will do as soon as I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants