Replace REALONE/REALZERO and complex ZERO/ONE with
type-specific named constants in the CSD test routines:
ZERO/ONE for real scalars, and CZERO/CONE for complex values.
Update {C,Z}LASET, {C,Z}GEMM, and {C,Z}HERK call sites to use
the matching constant type, and replace literal imaginary zeros
in CMPLX/DCMPLX calls with the named real ZERO constant.
No functional change intended.
Replace hard-coded floating-point constants with existing named
constants in the drvrf3 and drvrfp test drivers. This keeps the test
initialization code consistent with surrounding LAPACK test style.
TESTING/csd.in declares that the number of values of M, P, and Q
is 10, but each of the three data lines actually contains 11
entries.
Update the count to 11 so the header matches the test input data.
This is a test-data consistency fix only.
Replace hard-coded 1./1.D0 literals with the named constant ONE
in several TESTING/EIG error-exit test routines.
Add missing ONE parameter declarations where needed so the test
setup code follows the surrounding named-constant style.
The DMD test drivers use the testing ILAENV from TESTING/EIG, where
ISPEC=9 returns IPARMS(9). The drivers never initialized that entry,
so the xGESDD/xBDSDC divide-and-conquer cutoff SMLSIZ came from
undefined state.
This undefined test state can lead to invalid xLASD0 calls and a large
number of false failures. In this patch we initialize XLAENV(9,25) in
the s/c/d/z DMD test drivers so the tests start from a defined ILAENV
configuration.
Several LAPACK, BLAS, and CBLAS source files defined a local statement
function named ABS1 for the complex 1-norm approximation:
ABS1( X ) = ABS( REAL( X ) ) + ABS( AIMAG( X ) )
ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) )
The majority of the codebase already uses CABS1 for this identical
purpose. This commit renames ABS1 to CABS1 in all remaining files
(definition line, declaration line, and all call sites within the
same file) to make the naming consistent across the repository.
A small number of fixed-form lines required continuation-line splits
to stay within the 72-column limit after the rename.
No numerical change. Statement functions are file-local in Fortran,
so there is no ABI or interface impact.
This is a preparatory cleanup before inlining these statement
functions (see issue #1200).
Turn on test options that were left disabled in several TESTING input files.
Set "Put T to test the driver routines" to T in cgg.in, dgg.in, sgg.in,
and zgg.in so the generalized nonsymmetric eigenvalue driver tests are run.
Also set "Put T to test the error exits" to T in cbb.in, dbb.in, sbb.in,
and zbb.in to restore the corresponding error-exit checks.
Turn on test options that were left disabled in several TESTING input files.
Set "Put T to test the driver routines" to T in cgg.in, dgg.in, sgg.in,
and zgg.in so the generalized nonsymmetric eigenvalue driver tests are run.
Also set "Put T to test the error exits" to T in cbb.in, dbb.in, sbb.in,
and zbb.in to restore the corresponding error-exit checks.
In cdrvsg2stg.f, ddrvsg2stg.f, sdrvsg2stg.f, and zdrvsg2stg.f, the
three RANGE='A'/'V'/'I' calls to CHPGVX, DSPGVX, SSPGVX, and ZHPGVX
were passing INFO as the output error argument instead of IINFO.
The error-check block immediately following each call tests IINFO.NE.0,
but IINFO was never updated by the routine, so errors were silently
ignored. Additionally, the block sets INFO = ABS(IINFO), which would
overwrite the value ZHPGVX/xSPGVX had written into INFO with the
stale value of IINFO.
All other driver calls in these files (ZHEGV, ZHEGVD, ZHEGVX, ZHPGV,
ZHPGVD, ZHBGV, ZHBGVD, ZHBGVX and their s/d/c equivalents) correctly
use IINFO. This commit brings the xSPGVX/xHPGVX calls into line with
the established pattern.
Affected routines (3 call sites each):
CHPGVX in cdrvsg2stg.f
DSPGVX in ddrvsg2stg.f
SSPGVX in sdrvsg2stg.f
ZHPGVX in zdrvsg2stg.f
In ddrvst.f, ddrvst2stg.f, and dlatm4.f, DBLE() was applied to
DOUBLE PRECISION array elements assigned to DOUBLE PRECISION
variables ― a no-op conversion. Similarly, in sdrvst.f,
sdrvst2stg.f, and slatm4.f, REAL() was applied to REAL array
elements assigned to REAL variables.
Remove these 168 redundant calls. Integer-to-real conversions
(e.g., DBLE(N), DBLE(KLEN-1), REAL(MAX(1,N))) are retained as
they are semantically necessary.
The four TESTING/LIN routines currently document ISEED as an
INTEGER array of dimension (4), but their dummy argument
declarations use ISEED(*).
All four routines pass ISEED to CLARND or ZLARND, whose interfaces
require ISEED(4) and document that the fourth element must be odd.
Replace the assumed-size declaration with an explicit size of 4 in
both the commented argument declarations and the actual dummy
argument declarations, so that the source matches the documented
contract and the callee interfaces.
No functional change is intended.
The default seed generates a matrix for N=6, JTYPE=21 that causes
DGGES to fail (INFO=9) when compiled without FMA instructions.
Use a custom seed that avoids this specific ill-conditioned case
while maintaining full test coverage.
Consolidated the initialization of the RESULT array and the reporting of
test outcomes for the xCHKQP3RK tests. The initialization of the RESULT array to
zeros is now occurring immediately before the tests, ensuring a clean
slate without scattering across different test phases. Reporting
functionality has been centralized at the end of the 5 tests,
eliminating redundant blocks and improving maintainability.