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
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.
This is mostly a long term maintenance improvement.
Many coding styles require elimination of trailing whitespace, and
many editors and source code management configurations automatically
gobble up whitespace. When these tools gobble up whitespace, it
complicates reviewing the meaningful code changes.
By removing whitespace on one patch, it makes future
code reviews much easier.
=SCRIPT====================================================================
if which tempfile &>/dev/null; then
TEMPMAKER=tempfile
elif which mktemp &>/dev/null; then
TEMPMAKER=mktemp
else
echo "Cannot find tempfile program." 2>&1
exit 1
fi
MYTEMP=$($TEMPMAKER)
trap 'rm -f $MYTEMP' SIGINT SIGTERM
stripit() {
echo "stripping $1"
sed 's/[ \t]*$//' "$1" > $MYTEMP
cp $MYTEMP "$1"
}
if [ $# -gt 0 ]; then
while [ "$1" != "" ]; do
stripit $1
shift
done
else
while read -t 2; do
stripit $REPLY
done
fi
rm $MYTEMP
=================================================
Use \par instead of \details for section.
add a Contributors Section and a Reference Section.
Remove (some) verbatim section when not needed.
Those changes have been done by hand so I am not sure I manage to catch them all.