[Trilinos-Users] Anasazi LI and SI bug + patch

Pavel Holoborodko pavel at holoborodko.com
Tue Sep 1 04:19:14 EDT 2015


I have extended description of the sorting modes in Anasazi::BasicSort.
Now sorting functionality coincide with ARPACK semantic as it was intended.

Before this commit imaginary parts were sorted algebraically in LI/SI modes.
That was incorrect and lead to splitting the conjugate pairs apart (as
described in my first e-mail).

Now imaginary parts are sorted by magnitude (as in ARPACK) and thus
conjugate pairs are preserved.

Patches are in attachment - only these two should be applied.


On Tue, Sep 1, 2015 at 2:27 PM, Pavel Holoborodko <pavel at holoborodko.com>
wrote:

> *Symptoms*
> BlockKrylovSchurSolMgr crashes when used in 'LI' and 'SI' modes.
> (or TREXC ends with error "** on entry DTREXC, parameter number 7 had an
> illegal value")
>
>
> *Reason*
> BlockKrylovSchur requires that conjugate Ritz values are stored one after
> another.
> (e.g. TREXC, sortRitzValues, etc.)
>
> But, in case of 'LI' and 'SI', BasicSort::sort breaks conjugate pairs and
> might place them far apart after sorting.
>
> As a result, this code is unpredictable, AnasaziBlockKrylovSchur.hpp,
> 1604-1605 lines:
>
>     // Sort using both the real and imaginary parts of the Ritz values.
>     sm_->sort(tmp_rRitzValues, tmp_iRitzValues,
> Teuchos::rcpFromRef(ritzOrder_) , curDim_); *// <- places conjugate
> values apart*
>     HelperTraits<ScalarType>::sortRitzValues( tmp_rRitzValues,
> tmp_iRitzValues, &ritzValues_, &ritzOrder_, &ritzIndex_ ); *// <-
> requires clustered conjugate pairs*
>
> *Fix*
> Patch is in attachment.
> It makes the BasicSort class to preserve clustered storage of conjugate
> eigenvalues in 'LI' and 'SI' modes.
>
> ***
> Please consider applying the patch as now Anasazi is unable to operate in
> LI and SI modes (finding eigenvalues with largest/smallest imaginary parts).
>
> Thank you,
> Pavel.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20150901/210f576f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixed-Anasazi-BasicSort-class-to-preserve-clustered-.patch
Type: application/octet-stream
Size: 3065 bytes
Desc: not available
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20150901/210f576f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Clarification-on-sorting-modes.-Now-it-matches-the-A.patch
Type: application/octet-stream
Size: 1266 bytes
Desc: not available
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20150901/210f576f/attachment-0003.obj>


More information about the Trilinos-Users mailing list