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

BUG: LinearEigenproblem/Solver does not work for mixed problems with fieldsplit #3607

Open
danshapero opened this issue Jun 3, 2024 · 0 comments
Labels

Comments

@danshapero
Copy link
Contributor

Describe the bug
I'm trying to solve a Stokes eigenproblem to empirically determine the stability constant for a certain element pair. Solving the eigenproblem using LU works fine. Trying to use a fieldsplit preconditioner as recommended in the docs gives an error Unhandled case, must have at least two fields, not 1.

Per discussion in slack with @wence- and Matt Knepley, something is wrong with the Section; it should have 2 fields but it has only 1. The DMs are probably not attached to the operators that are getting passed to the EPS object, and so there's no transfer of the algebraic data that this is a problem for two fields.

Steps to Reproduce
Minimal working example is here. Run with python mwe.py -solver lu and it works fine, run with python mwe.py -solver fieldsplit and it errors.

Expected behavior
It solves the Stokes eigenproblem but like really fast and then I publish a lovely paper

Error message

Traceback (most recent call last):
  File "/home/daniel/papers/tensor-product-stokes/mwe.py", line 62, in <module>
    num_converged = solver.solve()
                    ^^^^^^^^^^^^^^
  File "/home/daniel/.pyenv/versions/firedrake-2024-04-29/src/firedrake/firedrak
e/eigensolver.py", line 199, in solve
    self.es.solve()
  File "slepc4py/SLEPc/EPS.pyx", line 1266, in slepc4py.SLEPc.EPS.solve
petsc4py.PETSc.Error: error code 77
[0] EPSSolve() at /home/daniel/.pyenv/versions/firedrake-2024-04-29/src/slepc/sr
c/eps/interface/epssolve.c:134
[0] EPSSetUp() at /home/daniel/.pyenv/versions/firedrake-2024-04-29/src/slepc/sr
c/eps/interface/epssetup.c:381
[0] STSetUp() at /home/daniel/.pyenv/versions/firedrake-2024-04-29/src/slepc/src
/sys/classes/st/interface/stsolve.c:545
[0] STSetUp_Sinvert() at /home/daniel/.pyenv/versions/firedrake-2024-04-29/src/s
lepc/src/sys/classes/st/impls/sinvert/sinvert.c:116
[0] KSPSetUp() at /home/daniel/.pyenv/versions/firedrake-2024-04-29/src/petsc/sr
c/ksp/ksp/interface/itfunc.c:415
[0] PCSetUp() at /home/daniel/.pyenv/versions/firedrake-2024-04-29/src/petsc/src
/ksp/pc/interface/precon.c:1079
[0] PCSetUp_FieldSplit() at /home/daniel/.pyenv/versions/firedrake-2024-04-29/sr
c/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c:582
[0] PCFieldSplitSetDefaults() at /home/daniel/.pyenv/versions/firedrake-2024-04-
29/src/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c:544
[0] Petsc has generated inconsistent data
[0] Unhandled case, must have at least two fields, not 1

Environment:

  • OS: Linux
  • Python version: 3.11.5
  • Output of firedrake-status
---------------------------------------------------------------------------
|Package             |Branch                        |Revision  |Modified  |
---------------------------------------------------------------------------
|FInAT               |master                        |e3a869d   |False     |
|PyOP2               |master                        |ebbed562  |False     |
|fiat                |master                        |dbc1c5d   |False     |
|firedrake           |master                        |f7f86a9d9 |False     |
|h5py                |firedrake                     |6b512e5e  |False     |
|libsupermesh        |master                        |84becef   |False     |
|loopy               |main                          |967461ba  |False     |
|petsc               |firedrake                     |272f13d92c7|True      |
|pyadjoint           |master                        |908b636   |False     |
|pytest-mpi          |main                          |f2566a1   |False     |
|slepc               |firedrake                     |2285b60a5 |False     |
|tsfc                |master                        |90c20c5   |False     |
|ufl                 |master                        |fbd288e6  |False     |
---------------------------------------------------------------------------
@danshapero danshapero added the bug label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant