In 26 driver routines across all four precisions (S, D, C, Z),
xSTEBZ was called writing directly to INFO, which was then
silently overwritten by xSTEIN. Two bugs are fixed:
1. xSTEBZ errors were not propagated to the caller at all.
2. When xSTEBZ returned INFO > 0, eigenvectors were computed
with an incomplete or empty eigenvalue set (INFO=2,3,4) or
with reduced accuracy (INFO=1), producing silently wrong
results.
Fix: route xSTEBZ return value through IINFO. For INFO != 1,
skip xSTEIN entirely via GO TO. For INFO == 1 (bisection
convergence warning), xSTEIN is still called since M eigenvalues
are available; the warning is preserved in INFO.
The xSTEBZ error is encoded as INFO = N + IINFO to distinguish
it from xSTEIN failures (1..N), matching the convention already
used for xPBSTF errors in the xBGVX routines. For the four
xBGVX routines, which already use INFO = N+i for xPBSTF, the
xSTEBZ error is encoded as INFO = 2*N + IINFO.
Update INFO documentation in all 26 files accordingly.
Also add IINFO to the INTEGER declaration in dstevx.f and
sstevx.f where it was missing.
Files modified (26):
SRC/chbevx.f, SRC/chbevx_2stage.f, SRC/chbgvx.f,
SRC/cheevx.f, SRC/cheevx_2stage.f, SRC/chpevx.f,
SRC/dsbevx.f, SRC/dsbevx_2stage.f, SRC/dsbgvx.f,
SRC/dspevx.f, SRC/dstevx.f, SRC/dsyevx.f, SRC/dsyevx_2stage.f,
SRC/ssbevx.f, SRC/ssbevx_2stage.f, SRC/ssbgvx.f,
SRC/sspevx.f, SRC/sstevx.f, SRC/ssyevx.f, SRC/ssyevx_2stage.f,
SRC/zhbevx.f, SRC/zhbevx_2stage.f, SRC/zhbgvx.f,
SRC/zheevx.f, SRC/zheevx_2stage.f, SRC/zhpevx.f
Added ilaenv2stage.f to enable the extraction of 2stage machine dependent
variables from the 2stage solver without having to rely on compiling the
entire library with the recursive flag.
Secondly, all calls to ILAENV( 17 <= 21, ...) have been fixed to
use the corresponding ILAENV2STAGE routine by translating ISPEC by -16
I.e.
ILAENV( 17, ...) == ILAENV2STAGE( 1, ...)
Also fixed the documentation of ilaenv.f to specify the cases of ISPEC > 16.
Signed-off-by: Nick Papior <nickpapior@gmail.com>
This is really old school, but a lot of times we have users sending us
copy pasting of codes, and that is the only way to know the version of
the code.