Skip to content

Commit 7f09f40

Browse files
committed
Fix SLATRS3 and CLATRS3 tests
Some SLATRS3 tests were failing with OpenBLAS where the RHS has a BIGNUM (=Infinity in this test) component. OpenBLAS SSCAL, when multiplying with 0, will turn this component into 0, unlike reference BLAS which turns it into NaN. While NaN looks more correct it still did not explain why DLATRS3 tests were succeeding where DSCAL has the same difference between reference and OpenBLAS. Diffing the test code unmasked a few bugs, which makes the test succeed and also unmasked a bug in the CLATRS3 test. The ZLATRS3 and DLATRS3 tests look correct to me.
1 parent 159cdae commit 7f09f40

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

TESTING/LIN/cchktr.f

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ SUBROUTINE CCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
541541
*
542542
SRNAMT = 'CLATRS3'
543543
CALL CCOPY( N, X, 1, B, 1 )
544-
CALL CCOPY( N, X, 1, B, 1 )
544+
CALL CCOPY( N, X, 1, B( N+1 ), 1 )
545545
CALL CSCAL( N, BIGNUM, B( N+1 ), 1 )
546546
CALL CLATRS3( UPLO, TRANS, DIAG, 'N', N, 2, A, LDA,
547547
$ B, MAX(1, N), SCALE3, RWORK, WORK, NMAX,
@@ -551,15 +551,15 @@ SUBROUTINE CCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
551551
*
552552
IF( INFO.NE.0 )
553553
$ CALL ALAERH( PATH, 'CLATRS3', INFO, 0,
554-
$ UPLO // TRANS // DIAG // 'Y', N, N,
554+
$ UPLO // TRANS // DIAG // 'N', N, N,
555555
$ -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
556556
CALL CTRT03( UPLO, TRANS, DIAG, N, 1, A, LDA,
557557
$ SCALE3( 1 ), RWORK, ONE, B( 1 ), LDA,
558558
$ X, LDA, WORK, RESULT( 10 ) )
559559
CALL CSSCAL( N, BIGNUM, X, 1 )
560560
CALL CTRT03( UPLO, TRANS, DIAG, N, 1, A, LDA,
561561
$ SCALE3( 2 ), RWORK, ONE, B( N+1 ), LDA,
562-
$ X, LDA, WORK, RESULT( 10 ) )
562+
$ X, LDA, WORK, RES )
563563
RESULT( 10 ) = MAX( RESULT( 10 ), RES )
564564
*
565565
* Print information about the tests that did not pass

TESTING/LIN/schktr.f

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,11 @@ SUBROUTINE SCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
555555
*
556556
IF( INFO.NE.0 )
557557
$ CALL ALAERH( PATH, 'SLATRS3', INFO, 0,
558-
$ UPLO // TRANS // DIAG // 'Y', N, N,
558+
$ UPLO // TRANS // DIAG // 'N', N, N,
559559
$ -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
560560
*
561561
CALL STRT03( UPLO, TRANS, DIAG, N, 1, A, LDA,
562-
$ SCALE3 ( 1 ), RWORK, ONE, B( N+1 ), LDA,
562+
$ SCALE3( 1 ), RWORK, ONE, B( 1 ), LDA,
563563
$ X, LDA, WORK, RESULT( 10 ) )
564564
CALL SSCAL( N, BIGNUM, X, 1 )
565565
CALL STRT03( UPLO, TRANS, DIAG, N, 1, A, LDA,

0 commit comments

Comments
 (0)