<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">This error appears when computing the B-norm of a vector x, as sqrt(x'*B*x). Probably your B matrix is semi-definite, and due to floating-point error the value x'*B*x becomes negative for a certain vector x. The code uses a tolerance of 10*PETSC_MACHINE_EPSILON, but it seems the rounding errors are larger in your case. Or maybe your B-matrix is indefinite, in which case you should solve the problem as non-symmetric (or as symmetric-indefinite GHIEP).<div class=""><br class=""></div><div class="">Do you get the same problem with the Krylov-Schur solver?</div><div class=""><br class=""></div><div class="">A workaround is to edit the source code and remove the check or increase the tolerance, but this may be catastrophic if your B is indefinite. A better solution is to reformulate the problem, solving the matrix pair (A,C) where C=alpha*A+beta*B is positive definite (note that then the eigenvalues become lambda/(beta+alpha*lambda)).</div><div class=""><br class=""></div><div class="">Jose</div><div><br class=""><blockquote type="cite" class=""><div class="">El 7 feb 2020, a las 1:00, Emmanuel Ayala <<a href="mailto:juaneah@gmail.com" class="">juaneah@gmail.com</a>> escribió:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span class="gmail-translation gmail-tlid-translation" lang="en"><span title="" class="gmail-">Hi everyone,</span></span><br class=""><br class="">I'm solving the eigenvalue problem of three bodies in the same program, it generates a three sets of matrices.<br class=""><br class="">I installed PETSc as optimized version:<br class=""><br class="">Configure
options --with-debugging=0 COPTFLAGS="-O2 -march=native -mtune=native"
CXXOPTFLAGS="-O2 -march=native -mtune=native" FOPTFLAGS="-O2
-march=native -mtune=native" --download-mpich --download-superlu_dist
--download-metis --download-parmetis --download-cmake
--download-fblaslapack=1 --with-cxx-dialect=C++11<br class=""><br class="">Then I
installed SLEPc in the standard form and referring to PETSc optimized
directory. I did NOT install SLEPc with --with-debugging=0, because I'm
still testing my code.<br class=""><br class="">My matrices comes from DMCreateMatrix, the
stiffness matrix and mass matrix. I use the function MatIsSymmetric to
check if my matrices are symmetric or not, and always the matrices are
symmetric (even when the program crash). For that reason I use:<br class=""><br class="">ierr = EPSSetProblemType(eps,EPS_GHEP); CHKERRQ(ierr);<br class="">ierr = EPSSetType(eps,EPSLOBPCG); CHKERRQ(ierr); // because I need the smallest<br class=""><br class="">The
problem is: sometimes the code works well for the three sets of
matrices and I get the expected results, but sometimes it does not
happen, it only works for the first sets of matrices, and then it
crashes, and when that occurs the error message is:<br class=""><br class="">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br class="">[0]PETSC ERROR: The inner product is not well defined: indefinite matrix<br class="">[0]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank" class="">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br class="">[0]PETSC ERROR: Petsc Release Version 3.12.3, Jan, 03, 2020 <br class="">[0]PETSC ERROR: ./comp on a linux-opt-02 named lnx by ayala Thu Feb 6 17:20:16 2020<br class="">[0]PETSC
ERROR: Configure options --with-debugging=0 COPTFLAGS="-O2
-march=native -mtune=native" CXXOPTFLAGS="-O2 -march=native
-mtune=native" FOPTFLAGS="-O2 -march=native -mtune=native"
--download-mpich --download-superlu_dist --download-metis
--download-parmetis --download-cmake --download-fblaslapack=1
--with-cxx-dialect=C++11<br class="">[0]PETSC ERROR: #1 BV_SafeSqrt() line 130 in /home/ayala/Documents/SLEPc/slepc-3.12.2/include/slepc/private/bvimpl.h<br class="">[0]PETSC ERROR: #2 BVNorm_Private() line 473 in /home/ayala/Documents/SLEPc/slepc-3.12.2/src/sys/classes/bv/interface/bvglobal.c<br class="">[0]PETSC ERROR: #3 BVNormColumn() line 718 in /home/ayala/Documents/SLEPc/slepc-3.12.2/src/sys/classes/bv/interface/bvglobal.c<br class="">[0]PETSC ERROR: #4 BV_NormVecOrColumn() line 26 in /home/ayala/Documents/SLEPc/slepc-3.12.2/src/sys/classes/bv/interface/bvorthog.c<br class="">[0]PETSC ERROR: #5 BVOrthogonalizeCGS1() line 136 in /home/ayala/Documents/SLEPc/slepc-3.12.2/src/sys/classes/bv/interface/bvorthog.c<br class="">[0]PETSC ERROR: #6 BVOrthogonalizeGS() line 188 in /home/ayala/Documents/SLEPc/slepc-3.12.2/src/sys/classes/bv/interface/bvorthog.c<br class="">[0]PETSC ERROR: #7 BVOrthonormalizeColumn() line 416 in /home/ayala/Documents/SLEPc/slepc-3.12.2/src/sys/classes/bv/interface/bvorthog.c<br class="">[0]PETSC ERROR: #8 EPSSolve_LOBPCG() line 144 in /home/ayala/Documents/SLEPc/slepc-3.12.2/src/eps/impls/cg/lobpcg/lobpcg.c<br class="">[0]PETSC ERROR: #9 EPSSolve() line 149 in /home/ayala/Documents/SLEPc/slepc-3.12.2/src/eps/interface/epssolve.c<br class=""><br class="">Number of iterations of the method: 0<br class="">Number of linear iterations of the method: 0<br class="">Solution method: lobpcg<br class=""><br class="">Number of requested eigenvalues: 6<br class="">Stopping condition: tol=1e-06, maxit=10000<br class="">Number of converged eigenpairs: 0<br class=""><br class="">The problem appears even when I run the same compilation.<br class=""><br class="">Anyone have any suggestions to solve the problem?<br class=""><br class="">Kind regards.</div>
</div></blockquote></div><br class=""></body></html>