[Trilinos-Users] Confusing behavior from Anasazi

Rutherford, Joseph M jmruther at illinois.edu
Mon Dec 21 08:18:36 EST 2015


For clarity I have attached the code that illustrates the problem; the single argument used by main() is assumed to be one of the eigenvalue requests honored by Anasazi.  While the results don't agree with my reference calculations, "LM" converges.  "SM" causes the crash.

Any insights would be much appreciated.

From: Rutherford, Joseph M
Sent: Saturday, December 19, 2015 9:47 PM
To: Alicia Klinvex
Cc: trilinos-users at trilinos.org
Subject: RE: [Trilinos-Users] Confusing behavior from Anasazi


I’m solving a small problem in preparation for a larger one.  To answer your questions,

1.)    I’m using BlockKrylovSchurSolMgr()

2.)              Index requested_eigenvalue_count(6);

3.)              Index block_size(6);

4.)              parameters.set("Which",select_eigenvalues.c_str()); // “SM”

5.)              parameters.set("Convergence Tolerance", Real(1e-6));

6.)              parameters.set("Num Blocks",Index(5));

7.)              parameters.set("Block Size",block_size);

8.)    Matrix is not ill-conditioned.

9.)    I’m using CrsMatrix

10.)  996 eigenvalues are 1, and 4 are complex with magnitude near 1

If it would help, I can send source code (single cpp file) Monday.  Here’s the Python version of my system:

import scipy as sp
from scipy import linalg
import numpy as np

a = np.array([[1+0j,3+4j,5+6j,7+8j],[3-3j,5+0j,7+8j,9+0j],[5-6j,7-8j,7+0j,9+0j],[7-8j,9+0j,9+0j,9+0j]])
b = a + np.eye(4)
aa = np.eye(1000,dtype=complex)
bb = np.eye(1000,dtype=complex)
for row in range(a.shape[0]):
    aa[row,:len(a[row])] = a[row,:]
for row in range(b.shape[0]):
    bb[row,:len(b[row])] = b[row,:]

In [10]: sp.linalg.eigvals(a,b)[:6]
array([ 0.81945921-0.00653057j,  0.96898931+0.00015298j,
        1.22656428-0.01245524j,  1.13535048+0.00519082j])
In [12]: sp.linalg.eigvals(aa,bb)[:6]
array([ 0.81945921-0.00653057j,  0.96898931+0.00015298j,
        1.22656428-0.01245524j,  1.13535048+0.00519082j,
        1.00000000+0.j        ,  1.00000000+0.j        ])



From: Alicia Klinvex [mailto:aklinvex at purdue.edu]
Sent: Saturday, December 19, 2015 8:03 PM
To: Rutherford, Joseph M <jmruther at illinois.edu>
Cc: trilinos-users at trilinos.org
Subject: Re: [Trilinos-Users] Confusing behavior from Anasazi

Hello Joe,

I'm sorry you're having some trouble with Anasazi, and I hope we can help.  Can you tell us a little more about your problem first though?  For instance, which eigensolver are you using?  What parameters did you set?  Is your matrix singular or ill-conditioned?  Are you storing it as a CrsMatrix?  Are the eigenvalues clustered?

Thank you,

On Sat, Dec 19, 2015 at 6:31 PM, Rutherford, Joseph M <jmruther at illinois.edu<mailto:jmruther at illinois.edu>> wrote:
Anasazi team:

When I attempt to solve a non-Hermitian real or complex eigenvalue problem for the smallest magnitude Eigenvalues, Anasazi freezes with full CPU utilization.  Largest magnitude eigenvalue solves converge.  Does anyone have guidance for how to determine what I’m doing wrong?

I seem to be stuck in the while(doGramSchmidt) loop at line 564 of AnasaziSVBQOrthoManager.cpp.

I should point out that in my nontrivial cases which do converge the answers are in disagreement with other tools. However, it seems more important to resolve the hanging than to figure out why the answers differ. The test C++ code can be shared if need be.



Trilinos-Users mailing list
Trilinos-Users at trilinos.org<mailto:Trilinos-Users at trilinos.org>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: complex_case.cpp
Type: text/x-c++src
Size: 9639 bytes
Desc: complex_case.cpp
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20151221/a4d376bf/attachment.bin>

More information about the Trilinos-Users mailing list