<div dir="ltr">Ok, thanks. It seems that PETSc clearly should throw an error in this case instead of just giving incorrect answers? I am surprised that it does not throw an error...</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 21, 2017 at 5:24 PM Hong <<a href="mailto:hzhang@mcs.anl.gov">hzhang@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Greg :<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Yes, they are Hermitian.</div></blockquote><div> </div><div>PETSc does not support  Cholesky factorization for Hermitian.</div><div>It seems mumps does not support Hermitian either</div><div><a href="https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2015-November/027541.html" target="_blank">https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2015-November/027541.html</a><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Hong</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="m_6675289382118951847gmail-HOEnZb"><div class="m_6675289382118951847gmail-h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 21, 2017 at 3:43 PM Hong <<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Greg:</div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">OK, the difference is whether LU or Cholesky factorization is used. But I would hope that neither one should give incorrect eigenvalues, and when I run with the latter it does!</div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Are your matrices symmetric/Hermitian?</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hong</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="m_6675289382118951847gmail-m_-3963994936178457407m_-8487120594974510340HOEnZb"><div class="m_6675289382118951847gmail-m_-3963994936178457407m_-8487120594974510340h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 21, 2017 at 2:05 PM Hong <<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Gregory :</div><div class="gmail_quote">Use '-eps_view' for both runs to check the algorithms being used. </div><div class="gmail_quote">Hong</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm using shift-invert with EPS to solve for eigenvalues. I find that if I do only</div><div><br></div><div><font face="monospace">...</font></div><div><font face="monospace">  ierr = EPSGetST(eps,&st);CHKERRQ(ierr);</font></div><div><font face="monospace">  ierr = STSetType(st,STSINVERT);CHKERRQ(ierr);</font></div><div><font face="monospace">...</font></div><div><font face="monospace"><br></font></div><div>in my code I get correct eigenvalues. But if I do </div><div><font face="monospace"><br></font></div><div><font face="monospace">...</font></div><div><div style="font-family:monospace">  ierr = EPSGetST(eps,&st);CHKERRQ(ierr);</div><div style="font-family:monospace">  ierr = STSetType(st,STSINVERT);CHKERRQ(ierr);</div><div style="font-family:monospace">  ierr = STGetKSP(st,&ksp);CHKERRQ(ierr);</div><div style="font-family:monospace">  ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);</div><div style="font-family:monospace">  ierr = KSPSetType(ksp,KSPPREONLY);CHKERRQ(ierr);</div><div style="font-family:monospace">  ierr = PCSetType(pc,PCCHOLESKY);CHKERRQ(ierr);</div><div style="font-family:monospace">...</div><div><br></div><div>the eigenvalues found by EPS are completely wrong! Somehow I thought I was supposed to do the latter, from the examples etc, but I guess that was not correct? I attach the full piece of test code and a test matrix.</div><div><br></div><div>Best,</div><div>Greg</div></div></div>
</blockquote></div><br></div></div>
</blockquote></div>
</div></div></blockquote></div></div></div></blockquote></div>
</div></div></blockquote></div></div></div></blockquote></div>