Skip to content

Commit 88e91a5

Browse files
committed
Testing: initialize ISPEC=9 before running DMD tests
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.
1 parent 774b05d commit 88e91a5

6 files changed

Lines changed: 20 additions & 12 deletions

File tree

TESTING/EIG/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,22 @@ endmacro()
111111

112112
if(BUILD_SINGLE)
113113
add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST})
114-
add_eig_executable(xdmdeigtsts ${SDMDEIGTST})
114+
add_eig_executable(xdmdeigtsts ${SDMDEIGTST} ${AEIGTST})
115115
endif()
116116

117117
if(BUILD_COMPLEX)
118118
add_eig_executable(xeigtstc ${CEIGTST} ${SCIGTST} ${AEIGTST})
119-
add_eig_executable(xdmdeigtstc ${CDMDEIGTST})
119+
add_eig_executable(xdmdeigtstc ${CDMDEIGTST} ${AEIGTST})
120120
endif()
121121

122122

123123
if(BUILD_DOUBLE)
124124
add_eig_executable(xeigtstd ${DEIGTST} ${DZIGTST} ${AEIGTST})
125-
add_eig_executable(xdmdeigtstd ${DDMDEIGTST})
125+
add_eig_executable(xdmdeigtstd ${DDMDEIGTST} ${AEIGTST})
126126
endif()
127127

128128
if(BUILD_COMPLEX16)
129129
add_eig_executable(xeigtstz ${ZEIGTST} ${DZIGTST} ${AEIGTST})
130-
add_eig_executable(xdmdeigtstz ${ZDMDEIGTST})
130+
add_eig_executable(xdmdeigtstz ${ZDMDEIGTST} ${AEIGTST})
131131
add_eig_executable(test_wq_zrwork test_wq_rwork.f)
132132
endif()

TESTING/EIG/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,16 @@ complex: xeigtstc xdmdeigtstc
135135
double: xeigtstd xdmdeigtstd
136136
complex16: xeigtstz xdmdeigtstz
137137

138-
xdmdeigtsts: $(SDMDEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)
138+
xdmdeigtsts: $(SDMDEIGTST) $(AEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)
139139
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
140140

141-
xdmdeigtstc: $(CDMDEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)
141+
xdmdeigtstc: $(CDMDEIGTST) $(AEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)
142142
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
143143

144-
xdmdeigtstd: $(DDMDEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)
144+
xdmdeigtstd: $(DDMDEIGTST) $(AEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)
145145
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
146146

147-
xdmdeigtstz: $(ZDMDEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)
147+
xdmdeigtstz: $(ZDMDEIGTST) $(AEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)
148148
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
149149

150150
xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) $(TMGLIB) $(LAPACKLIB) $(BLASLIB)

TESTING/EIG/cchkdmd.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ PROGRAM DMD_TEST
8282
LOGICAL :: TEST_QRDMD
8383

8484
!..... external subroutines (BLAS and LAPACK)
85-
EXTERNAL CAXPY, CGEEV, CGEMM, CGEMV, CLASCL
85+
EXTERNAL CAXPY, CGEEV, CGEMM, CGEMV, CLASCL, XLAENV
8686
!.....external subroutines DMD package
8787
! subroutines under test
8888
EXTERNAL CGEDMD, CGEDMDQ
@@ -112,6 +112,8 @@ PROGRAM DMD_TEST
112112

113113
WANTQ = 'Q'
114114
WANTR = 'R'
115+
! Initialize the divide-and-conquer cutoff used by xGESDD/xBDSDC.
116+
CALL XLAENV( 9, 25 )
115117
!.................................................................................
116118

117119
EPS = SLAMCH( 'P' ) ! machine precision WP

TESTING/EIG/dchkdmd.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ PROGRAM DMD_TEST
9595
LOGICAL TEST_QRDMD
9696
!..... external subroutines (BLAS and LAPACK)
9797
EXTERNAL DAXPY, DGEEV, DGEMM, DGEMV, DLACPY, DLASCL
98-
EXTERNAL DLARNV, DLATMR
98+
EXTERNAL DLARNV, DLATMR, XLAENV
9999
!.....external subroutines DMD package, part 1
100100
! subroutines under test
101101
EXTERNAL DGEDMD, DGEDMDQ
@@ -118,6 +118,8 @@ PROGRAM DMD_TEST
118118
! be performed with xGEDMDQ.
119119
WANTQ = 'Q'
120120
WANTR = 'R'
121+
! Initialize the divide-and-conquer cutoff used by xGESDD/xBDSDC.
122+
CALL XLAENV( 9, 25 )
121123
!.................................................................................
122124

123125
EPS = DLAMCH( 'P' ) ! machine precision DP

TESTING/EIG/schkdmd.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ PROGRAM DMD_TEST
9595
LOGICAL TEST_QRDMD
9696
!..... external subroutines (BLAS and LAPACK)
9797
EXTERNAL SAXPY, SGEEV, SGEMM, SGEMV, SLACPY, SLASCL
98-
EXTERNAL SLARNV, SLATMR
98+
EXTERNAL SLARNV, SLATMR, XLAENV
9999
!.....external subroutines DMD package, part 1
100100
! subroutines under test
101101
EXTERNAL SGEDMD, SGEDMDQ
@@ -118,6 +118,8 @@ PROGRAM DMD_TEST
118118
! be performed with xGEDMDQ.
119119
WANTQ = 'Q'
120120
WANTR = 'R'
121+
! Initialize the divide-and-conquer cutoff used by xGESDD/xBDSDC.
122+
CALL XLAENV( 9, 25 )
121123
!.................................................................................
122124

123125
EPS = SLAMCH( 'P' ) ! machine precision SP

TESTING/EIG/zchkdmd.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ PROGRAM DMD_TEST
8686
!.....external subroutines (BLAS and LAPACK)
8787
EXTERNAL DAXPY, DGEEV, DGEMM, DGEMV, DLACPY, DLASCL
8888
EXTERNAL ZGEEV, ZGEMV, ZLASCL
89-
EXTERNAL ZLARNV, ZLATMR
89+
EXTERNAL ZLARNV, ZLATMR, XLAENV
9090
EXTERNAL ZAXPY, ZGEMM
9191
!.....external subroutines DMD package, part 1
9292
! subroutines under test
@@ -112,6 +112,8 @@ PROGRAM DMD_TEST
112112
! be performed with xGEDMDQ.
113113
WANTQ = 'Q'
114114
WANTR = 'R'
115+
! Initialize the divide-and-conquer cutoff used by xGESDD/xBDSDC.
116+
CALL XLAENV( 9, 25 )
115117
!.................................................................................
116118

117119
EPS = DLAMCH( 'P' ) ! machine precision DP

0 commit comments

Comments
 (0)