<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:692926419;
mso-list-type:hybrid;
mso-list-template-ids:-1918753960 -1042890096 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Times New Roman",serif;
mso-ascii-font-family:Calibri;
mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";
color:windowtext;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="color:#201F1E;margin-left:0in;mso-list:l0 level1 lfo1">
<span style="color:windowtext">I was able to use </span><span style="font-family:"Segoe UI",sans-serif;background:white">MatIsHermitian function successfully since my matrix type is seqaij. Just hoped that it can return
</span><span style="color:windowtext">MatNorm </span><span style="font-family:"Segoe UI",sans-serif;background:white">(H -H^+) with this function. But it wasn’t hard for me to implement that with the function listed in the previous email.
<o:p></o:p></span></li><li class="MsoListParagraph" style="color:#201F1E;margin-left:0in;mso-list:l0 level1 lfo1">
<span style="font-family:"Segoe UI",sans-serif;background:white">I have a related question. In user manual
<a href="https://slepc.upv.es/documentation/slepc.pdf">https://slepc.upv.es/documentation/slepc.pdf</a></span><span style="font-family:"Segoe UI",sans-serif;color:black;background:white">
</span><span style="font-family:"Segoe UI",sans-serif;background:white"> 2.1, it says that Ax=\lambda B x problem is usually reformulated to B^-1 Ax =\lambda x. If A matrix is Hermitian, B is diagonal but Bii and Bjj can be different.<o:p></o:p></span></li></ol>
<p class="MsoListParagraph"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">a) Will solving “Ax=\lambda B x” directly with slepc guarantees users receiving orthogonal eigenvectors? Namely, does xi^T*B*xj=delta_ij hold true? <o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">b) if we reformulate, (B^-1A) x = \lambda x will yield (B^-1 A) to be non-hermitian and therefore doesn’t give orthogonal eigenvectors ( pointed out by
Jose). Xi^T*xj != delta_ij. What about xi^T*B*xj=delta_ij, will this be guaranteed(since this is the same problem as “a” )? Currently, my test is that xi^T*B*xj=delta_ij is no longer true.
<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">To help with visibility:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><img border="0" width="551" height="215" style="width:5.7395in;height:2.2395in" id="Picture_x0020_1" src="cid:image002.jpg@01D7EDE0.63827430"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white"><o:p> </o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">Although a and b are the same problem formulated differently, but the orthogonality isn’t ensured in the case b while in case a is ensured(?) . <o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">If so, does it mean that we should be encouraged to use case a ?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white"><o:p> </o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">Best,<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">Kuang
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Zhang, Hong <hzhang@mcs.anl.gov> <br>
<b>Sent:</b> Thursday, December 2, 2021 2:18 PM<br>
<b>To:</b> Wang, Kuang-chung <kuang-chung.wang@intel.com>; Jose E. Roman <jroman@dsic.upv.es><br>
<b>Cc:</b> petsc-users@mcs.anl.gov; Obradovic, Borna <borna.obradovic@intel.com>; Cea, Stephen M <stephen.m.cea@intel.com><br>
<b>Subject:</b> Re: [petsc-users] Orthogonality of eigenvectors in SLEPC<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Kuang,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">PETSc supports </span><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">MatIsHermitian() for SeqAIJ, IS and SeqSBAIJ matrix types. What is your matrix type? </span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">We should be able to add this support to other mat types.</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Segoe UI",sans-serif;color:#201F1E;background:white">Hong</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> petsc-users <<a href="mailto:petsc-users-bounces@mcs.anl.gov">petsc-users-bounces@mcs.anl.gov</a>> on behalf of Wang, Kuang-chung <<a href="mailto:kuang-chung.wang@intel.com">kuang-chung.wang@intel.com</a>><br>
<b>Sent:</b> Thursday, December 2, 2021 2:06 PM<br>
<b>To:</b> Jose E. Roman <<a href="mailto:jroman@dsic.upv.es">jroman@dsic.upv.es</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>>; Obradovic, Borna <<a href="mailto:borna.obradovic@intel.com">borna.obradovic@intel.com</a>>; Cea, Stephen
M <<a href="mailto:stephen.m.cea@intel.com">stephen.m.cea@intel.com</a>><br>
<b>Subject:</b> Re: [petsc-users] Orthogonality of eigenvectors in SLEPC</span> <o:p>
</o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thanks Jose for your prompt reply.<br>
I did find my matrix highly non-hermitian. By forcing the solver to be hermtian, the orthogonality was restored.
<br>
But I do need to root cause why my matrix is non-hermitian in the first place. <br>
Along the way, I highly recommend MatIsHermitian() function or combining functions like MatHermitianTranspose () MatAXPY MatNorm to determine the hermiticity to safeguard our program.
<br>
<br>
Best,<br>
Kuang <br>
<br>
-----Original Message-----<br>
From: Jose E. Roman <<a href="mailto:jroman@dsic.upv.es">jroman@dsic.upv.es</a>> <br>
Sent: Wednesday, November 24, 2021 6:20 AM<br>
To: Wang, Kuang-chung <<a href="mailto:kuang-chung.wang@intel.com">kuang-chung.wang@intel.com</a>><br>
Cc: <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>; Obradovic, Borna <<a href="mailto:borna.obradovic@intel.com">borna.obradovic@intel.com</a>>; Cea, Stephen M <<a href="mailto:stephen.m.cea@intel.com">stephen.m.cea@intel.com</a>><br>
Subject: Re: [petsc-users] Orthogonality of eigenvectors in SLEPC<br>
<br>
In Hermitian eigenproblems orthogonality of eigenvectors is guaranteed/enforced. But you are solving the problem as non-Hermitian.<br>
<br>
If your matrix is Hermitian, make sure you solve it as a HEP, and make sure that your matrix is numerically Hermitian.<br>
<br>
If your matrix is non-Hermitian, then you cannot expect the eigenvectors to be orthogonal. What you can do in this case is get an orthogonal basis of the computed eigenspace, see
<a href="https://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSGetInvariantSubspace.html">
https://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSGetInvariantSubspace.html</a><br>
<br>
<br>
By the way, version 3.7 is more than 5 years old, it is better if you can upgrade to a more recent version.<br>
<br>
Jose<br>
<br>
<br>
<br>
> El 24 nov 2021, a las 7:15, Wang, Kuang-chung <<a href="mailto:kuang-chung.wang@intel.com">kuang-chung.wang@intel.com</a>> escribió:<br>
> <br>
> Dear Jose : <br>
> I came across this thread describing issue using krylovschur and finding eigenvectors non-orthogonal.<br>
> <a href="https://lists.mcs.anl.gov/pipermail/petsc-users/2014-October/023360.ht">
https://lists.mcs.anl.gov/pipermail/petsc-users/2014-October/023360.ht</a><br>
> ml<br>
> <br>
> I furthermore have tested by reducing the tolerance as highlighted below from 1e-12 to 1e-16 with no luck.<br>
> Could you please suggest options/sources to try out ? <br>
> Thanks a lot for sharing your knowledge! <br>
> <br>
> Sincere,<br>
> Kuang-Chung Wang<br>
> <br>
> =======================================================<br>
> Kuang-Chung Wang<br>
> Computational and Modeling Technology<br>
> Intel Corporation<br>
> Hillsboro OR 97124<br>
> =======================================================<br>
> <br>
> Here are more info: <br>
> • slepc/3.7.4<br>
> • output message from by doing EPSView(eps,PETSC_NULL):<br>
> EPS Object: 1 MPI processes<br>
> type: krylovschur<br>
> Krylov-Schur: 50% of basis vectors kept after restart<br>
> Krylov-Schur: using the locking variant<br>
> problem type: non-hermitian eigenvalue problem<br>
> selected portion of the spectrum: closest to target: 20.1161 (in magnitude)<br>
> number of eigenvalues (nev): 40<br>
> number of column vectors (ncv): 81<br>
> maximum dimension of projected problem (mpd): 81<br>
> maximum number of iterations: 1000<br>
> tolerance: 1e-12<br>
> convergence test: relative to the eigenvalue BV Object: 1 MPI <br>
> processes<br>
> type: svec<br>
> 82 columns of global length 2988<br>
> vector orthogonalization method: classical Gram-Schmidt<br>
> orthogonalization refinement: always<br>
> block orthogonalization method: Gram-Schmidt<br>
> doing matmult as a single matrix-matrix product DS Object: 1 MPI <br>
> processes<br>
> type: nhep<br>
> ST Object: 1 MPI processes<br>
> type: sinvert<br>
> shift: 20.1161<br>
> number of matrices: 1<br>
> KSP Object: (st_) 1 MPI processes<br>
> type: preonly<br>
> maximum iterations=1000, initial guess is zero<br>
> tolerances: relative=1.12005e-09, absolute=1e-50, divergence=10000.<br>
> left preconditioning<br>
> using NONE norm type for convergence test<br>
> PC Object: (st_) 1 MPI processes<br>
> type: lu<br>
> LU: out-of-place factorization<br>
> tolerance for zero pivot 2.22045e-14<br>
> matrix ordering: nd<br>
> factor fill ratio given 0., needed 0.<br>
> Factored matrix follows:<br>
> Mat Object: 1 MPI processes<br>
> type: seqaij<br>
> rows=2988, cols=2988<br>
> package used to perform factorization: mumps<br>
> total: nonzeros=614160, allocated nonzeros=614160<br>
> total number of mallocs used during MatSetValues calls =0<br>
> MUMPS run parameters:<br>
> SYM (matrix type): 0 <br>
> PAR (host participation): 1 <br>
> ICNTL(1) (output for error): 6 <br>
> ICNTL(2) (output of diagnostic msg): 0 <br>
> ICNTL(3) (output for global info): 0 <br>
> ICNTL(4) (level of printing): 0 <br>
> ICNTL(5) (input mat struct): 0 <br>
> ICNTL(6) (matrix prescaling): 7 <br>
> ICNTL(7) (sequential matrix ordering):7 <br>
> ICNTL(8) (scaling strategy): 77 <br>
> ICNTL(10) (max num of refinements): 0 <br>
> ICNTL(11) (error analysis): 0 <br>
> ICNTL(12) (efficiency control): 1<br>
> ICNTL(13) (efficiency control): 0<br>
> ICNTL(14) (percentage of estimated workspace increase): 20<br>
> ICNTL(18) (input mat struct): 0<br>
> ICNTL(19) (Schur complement info): 0<br>
> ICNTL(20) (rhs sparse pattern): 0<br>
> ICNTL(21) (solution struct): 0<br>
> ICNTL(22) (in-core/out-of-core facility): 0<br>
> ICNTL(23) (max size of memory can be allocated locally):0<br>
> ICNTL(24) (detection of null pivot rows): 0<br>
> ICNTL(25) (computation of a null space basis): 0<br>
> ICNTL(26) (Schur options for rhs or solution): 0<br>
> ICNTL(27) (experimental parameter): -24<br>
> ICNTL(28) (use parallel or sequential ordering): 1<br>
> ICNTL(29) (parallel ordering): 0<br>
> ICNTL(30) (user-specified set of entries in inv(A)): 0<br>
> ICNTL(31) (factors is discarded in the solve phase): 0<br>
> ICNTL(33) (compute determinant): 0<br>
> CNTL(1) (relative pivoting threshold): 0.01<br>
> CNTL(2) (stopping criterion of refinement): 1.49012e-08<br>
> CNTL(3) (absolute pivoting threshold): 0.<br>
> CNTL(4) (value of static pivoting): -1.<br>
> CNTL(5) (fixation for null pivots): 0.<br>
> RINFO(1) (local estimated flops for the elimination after analysis):<br>
> [0] 8.15668e+07 <br>
> RINFO(2) (local estimated flops for the assembly after factorization):<br>
> [0] 892584. <br>
> RINFO(3) (local estimated flops for the elimination after factorization):<br>
> [0] 8.15668e+07 <br>
> INFO(15) (estimated size of (in MB) MUMPS internal data for running numerical factorization):<br>
> [0] 16 <br>
> INFO(16) (size of (in MB) MUMPS internal data used during numerical factorization):<br>
> [0] 16 <br>
> INFO(23) (num of pivots eliminated on this processor after factorization):<br>
> [0] 2988 <br>
> RINFOG(1) (global estimated flops for the elimination after analysis): 8.15668e+07<br>
> RINFOG(2) (global estimated flops for the assembly after factorization): 892584.<br>
> RINFOG(3) (global estimated flops for the elimination after factorization): 8.15668e+07<br>
> (RINFOG(12) RINFOG(13))*2^INFOG(34) (determinant): (0.,0.)*(2^0)<br>
> INFOG(3) (estimated real workspace for factors on all processors after analysis): 614160<br>
> INFOG(4) (estimated integer workspace for factors on all processors after analysis): 31971<br>
> INFOG(5) (estimated maximum front size in the complete tree): 246<br>
> INFOG(6) (number of nodes in the complete tree): 197<br>
> INFOG(7) (ordering option effectively use after analysis): 2<br>
> INFOG(8) (structural symmetry in percent of the permuted matrix after analysis): 100<br>
> INFOG(9) (total real/complex workspace to store the matrix factors after factorization): 614160<br>
> INFOG(10) (total integer space store the matrix factors after factorization): 31971<br>
> INFOG(11) (order of largest frontal matrix after factorization): 246<br>
> INFOG(12) (number of off-diagonal pivots): 0<br>
> INFOG(13) (number of delayed pivots after factorization): 0<br>
> INFOG(14) (number of memory compress after factorization): 0<br>
> INFOG(15) (number of steps of iterative refinement after solution): 0<br>
> INFOG(16) (estimated size (in MB) of all MUMPS internal data for factorization after analysis: value on the most memory consuming processor): 16<br>
> INFOG(17) (estimated size of all MUMPS internal data for factorization after analysis: sum over all processors): 16<br>
> INFOG(18) (size of all MUMPS internal data allocated during factorization: value on the most memory consuming processor): 16<br>
> INFOG(19) (size of all MUMPS internal data allocated during factorization: sum over all processors): 16<br>
> INFOG(20) (estimated number of entries in the factors): 614160<br>
> INFOG(21) (size in MB of memory effectively used during factorization - value on the most memory consuming processor): 14<br>
> INFOG(22) (size in MB of memory effectively used during factorization - sum over all processors): 14<br>
> INFOG(23) (after analysis: value of ICNTL(6) effectively used): 0<br>
> INFOG(24) (after analysis: value of ICNTL(12) effectively used): 1<br>
> INFOG(25) (after factorization: number of pivots modified by static pivoting): 0<br>
> INFOG(28) (after factorization: number of null pivots encountered): 0<br>
> INFOG(29) (after factorization: effective number of entries in the factors (sum over all processors)): 614160<br>
> INFOG(30, 31) (after solution: size in Mbytes of memory used during solution phase): 13, 13<br>
> INFOG(32) (after analysis: type of analysis done): 1<br>
> INFOG(33) (value used for ICNTL(8)): 7<br>
> INFOG(34) (exponent of the determinant if determinant is requested): 0<br>
> linear system matrix = precond matrix:<br>
> Mat Object: 1 MPI processes<br>
> type: seqaij<br>
> rows=2988, cols=2988<br>
> total: nonzeros=151488, allocated nonzeros=151488<br>
> total number of mallocs used during MatSetValues calls =0<br>
> using I-node routines: found 996 nodes, limit used is 5<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>