From 997dffb725247506f987735ac96c1d8b5ae213c7 Mon Sep 17 00:00:00 2001 From: Bob Droge Date: Wed, 5 Jun 2024 11:40:31 +0000 Subject: [PATCH] add two patches for OpenBLAS 0.3.27 --- ...penBLAS-0.3.26_lapack_qr_noninittest.patch | 640 ++++++++++++++++++ .../o/OpenBLAS/OpenBLAS-0.3.27-GCC-13.3.0.eb | 8 +- ....3.27_riscv-drop-static-fortran-flag.patch | 31 + 3 files changed, 677 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.26_lapack_qr_noninittest.patch create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27_riscv-drop-static-fortran-flag.patch diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.26_lapack_qr_noninittest.patch b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.26_lapack_qr_noninittest.patch new file mode 100644 index 000000000000..f6940980d1f8 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.26_lapack_qr_noninittest.patch @@ -0,0 +1,640 @@ +See https://github.com/OpenMathLib/OpenBLAS/issues/4625 +Uninitialized test results in the GEQP3RK routines introduced with LAPACK 3.12 +and in OpenBLAS 0.3.26 are causing abnormal number of errors. +Fixed with https://github.com/OpenMathLib/OpenBLAS/pull/4647 +(should not be needed for OpenBLAS > 0.3.27) +index 79d6add72e..b794d4664c 100644 +--- lapack-netlib/TESTING/LIN/cchkqp3rk.f.orig ++++ lapack-netlib/TESTING/LIN/cchkqp3rk.f +@@ -608,6 +608,9 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + CALL CLACPY( 'All', M, NRHS, COPYB, LDA, + $ B, LDA ) + CALL ICOPY( N, IWORK( 1 ), 1, IWORK( N+1 ), 1 ) ++ DO I = 1, NTESTS ++ RESULT( I ) = ZERO ++ END DO + * + ABSTOL = -1.0 + RELTOl = -1.0 +@@ -652,16 +655,6 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + RESULT( 1 ) = CQRT12( M, N, A, LDA, S, WORK, + $ LWORK , RWORK ) + * +- DO T = 1, 1 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX, +- $ IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 1 + * + * End test 1 +@@ -675,7 +668,7 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * 1-norm( A*P - Q*R ) / ( max(M,N) * 1-norm(A) * EPS ) + * + RESULT( 2 ) = CQPT01( M, N, KFACT, COPYA, A, LDA, TAU, +- $ IWORK( N+1 ), WORK, LWORK ) ++ $ IWORK( N+1 ), WORK, LWORK ) + * + * Compute test 3: + * +@@ -684,21 +677,8 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * 1-norm( Q**T * Q - I ) / ( M * EPS ) + * + RESULT( 3 ) = CQRT11( M, KFACT, A, LDA, TAU, WORK, +- $ LWORK ) ++ $ LWORK ) + * +-* Print information about the tests that did not pass +-* the threshold. +-* +- DO T = 2, 3 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 2 + * + * Compute test 4: +@@ -717,8 +697,8 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + DO J = 1, KFACT-1, 1 + * +- DTEMP = (( ABS( A( (J-1)*M+J ) ) - +- $ ABS( A( (J)*M+J+1 ) ) ) / ++ DTEMP = (( ABS( A( (J-1)*LDA+J ) ) - ++ $ ABS( A( (J)*LDA+J+1 ) ) ) / + $ ABS( A(1) ) ) + * + IF( DTEMP.LT.ZERO ) THEN +@@ -727,20 +707,6 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + END DO + * +-* Print information about the tests that did not +-* pass the threshold. +-* +- DO T = 4, 4 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', +- $ M, N, NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, +- $ RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 1 + * + * End test 4. +@@ -762,42 +728,41 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + LWORK_MQR = MAX(1, NRHS) + CALL CUNMQR( 'Left', 'Conjugate transpose', +- $ M, NRHS, KFACT, A, LDA, TAU, B, LDA, +- $ WORK, LWORK_MQR, INFO ) ++ $ M, NRHS, KFACT, A, LDA, TAU, B, LDA, ++ $ WORK, LWORK_MQR, INFO ) + * + DO I = 1, NRHS + * + * Compare N+J-th column of A and J-column of B. + * + CALL CAXPY( M, -CONE, A( ( N+I-1 )*LDA+1 ), 1, +- $ B( ( I-1 )*LDA+1 ), 1 ) ++ $ B( ( I-1 )*LDA+1 ), 1 ) + END DO + * +- RESULT( 5 ) = +- $ ABS( +- $ CLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) / +- $ ( REAL( M )*SLAMCH( 'Epsilon' ) ) +- $ ) +-* +-* Print information about the tests that did not pass +-* the threshold. +-* +- DO T = 5, 5 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO ++ RESULT( 5 ) = ABS( ++ $ CLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) / ++ $ ( REAL( M )*SLAMCH( 'Epsilon' ) ) ) ++* + NRUN = NRUN + 1 + * + * End compute test 5. + * + END IF + * ++* Print information about the tests that did not pass ++* the threshold. ++* ++ DO T = 1, NTESTS ++ IF( RESULT( T ).GE.THRESH ) THEN ++ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) ++ $ CALL ALAHD( NOUT, PATH ) ++ WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', M, N, ++ $ NRHS, KMAX, ABSTOL, RELTOL, ++ $ NB, NX, IMAT, T, RESULT( T ) ++ NFAIL = NFAIL + 1 ++ END IF ++ END DO ++* + * END DO KMAX = 1, MIN(M,N)+1 + * + END DO +diff --git a/TESTING/LIN/dchkqp3rk.f b/TESTING/LIN/dchkqp3rk.f +index 434d2067e2..1834e63282 100755 +--- lapack-netlib/TESTING/LIN/dchkqp3rk.f.orig ++++ lapack-netlib/TESTING/LIN/dchkqp3rk.f +@@ -605,6 +605,9 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + CALL DLACPY( 'All', M, NRHS, COPYB, LDA, + $ B, LDA ) + CALL ICOPY( N, IWORK( 1 ), 1, IWORK( N+1 ), 1 ) ++ DO I = 1, NTESTS ++ RESULT( I ) = ZERO ++ END DO + * + ABSTOL = -1.0 + RELTOL = -1.0 +@@ -648,16 +651,6 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + RESULT( 1 ) = DQRT12( M, N, A, LDA, S, WORK, + $ LWORK ) + * +- DO T = 1, 1 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX, +- $ IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 1 + * + * End test 1 +@@ -671,7 +664,7 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * 1-norm( A*P - Q*R ) / ( max(M,N) * 1-norm(A) * EPS ) + * + RESULT( 2 ) = DQPT01( M, N, KFACT, COPYA, A, LDA, TAU, +- $ IWORK( N+1 ), WORK, LWORK ) ++ $ IWORK( N+1 ), WORK, LWORK ) + * + * Compute test 3: + * +@@ -680,21 +673,8 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * 1-norm( Q**T * Q - I ) / ( M * EPS ) + * + RESULT( 3 ) = DQRT11( M, KFACT, A, LDA, TAU, WORK, +- $ LWORK ) +-* +-* Print information about the tests that did not pass +-* the threshold. ++ $ LWORK ) + * +- DO T = 2, 3 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 2 + * + * Compute test 4: +@@ -713,8 +693,8 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + DO J = 1, KFACT-1, 1 + +- DTEMP = (( ABS( A( (J-1)*M+J ) ) - +- $ ABS( A( (J)*M+J+1 ) ) ) / ++ DTEMP = (( ABS( A( (J-1)*LDA+J ) ) - ++ $ ABS( A( (J)*LDA+J+1 ) ) ) / + $ ABS( A(1) ) ) + * + IF( DTEMP.LT.ZERO ) THEN +@@ -723,20 +703,6 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + END DO + * +-* Print information about the tests that did not +-* pass the threshold. +-* +- DO T = 4, 4 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', +- $ M, N, NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, +- $ RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 1 + * + * End test 4. +@@ -758,42 +724,41 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + LWORK_MQR = MAX(1, NRHS) + CALL DORMQR( 'Left', 'Transpose', +- $ M, NRHS, KFACT, A, LDA, TAU, B, LDA, +- $ WORK, LWORK_MQR, INFO ) ++ $ M, NRHS, KFACT, A, LDA, TAU, B, LDA, ++ $ WORK, LWORK_MQR, INFO ) + * + DO I = 1, NRHS + * + * Compare N+J-th column of A and J-column of B. + * + CALL DAXPY( M, -ONE, A( ( N+I-1 )*LDA+1 ), 1, +- $ B( ( I-1 )*LDA+1 ), 1 ) ++ $ B( ( I-1 )*LDA+1 ), 1 ) + END DO + * +- RESULT( 5 ) = +- $ ABS( +- $ DLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) / +- $ ( DBLE( M )*DLAMCH( 'Epsilon' ) ) +- $ ) +-* +-* Print information about the tests that did not pass +-* the threshold. +-* +- DO T = 5, 5 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO ++ RESULT( 5 ) = ABS( ++ $ DLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) / ++ $ ( DBLE( M )*DLAMCH( 'Epsilon' ) ) ) ++* + NRUN = NRUN + 1 + * + * End compute test 5. + * + END IF + * ++* Print information about the tests that did not ++* pass the threshold. ++* ++ DO T = 1, NTESTS ++ IF( RESULT( T ).GE.THRESH ) THEN ++ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) ++ $ CALL ALAHD( NOUT, PATH ) ++ WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', M, N, ++ $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX, ++ $ IMAT, T, RESULT( T ) ++ NFAIL = NFAIL + 1 ++ END IF ++ END DO ++* + * END DO KMAX = 1, MIN(M,N)+1 + * + END DO +diff --git a/TESTING/LIN/schkqp3rk.f b/TESTING/LIN/schkqp3rk.f +index 36cf9370ea..c5ce7ff609 100755 +--- lapack-netlib/TESTING/LIN/schkqp3rk.f.orig ++++ lapack-netlib/TESTING/LIN/schkqp3rk.f +@@ -604,6 +604,9 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + CALL SLACPY( 'All', M, NRHS, COPYB, LDA, + $ B, LDA ) + CALL ICOPY( N, IWORK( 1 ), 1, IWORK( N+1 ), 1 ) ++ DO I = 1, NTESTS ++ RESULT( I ) = ZERO ++ END DO + * + ABSTOL = -1.0 + RELTOL = -1.0 +@@ -647,16 +650,6 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + RESULT( 1 ) = SQRT12( M, N, A, LDA, S, WORK, + $ LWORK ) + * +- DO T = 1, 1 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX, +- $ IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 1 + * + * End test 1 +@@ -670,7 +663,7 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * 1-norm( A*P - Q*R ) / ( max(M,N) * 1-norm(A) * EPS ) + * + RESULT( 2 ) = SQPT01( M, N, KFACT, COPYA, A, LDA, TAU, +- $ IWORK( N+1 ), WORK, LWORK ) ++ $ IWORK( N+1 ), WORK, LWORK ) + * + * Compute test 3: + * +@@ -679,21 +672,8 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * 1-norm( Q**T * Q - I ) / ( M * EPS ) + * + RESULT( 3 ) = SQRT11( M, KFACT, A, LDA, TAU, WORK, +- $ LWORK ) ++ $ LWORK ) + * +-* Print information about the tests that did not pass +-* the threshold. +-* +- DO T = 2, 3 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 2 + * + * Compute test 4: +@@ -712,8 +692,8 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + DO J = 1, KFACT-1, 1 + +- DTEMP = (( ABS( A( (J-1)*M+J ) ) - +- $ ABS( A( (J)*M+J+1 ) ) ) / ++ DTEMP = (( ABS( A( (J-1)*LDA+J ) ) - ++ $ ABS( A( (J)*LDA+J+1 ) ) ) / + $ ABS( A(1) ) ) + * + IF( DTEMP.LT.ZERO ) THEN +@@ -722,20 +702,6 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + END DO + * +-* Print information about the tests that did not +-* pass the threshold. +-* +- DO T = 4, 4 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', +- $ M, N, NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, +- $ RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 1 + * + * End test 4. +@@ -757,42 +723,41 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + LWORK_MQR = MAX(1, NRHS) + CALL SORMQR( 'Left', 'Transpose', +- $ M, NRHS, KFACT, A, LDA, TAU, B, LDA, +- $ WORK, LWORK_MQR, INFO ) ++ $ M, NRHS, KFACT, A, LDA, TAU, B, LDA, ++ $ WORK, LWORK_MQR, INFO ) + * + DO I = 1, NRHS + * + * Compare N+J-th column of A and J-column of B. + * + CALL SAXPY( M, -ONE, A( ( N+I-1 )*LDA+1 ), 1, +- $ B( ( I-1 )*LDA+1 ), 1 ) ++ $ B( ( I-1 )*LDA+1 ), 1 ) + END DO + * +- RESULT( 5 ) = +- $ ABS( +- $ SLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) / +- $ ( REAL( M )*SLAMCH( 'Epsilon' ) ) +- $ ) +-* +-* Print information about the tests that did not pass +-* the threshold. +-* +- DO T = 5, 5 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO ++ RESULT( 5 ) = ABS( ++ $ SLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) / ++ $ ( REAL( M )*SLAMCH( 'Epsilon' ) ) ) ++* + NRUN = NRUN + 1 + * + * End compute test 5. + * + END IF + * ++* Print information about the tests that did not pass ++* the threshold. ++* ++ DO T = 1, NTESTS ++ IF( RESULT( T ).GE.THRESH ) THEN ++ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) ++ $ CALL ALAHD( NOUT, PATH ) ++ WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', M, N, ++ $ NRHS, KMAX, ABSTOL, RELTOL, ++ $ NB, NX, IMAT, T, RESULT( T ) ++ NFAIL = NFAIL + 1 ++ END IF ++ END DO ++* + * END DO KMAX = 1, MIN(M,N)+1 + * + END DO +diff --git a/TESTING/LIN/zchkqp3rk.f b/TESTING/LIN/zchkqp3rk.f +index 302c7b1a87..5092058837 100644 +--- lapack-netlib/TESTING/LIN/zchkqp3rk.f.orig ++++ lapack-netlib/TESTING/LIN/zchkqp3rk.f +@@ -608,6 +608,9 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + CALL ZLACPY( 'All', M, NRHS, COPYB, LDA, + $ B, LDA ) + CALL ICOPY( N, IWORK( 1 ), 1, IWORK( N+1 ), 1 ) ++ DO I = 1, NTESTS ++ RESULT( I ) = ZERO ++ END DO + * + ABSTOL = -1.0 + RELTOl = -1.0 +@@ -652,16 +655,6 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + RESULT( 1 ) = ZQRT12( M, N, A, LDA, S, WORK, + $ LWORK , RWORK ) + * +- DO T = 1, 1 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX, +- $ IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 1 + * + * End test 1 +@@ -675,7 +668,7 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * 1-norm( A*P - Q*R ) / ( max(M,N) * 1-norm(A) * EPS ) + * + RESULT( 2 ) = ZQPT01( M, N, KFACT, COPYA, A, LDA, TAU, +- $ IWORK( N+1 ), WORK, LWORK ) ++ $ IWORK( N+1 ), WORK, LWORK ) + * + * Compute test 3: + * +@@ -684,21 +677,8 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * 1-norm( Q**T * Q - I ) / ( M * EPS ) + * + RESULT( 3 ) = ZQRT11( M, KFACT, A, LDA, TAU, WORK, +- $ LWORK ) ++ $ LWORK ) + * +-* Print information about the tests that did not pass +-* the threshold. +-* +- DO T = 2, 3 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 2 + * + * Compute test 4: +@@ -717,8 +697,8 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + DO J = 1, KFACT-1, 1 + * +- DTEMP = (( ABS( A( (J-1)*M+J ) ) - +- $ ABS( A( (J)*M+J+1 ) ) ) / ++ DTEMP = (( ABS( A( (J-1)*LDA+J ) ) - ++ $ ABS( A( (J)*LDA+J+1 ) ) ) / + $ ABS( A(1) ) ) + * + IF( DTEMP.LT.ZERO ) THEN +@@ -727,20 +707,6 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + END DO + * +-* Print information about the tests that did not +-* pass the threshold. +-* +- DO T = 4, 4 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', +- $ M, N, NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, +- $ RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO + NRUN = NRUN + 1 + * + * End test 4. +@@ -762,42 +728,41 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, + * + LWORK_MQR = MAX(1, NRHS) + CALL ZUNMQR( 'Left', 'Conjugate transpose', +- $ M, NRHS, KFACT, A, LDA, TAU, B, LDA, +- $ WORK, LWORK_MQR, INFO ) ++ $ M, NRHS, KFACT, A, LDA, TAU, B, LDA, ++ $ WORK, LWORK_MQR, INFO ) + * + DO I = 1, NRHS + * + * Compare N+J-th column of A and J-column of B. + * + CALL ZAXPY( M, -CONE, A( ( N+I-1 )*LDA+1 ), 1, +- $ B( ( I-1 )*LDA+1 ), 1 ) ++ $ B( ( I-1 )*LDA+1 ), 1 ) + END DO + * +- RESULT( 5 ) = +- $ ABS( +- $ ZLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) / +- $ ( DBLE( M )*DLAMCH( 'Epsilon' ) ) +- $ ) +-* +-* Print information about the tests that did not pass +-* the threshold. +-* +- DO T = 5, 5 +- IF( RESULT( T ).GE.THRESH ) THEN +- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) +- $ CALL ALAHD( NOUT, PATH ) +- WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', M, N, +- $ NRHS, KMAX, ABSTOL, RELTOL, +- $ NB, NX, IMAT, T, RESULT( T ) +- NFAIL = NFAIL + 1 +- END IF +- END DO ++ RESULT( 5 ) = ABS( ++ $ ZLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) / ++ $ ( DBLE( M )*DLAMCH( 'Epsilon' ) ) ) ++* + NRUN = NRUN + 1 + * + * End compute test 5. + * + END IF + * ++* Print information about the tests that did not pass ++* the threshold. ++* ++ DO T = 1, NTESTS ++ IF( RESULT( T ).GE.THRESH ) THEN ++ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) ++ $ CALL ALAHD( NOUT, PATH ) ++ WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', M, N, ++ $ NRHS, KMAX, ABSTOL, RELTOL, ++ $ NB, NX, IMAT, T, RESULT( T ) ++ NFAIL = NFAIL + 1 ++ END IF ++ END DO ++* + * END DO KMAX = 1, MIN(M,N)+1 + * + END DO diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27-GCC-13.3.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27-GCC-13.3.0.eb index 04fe130b0b8f..c65deccb6e93 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27-GCC-13.3.0.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27-GCC-13.3.0.eb @@ -17,7 +17,9 @@ patches = [ ('timing.tgz', '.'), 'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch', 'OpenBLAS-0.3.21_fix-order-vectorization.patch', + 'OpenBLAS-0.3.26_lapack_qr_noninittest.patch', 'OpenBLAS-0.3.27_fix_zscal.patch', + 'OpenBLAS-0.3.27_riscv-drop-static-fortran-flag.patch', ] checksums = [ {'v0.3.27.tar.gz': 'aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897'}, @@ -27,8 +29,10 @@ checksums = [ 'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971'}, {'OpenBLAS-0.3.21_fix-order-vectorization.patch': '08af834e5d60441fd35c128758ed9c092ba6887c829e0471ecd489079539047d'}, - {'OpenBLAS-0.3.27_fix_zscal.patch': - '9210d7b66538dabaddbe1bfceb16f8225708856f60876ca5561b19d3599f9fd1'}, + {'OpenBLAS-0.3.26_lapack_qr_noninittest.patch': '4781bf1d7b239374fd8069e15b4e2c0ef0e8efaa1a7d4c33557bd5b27e5de77c'}, + {'OpenBLAS-0.3.27_fix_zscal.patch': '9210d7b66538dabaddbe1bfceb16f8225708856f60876ca5561b19d3599f9fd1'}, + {'OpenBLAS-0.3.27_riscv-drop-static-fortran-flag.patch': + 'f374e41efffd592ab1c9034df9e7abf1045ed151f4fc0fd0da618ce9826f2d4b'}, ] builddependencies = [ diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27_riscv-drop-static-fortran-flag.patch b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27_riscv-drop-static-fortran-flag.patch new file mode 100644 index 000000000000..262c6bc5bd0a --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27_riscv-drop-static-fortran-flag.patch @@ -0,0 +1,31 @@ +From df87aeb5a2a3785e15a3d94dbf92e2e03448500f Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Tue, 4 Jun 2024 09:49:18 +0200 +Subject: [PATCH] Drop the -static Fortran flag from generic builds as it + breaks OpenMP + +--- + Makefile.riscv64 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.riscv64 b/Makefile.riscv64 +index 113cc57c53..9f6e48b7ad 100644 +--- a/Makefile.riscv64 ++++ b/Makefile.riscv64 +@@ -8,13 +8,13 @@ FCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d -static + endif + ifeq ($(CORE), RISCV64_ZVL256B) + CCOMMON_OPT += -march=rv64imafdcv_zvl256b -mabi=lp64d +-FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d -static ++FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d + endif + ifeq ($(CORE), RISCV64_ZVL128B) + CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d +-FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d -static ++FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d + endif + ifeq ($(CORE), RISCV64_GENERIC) + CCOMMON_OPT += -march=rv64imafdc -mabi=lp64d +-FCOMMON_OPT += -march=rv64imafdc -mabi=lp64d -static ++FCOMMON_OPT += -march=rv64imafdc -mabi=lp64d + endif