<div dir="auto">Makes sense. Thanks again !</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 23 Jan 2023, 16:28 Jose E. Roman, <<a href="mailto:jroman@dsic.upv.es">jroman@dsic.upv.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here is the explanation. With shift-and-invert, two main things must be done at STSetUp: 1) build the matrix A-sigma*B, (2) factorize it. Normally this is done at the beginning of EPSSolve. Before that you can set PC options, but the problem is that MUMPS options belong to Mat, not PC, so step 1) must be done beforehand. But you cannot call PCSetUp because you have not yet configured MUMPS options. Around version 3.12 we split the implementation of STSetUp so that 1) and 2) can be done separately. STGetOperator is what triggers 1).<br>
<br>
Jose<br>
<br>
<br>
> El 23 ene 2023, a las 13:13, Quentin Chevalier <<a href="mailto:quentin.chevalier@polytechnique.edu" target="_blank" rel="noreferrer">quentin.chevalier@polytechnique.edu</a>> escribió:<br>
> <br>
> Many thanks Jose, it works beautifully !<br>
> <br>
> I'm at a loss as to why, but thanks for the quick fix !<br>
> <br>
> Quentin<br>
> <br>
> <br>
> <br>
> Quentin CHEVALIER – IA parcours recherche<br>
> <br>
> LadHyX - Ecole polytechnique<br>
> <br>
> __________<br>
> <br>
> <br>
> <br>
> On Sun, 22 Jan 2023 at 10:58, Jose E. Roman <<a href="mailto:jroman@dsic.upv.es" target="_blank" rel="noreferrer">jroman@dsic.upv.es</a>> wrote:<br>
>> <br>
>> You have to call ST.getOperator() as is done in this C example:<br>
>> <a href="https://slepc.upv.es/documentation/current/src/eps/tutorials/ex43.c.html" rel="noreferrer noreferrer" target="_blank">https://slepc.upv.es/documentation/current/src/eps/tutorials/ex43.c.html</a><br>
>> <br>
>> Jose<br>
>> <br>
>> <br>
>>> El 22 ene 2023, a las 10:40, Quentin Chevalier <<a href="mailto:quentin.chevalier@polytechnique.edu" target="_blank" rel="noreferrer">quentin.chevalier@polytechnique.edu</a>> escribió:<br>
>>> <br>
>>> Hello PETSc users,<br>
>>> <br>
>>> I'm getting an INFOG(1)=-9 and INFO(2)=27 error on an eigenvalue code based on dolfinx run in a docker container. Based on <a href="https://mumps-solver.org/doc/userguide_5.5.1.pdf" rel="noreferrer noreferrer" target="_blank">https://mumps-solver.org/doc/userguide_5.5.1.pdf</a>, I figured the fix would be to increase ICNTL(14).<br>
>>> <br>
>>> I'm coding in python through the petsc4py/slepc4py wrapper. I found a Mat.setMumpsIcntl method but I can't seem to place it properly and always obtain another error : "Operation done in wrong order and the like".<br>
>>> <br>
>>> Here's the code snippet that is failing :<br>
>>> # Solver<br>
>>> EPS = SLEPc.EPS().create(COMM_WORLD)<br>
>>> EPS.setOperators(-A,M) # Solve Ax=sigma*Mx<br>
>>> EPS.setProblemType(SLEPc.EPS.ProblemType.PGNHEP) # Specify that A is not hermitian, but M is semi-definite<br>
>>> EPS.setWhichEigenpairs(EPS.Which.TARGET_MAGNITUDE) # Find eigenvalues close to sigma<br>
>>> EPS.setTarget(sigma)<br>
>>> EPS.setDimensions(2,10) # Find k eigenvalues only with max number of Lanczos vectors<br>
>>> EPS.setTolerances(1e-9,100) # Set absolute tolerance and number of iterations<br>
>>> # Spectral transform<br>
>>> ST = EPS.getST(); ST.setType('sinvert')<br>
>>> # Krylov subspace<br>
>>> KSP = ST.getKSP()<br>
>>> KSP.setTolerances(rtol=1e-6, atol=1e-9, max_it=100)<br>
>>> # Krylov subspace<br>
>>> KSP.setType('preonly')<br>
>>> # Preconditioner<br>
>>> PC = KSP.getPC(); PC.setType('lu')<br>
>>> PC.setFactorSolverType('mumps')<br>
>>> KSP.setFromOptions()<br>
>>> EPS.setFromOptions()<br>
>>> PC.getFactorMatrix().setMumpsIcntl(14,50)<br>
>>> print(f"Solver launch for sig={sigma:.1f}...",flush=True)<br>
>>> EPS.solve()<br>
>>> n=EPS.getConverged()<br>
>>> <br>
>>> For context, matrix A is complex, size 500k x 500k but AIJ sparse, and I'm running this code on 36 nodes.<br>
>>> <br>
>>> I'd appreciate any insight on how to fix this issue, it's not clear to me what the order of operations should be. Funnily enough, it's very shift-dependent.<br>
>>> <br>
>>> Cheers,<br>
>>> <br>
>>> Quentin<br>
>> <br>
<br>
</blockquote></div>