Skip to content

Commit bffac66

Browse files
committed
Fix bounds-violations in DLASET-calls
The last parameter must satisfy `LDA >= max(1,M)`, where M is the number of rows of the matrix, see https://github.com/Reference-LAPACK/lapack/blob/v3.9.0/SRC/dlaset.f#L95 Suggested-By: Serguei Patchkovskii <[email protected]>
1 parent 94994eb commit bffac66

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

TESTING/EIG/cchkst2stg.f

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,8 @@ SUBROUTINE CCHKST2STG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
10141014
* the one from above. Compare it with D1 computed
10151015
* using the 1-stage.
10161016
*
1017-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
1018-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
1017+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
1018+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
10191019
CALL CLACPY( 'U', N, N, A, LDA, V, LDU )
10201020
LH = MAX(1, 4*N)
10211021
LW = LWORK - LH
@@ -1048,8 +1048,8 @@ SUBROUTINE CCHKST2STG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
10481048
* the one from above. Compare it with D1 computed
10491049
* using the 1-stage.
10501050
*
1051-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
1052-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
1051+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
1052+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
10531053
CALL CLACPY( 'L', N, N, A, LDA, V, LDU )
10541054
CALL CHETRD_2STAGE( 'N', "L", N, V, LDU, SD, SE, TAU,
10551055
$ WORK, LH, WORK( LH+1 ), LW, IINFO )

TESTING/EIG/dchksb2stg.f

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,8 @@ SUBROUTINE DCHKSB2STG( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE,
670670
* the one from above. Compare it with D1 computed
671671
* using the DSBTRD.
672672
*
673-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
674-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
673+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
674+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
675675
CALL DLACPY( ' ', K+1, N, A, LDA, U, LDU )
676676
LH = MAX(1, 4*N)
677677
LW = LWORK - LH
@@ -743,8 +743,8 @@ SUBROUTINE DCHKSB2STG( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE,
743743
* the one from above. Compare it with D1 computed
744744
* using the DSBTRD.
745745
*
746-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
747-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
746+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
747+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
748748
CALL DLACPY( ' ', K+1, N, A, LDA, U, LDU )
749749
LH = MAX(1, 4*N)
750750
LW = LWORK - LH

TESTING/EIG/dchkst2stg.f

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,8 @@ SUBROUTINE DCHKST2STG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
999999
* the one from above. Compare it with D1 computed
10001000
* using the 1-stage.
10011001
*
1002-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
1003-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
1002+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
1003+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
10041004
CALL DLACPY( "U", N, N, A, LDA, V, LDU )
10051005
LH = MAX(1, 4*N)
10061006
LW = LWORK - LH
@@ -1032,8 +1032,8 @@ SUBROUTINE DCHKST2STG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
10321032
* the one from above. Compare it with D1 computed
10331033
* using the 1-stage.
10341034
*
1035-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
1036-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
1035+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
1036+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
10371037
CALL DLACPY( "L", N, N, A, LDA, V, LDU )
10381038
CALL DSYTRD_2STAGE( 'N', "L", N, V, LDU, SD, SE, TAU,
10391039
$ WORK, LH, WORK( LH+1 ), LW, IINFO )

TESTING/EIG/zchkhb2stg.f

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,8 @@ SUBROUTINE ZCHKHB2STG( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE,
680680
* the one from above. Compare it with D1 computed
681681
* using the DSBTRD.
682682
*
683-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
684-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
683+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
684+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
685685
CALL ZLACPY( ' ', K+1, N, A, LDA, U, LDU )
686686
LH = MAX(1, 4*N)
687687
LW = LWORK - LH
@@ -753,8 +753,8 @@ SUBROUTINE ZCHKHB2STG( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE,
753753
* the one from above. Compare it with D1 computed
754754
* using the DSBTRD.
755755
*
756-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
757-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
756+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
757+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
758758
CALL ZLACPY( ' ', K+1, N, A, LDA, U, LDU )
759759
LH = MAX(1, 4*N)
760760
LW = LWORK - LH

TESTING/EIG/zchkst2stg.f

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,8 @@ SUBROUTINE ZCHKST2STG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
10141014
* the one from above. Compare it with D1 computed
10151015
* using the 1-stage.
10161016
*
1017-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
1018-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
1017+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
1018+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
10191019
CALL ZLACPY( 'U', N, N, A, LDA, V, LDU )
10201020
LH = MAX(1, 4*N)
10211021
LW = LWORK - LH
@@ -1048,8 +1048,8 @@ SUBROUTINE ZCHKST2STG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
10481048
* the one from above. Compare it with D1 computed
10491049
* using the 1-stage.
10501050
*
1051-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
1052-
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
1051+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
1052+
CALL DLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
10531053
CALL ZLACPY( 'L', N, N, A, LDA, V, LDU )
10541054
CALL ZHETRD_2STAGE( 'N', "L", N, V, LDU, SD, SE, TAU,
10551055
$ WORK, LH, WORK( LH+1 ), LW, IINFO )

0 commit comments

Comments
 (0)