import BLAS test suite

This commit is contained in:
Gael Guennebaud 2010-10-14 13:46:01 +02:00
parent 0cae73d1eb
commit e85a3857f0
23 changed files with 28494 additions and 1 deletions

View File

@ -1,4 +1,4 @@
project(EigenBlas)
project(EigenBlas CXX Fortran)
add_custom_target(blas)
@ -19,3 +19,4 @@ install(TARGETS eigen_blas
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
add_subdirectory(testing)

View File

@ -0,0 +1,44 @@
# enable_language(Fortran)
# enable_testing()
macro(ei_add_blas_test testname)
set(targetname ${testname})
set(filename ${testname}.f)
add_executable(${targetname} ${filename})
target_link_libraries(${targetname} eigen_blas)
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
target_link_libraries(${targetname} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
endif()
target_link_libraries(${targetname} ${EXTERNAL_LIBS})
# add_test(${testname} "${targetname}" < ../${testname}.dat)
add_test(${testname} "${Eigen_SOURCE_DIR}/blas/testing/runblastest.sh" "${testname}" "${Eigen_SOURCE_DIR}/blas/testing/${testname}.dat")
endmacro(ei_add_blas_test)
ei_add_blas_test(sblat1)
ei_add_blas_test(sblat2)
ei_add_blas_test(sblat3)
ei_add_blas_test(dblat1)
ei_add_blas_test(dblat2)
ei_add_blas_test(dblat3)
ei_add_blas_test(cblat1)
ei_add_blas_test(cblat2)
ei_add_blas_test(cblat3)
ei_add_blas_test(zblat1)
ei_add_blas_test(zblat2)
ei_add_blas_test(zblat3)
# add_custom_target(level1)
# add_dependencies(level1 sblat1)

681
blas/testing/cblat1.f Normal file
View File

@ -0,0 +1,681 @@
PROGRAM CBLAT1
* Test program for the COMPLEX Level 1 BLAS.
* Based upon the original BLAS test routine together with:
* F06GAF Example Program Text
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
REAL SFAC
INTEGER IC
* .. External Subroutines ..
EXTERNAL CHECK1, CHECK2, HEADER
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SFAC/9.765625E-4/
* .. Executable Statements ..
WRITE (NOUT,99999)
DO 20 IC = 1, 10
ICASE = IC
CALL HEADER
*
* Initialize PASS, INCX, INCY, and MODE for a new case.
* The value 9999 for INCX, INCY or MODE will appear in the
* detailed output, if any, for cases that do not involve
* these parameters.
*
PASS = .TRUE.
INCX = 9999
INCY = 9999
MODE = 9999
IF (ICASE.LE.5) THEN
CALL CHECK2(SFAC)
ELSE IF (ICASE.GE.6) THEN
CALL CHECK1(SFAC)
END IF
* -- Print
IF (PASS) WRITE (NOUT,99998)
20 CONTINUE
STOP
*
99999 FORMAT (' Complex BLAS Test Program Results',/1X)
99998 FORMAT (' ----- PASS -----')
END
SUBROUTINE HEADER
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Arrays ..
CHARACTER*6 L(10)
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA L(1)/'CDOTC '/
DATA L(2)/'CDOTU '/
DATA L(3)/'CAXPY '/
DATA L(4)/'CCOPY '/
DATA L(5)/'CSWAP '/
DATA L(6)/'SCNRM2'/
DATA L(7)/'SCASUM'/
DATA L(8)/'CSCAL '/
DATA L(9)/'CSSCAL'/
DATA L(10)/'ICAMAX'/
* .. Executable Statements ..
WRITE (NOUT,99999) ICASE, L(ICASE)
RETURN
*
99999 FORMAT (/' Test of subprogram number',I3,12X,A6)
END
SUBROUTINE CHECK1(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
COMPLEX CA
REAL SA
INTEGER I, J, LEN, NP1
* .. Local Arrays ..
COMPLEX CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CX(8),
+ MWPCS(5), MWPCT(5)
REAL STRUE2(5), STRUE4(5)
INTEGER ITRUE3(5)
* .. External Functions ..
REAL SCASUM, SCNRM2
INTEGER ICAMAX
EXTERNAL SCASUM, SCNRM2, ICAMAX
* .. External Subroutines ..
EXTERNAL CSCAL, CSSCAL, CTEST, ITEST1, STEST1
* .. Intrinsic Functions ..
INTRINSIC MAX
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SA, CA/0.3E0, (0.4E0,-0.7E0)/
DATA ((CV(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
+ (1.0E0,2.0E0), (0.3E0,-0.4E0), (3.0E0,4.0E0),
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
+ (0.1E0,-0.3E0), (0.5E0,-0.1E0), (5.0E0,6.0E0),
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (0.1E0,0.1E0),
+ (-0.6E0,0.1E0), (0.1E0,-0.3E0), (7.0E0,8.0E0),
+ (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
+ (7.0E0,8.0E0), (0.3E0,0.1E0), (0.1E0,0.4E0),
+ (0.4E0,0.1E0), (0.1E0,0.2E0), (2.0E0,3.0E0),
+ (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0)/
DATA ((CV(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
+ (4.0E0,5.0E0), (0.3E0,-0.4E0), (6.0E0,7.0E0),
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
+ (0.1E0,-0.3E0), (8.0E0,9.0E0), (0.5E0,-0.1E0),
+ (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
+ (2.0E0,5.0E0), (2.0E0,5.0E0), (0.1E0,0.1E0),
+ (3.0E0,6.0E0), (-0.6E0,0.1E0), (4.0E0,7.0E0),
+ (0.1E0,-0.3E0), (7.0E0,2.0E0), (7.0E0,2.0E0),
+ (7.0E0,2.0E0), (0.3E0,0.1E0), (5.0E0,8.0E0),
+ (0.1E0,0.4E0), (6.0E0,9.0E0), (0.4E0,0.1E0),
+ (8.0E0,3.0E0), (0.1E0,0.2E0), (9.0E0,4.0E0)/
DATA STRUE2/0.0E0, 0.5E0, 0.6E0, 0.7E0, 0.7E0/
DATA STRUE4/0.0E0, 0.7E0, 1.0E0, 1.3E0, 1.7E0/
DATA ((CTRUE5(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
+ (1.0E0,2.0E0), (-0.16E0,-0.37E0), (3.0E0,4.0E0),
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
+ (-0.17E0,-0.19E0), (0.13E0,-0.39E0),
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
+ (0.11E0,-0.03E0), (-0.17E0,0.46E0),
+ (-0.17E0,-0.19E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
+ (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
+ (0.19E0,-0.17E0), (0.32E0,0.09E0),
+ (0.23E0,-0.24E0), (0.18E0,0.01E0),
+ (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0),
+ (2.0E0,3.0E0)/
DATA ((CTRUE5(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
+ (4.0E0,5.0E0), (-0.16E0,-0.37E0), (6.0E0,7.0E0),
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
+ (-0.17E0,-0.19E0), (8.0E0,9.0E0),
+ (0.13E0,-0.39E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
+ (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
+ (0.11E0,-0.03E0), (3.0E0,6.0E0),
+ (-0.17E0,0.46E0), (4.0E0,7.0E0),
+ (-0.17E0,-0.19E0), (7.0E0,2.0E0), (7.0E0,2.0E0),
+ (7.0E0,2.0E0), (0.19E0,-0.17E0), (5.0E0,8.0E0),
+ (0.32E0,0.09E0), (6.0E0,9.0E0),
+ (0.23E0,-0.24E0), (8.0E0,3.0E0),
+ (0.18E0,0.01E0), (9.0E0,4.0E0)/
DATA ((CTRUE6(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
+ (1.0E0,2.0E0), (0.09E0,-0.12E0), (3.0E0,4.0E0),
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
+ (0.03E0,-0.09E0), (0.15E0,-0.03E0),
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
+ (0.03E0,0.03E0), (-0.18E0,0.03E0),
+ (0.03E0,-0.09E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
+ (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
+ (0.09E0,0.03E0), (0.03E0,0.12E0),
+ (0.12E0,0.03E0), (0.03E0,0.06E0), (2.0E0,3.0E0),
+ (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0)/
DATA ((CTRUE6(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
+ (4.0E0,5.0E0), (0.09E0,-0.12E0), (6.0E0,7.0E0),
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
+ (0.03E0,-0.09E0), (8.0E0,9.0E0),
+ (0.15E0,-0.03E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
+ (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
+ (0.03E0,0.03E0), (3.0E0,6.0E0),
+ (-0.18E0,0.03E0), (4.0E0,7.0E0),
+ (0.03E0,-0.09E0), (7.0E0,2.0E0), (7.0E0,2.0E0),
+ (7.0E0,2.0E0), (0.09E0,0.03E0), (5.0E0,8.0E0),
+ (0.03E0,0.12E0), (6.0E0,9.0E0), (0.12E0,0.03E0),
+ (8.0E0,3.0E0), (0.03E0,0.06E0), (9.0E0,4.0E0)/
DATA ITRUE3/0, 1, 2, 2, 2/
* .. Executable Statements ..
DO 60 INCX = 1, 2
DO 40 NP1 = 1, 5
N = NP1 - 1
LEN = 2*MAX(N,1)
* .. Set vector arguments ..
DO 20 I = 1, LEN
CX(I) = CV(I,NP1,INCX)
20 CONTINUE
IF (ICASE.EQ.6) THEN
* .. SCNRM2 ..
CALL STEST1(SCNRM2(N,CX,INCX),STRUE2(NP1),STRUE2(NP1),
+ SFAC)
ELSE IF (ICASE.EQ.7) THEN
* .. SCASUM ..
CALL STEST1(SCASUM(N,CX,INCX),STRUE4(NP1),STRUE4(NP1),
+ SFAC)
ELSE IF (ICASE.EQ.8) THEN
* .. CSCAL ..
CALL CSCAL(N,CA,CX,INCX)
CALL CTEST(LEN,CX,CTRUE5(1,NP1,INCX),CTRUE5(1,NP1,INCX),
+ SFAC)
ELSE IF (ICASE.EQ.9) THEN
* .. CSSCAL ..
CALL CSSCAL(N,SA,CX,INCX)
CALL CTEST(LEN,CX,CTRUE6(1,NP1,INCX),CTRUE6(1,NP1,INCX),
+ SFAC)
ELSE IF (ICASE.EQ.10) THEN
* .. ICAMAX ..
CALL ITEST1(ICAMAX(N,CX,INCX),ITRUE3(NP1))
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
STOP
END IF
*
40 CONTINUE
60 CONTINUE
*
INCX = 1
IF (ICASE.EQ.8) THEN
* CSCAL
* Add a test for alpha equal to zero.
CA = (0.0E0,0.0E0)
DO 80 I = 1, 5
MWPCT(I) = (0.0E0,0.0E0)
MWPCS(I) = (1.0E0,1.0E0)
80 CONTINUE
CALL CSCAL(5,CA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
ELSE IF (ICASE.EQ.9) THEN
* CSSCAL
* Add a test for alpha equal to zero.
SA = 0.0E0
DO 100 I = 1, 5
MWPCT(I) = (0.0E0,0.0E0)
MWPCS(I) = (1.0E0,1.0E0)
100 CONTINUE
CALL CSSCAL(5,SA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
* Add a test for alpha equal to one.
SA = 1.0E0
DO 120 I = 1, 5
MWPCT(I) = CX(I)
MWPCS(I) = CX(I)
120 CONTINUE
CALL CSSCAL(5,SA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
* Add a test for alpha equal to minus one.
SA = -1.0E0
DO 140 I = 1, 5
MWPCT(I) = -CX(I)
MWPCS(I) = -CX(I)
140 CONTINUE
CALL CSSCAL(5,SA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
END IF
RETURN
END
SUBROUTINE CHECK2(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
COMPLEX CA
INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
* .. Local Arrays ..
COMPLEX CDOT(1), CSIZE1(4), CSIZE2(7,2), CSIZE3(14),
+ CT10X(7,4,4), CT10Y(7,4,4), CT6(4,4), CT7(4,4),
+ CT8(7,4,4), CX(7), CX1(7), CY(7), CY1(7)
INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
* .. External Functions ..
COMPLEX CDOTC, CDOTU
EXTERNAL CDOTC, CDOTU
* .. External Subroutines ..
EXTERNAL CAXPY, CCOPY, CSWAP, CTEST
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA CA/(0.4E0,-0.7E0)/
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/
DATA NS/0, 1, 2, 4/
DATA CX1/(0.7E0,-0.8E0), (-0.4E0,-0.7E0),
+ (-0.1E0,-0.9E0), (0.2E0,-0.8E0),
+ (-0.9E0,-0.4E0), (0.1E0,0.4E0), (-0.6E0,0.6E0)/
DATA CY1/(0.6E0,-0.6E0), (-0.9E0,0.5E0),
+ (0.7E0,-0.6E0), (0.1E0,-0.5E0), (-0.1E0,-0.2E0),
+ (-0.5E0,-0.3E0), (0.8E0,-0.7E0)/
DATA ((CT8(I,J,1),I=1,7),J=1,4)/(0.6E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.32E0,-1.41E0),
+ (-1.55E0,0.5E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.32E0,-1.41E0), (-1.55E0,0.5E0),
+ (0.03E0,-0.89E0), (-0.38E0,-0.96E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/
DATA ((CT8(I,J,2),I=1,7),J=1,4)/(0.6E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (-0.07E0,-0.89E0),
+ (-0.9E0,0.5E0), (0.42E0,-1.41E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.78E0,0.06E0), (-0.9E0,0.5E0),
+ (0.06E0,-0.13E0), (0.1E0,-0.5E0),
+ (-0.77E0,-0.49E0), (-0.5E0,-0.3E0),
+ (0.52E0,-1.51E0)/
DATA ((CT8(I,J,3),I=1,7),J=1,4)/(0.6E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (-0.07E0,-0.89E0),
+ (-1.18E0,-0.31E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.78E0,0.06E0), (-1.54E0,0.97E0),
+ (0.03E0,-0.89E0), (-0.18E0,-1.31E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/
DATA ((CT8(I,J,4),I=1,7),J=1,4)/(0.6E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.32E0,-1.41E0), (-0.9E0,0.5E0),
+ (0.05E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.32E0,-1.41E0),
+ (-0.9E0,0.5E0), (0.05E0,-0.6E0), (0.1E0,-0.5E0),
+ (-0.77E0,-0.49E0), (-0.5E0,-0.3E0),
+ (0.32E0,-1.16E0)/
DATA CT7/(0.0E0,0.0E0), (-0.06E0,-0.90E0),
+ (0.65E0,-0.47E0), (-0.34E0,-1.22E0),
+ (0.0E0,0.0E0), (-0.06E0,-0.90E0),
+ (-0.59E0,-1.46E0), (-1.04E0,-0.04E0),
+ (0.0E0,0.0E0), (-0.06E0,-0.90E0),
+ (-0.83E0,0.59E0), (0.07E0,-0.37E0),
+ (0.0E0,0.0E0), (-0.06E0,-0.90E0),
+ (-0.76E0,-1.15E0), (-1.33E0,-1.82E0)/
DATA CT6/(0.0E0,0.0E0), (0.90E0,0.06E0),
+ (0.91E0,-0.77E0), (1.80E0,-0.10E0),
+ (0.0E0,0.0E0), (0.90E0,0.06E0), (1.45E0,0.74E0),
+ (0.20E0,0.90E0), (0.0E0,0.0E0), (0.90E0,0.06E0),
+ (-0.55E0,0.23E0), (0.83E0,-0.39E0),
+ (0.0E0,0.0E0), (0.90E0,0.06E0), (1.04E0,0.79E0),
+ (1.95E0,1.22E0)/
DATA ((CT10X(I,J,1),I=1,7),J=1,4)/(0.7E0,-0.8E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.6E0,-0.6E0), (-0.9E0,0.5E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.6E0,-0.6E0),
+ (-0.9E0,0.5E0), (0.7E0,-0.6E0), (0.1E0,-0.5E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/
DATA ((CT10X(I,J,2),I=1,7),J=1,4)/(0.7E0,-0.8E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.7E0,-0.6E0), (-0.4E0,-0.7E0),
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.8E0,-0.7E0),
+ (-0.4E0,-0.7E0), (-0.1E0,-0.2E0),
+ (0.2E0,-0.8E0), (0.7E0,-0.6E0), (0.1E0,0.4E0),
+ (0.6E0,-0.6E0)/
DATA ((CT10X(I,J,3),I=1,7),J=1,4)/(0.7E0,-0.8E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (-0.9E0,0.5E0), (-0.4E0,-0.7E0),
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.1E0,-0.5E0),
+ (-0.4E0,-0.7E0), (0.7E0,-0.6E0), (0.2E0,-0.8E0),
+ (-0.9E0,0.5E0), (0.1E0,0.4E0), (0.6E0,-0.6E0)/
DATA ((CT10X(I,J,4),I=1,7),J=1,4)/(0.7E0,-0.8E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.6E0,-0.6E0), (0.7E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.6E0,-0.6E0),
+ (0.7E0,-0.6E0), (-0.1E0,-0.2E0), (0.8E0,-0.7E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/
DATA ((CT10Y(I,J,1),I=1,7),J=1,4)/(0.6E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.7E0,-0.8E0), (-0.4E0,-0.7E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.7E0,-0.8E0),
+ (-0.4E0,-0.7E0), (-0.1E0,-0.9E0),
+ (0.2E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0)/
DATA ((CT10Y(I,J,2),I=1,7),J=1,4)/(0.6E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (-0.1E0,-0.9E0), (-0.9E0,0.5E0),
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (-0.6E0,0.6E0),
+ (-0.9E0,0.5E0), (-0.9E0,-0.4E0), (0.1E0,-0.5E0),
+ (-0.1E0,-0.9E0), (-0.5E0,-0.3E0),
+ (0.7E0,-0.8E0)/
DATA ((CT10Y(I,J,3),I=1,7),J=1,4)/(0.6E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (-0.1E0,-0.9E0), (0.7E0,-0.8E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (-0.6E0,0.6E0),
+ (-0.9E0,-0.4E0), (-0.1E0,-0.9E0),
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0)/
DATA ((CT10Y(I,J,4),I=1,7),J=1,4)/(0.6E0,-0.6E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.7E0,-0.8E0), (-0.9E0,0.5E0),
+ (-0.4E0,-0.7E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.7E0,-0.8E0),
+ (-0.9E0,0.5E0), (-0.4E0,-0.7E0), (0.1E0,-0.5E0),
+ (-0.1E0,-0.9E0), (-0.5E0,-0.3E0),
+ (0.2E0,-0.8E0)/
DATA CSIZE1/(0.0E0,0.0E0), (0.9E0,0.9E0),
+ (1.63E0,1.73E0), (2.90E0,2.78E0)/
DATA CSIZE3/(0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (1.17E0,1.17E0),
+ (1.17E0,1.17E0), (1.17E0,1.17E0),
+ (1.17E0,1.17E0), (1.17E0,1.17E0),
+ (1.17E0,1.17E0), (1.17E0,1.17E0)/
DATA CSIZE2/(0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (1.54E0,1.54E0),
+ (1.54E0,1.54E0), (1.54E0,1.54E0),
+ (1.54E0,1.54E0), (1.54E0,1.54E0),
+ (1.54E0,1.54E0), (1.54E0,1.54E0)/
* .. Executable Statements ..
DO 60 KI = 1, 4
INCX = INCXS(KI)
INCY = INCYS(KI)
MX = ABS(INCX)
MY = ABS(INCY)
*
DO 40 KN = 1, 4
N = NS(KN)
KSIZE = MIN(2,KN)
LENX = LENS(KN,MX)
LENY = LENS(KN,MY)
* .. initialize all argument arrays ..
DO 20 I = 1, 7
CX(I) = CX1(I)
CY(I) = CY1(I)
20 CONTINUE
IF (ICASE.EQ.1) THEN
* .. CDOTC ..
CDOT(1) = CDOTC(N,CX,INCX,CY,INCY)
CALL CTEST(1,CDOT,CT6(KN,KI),CSIZE1(KN),SFAC)
ELSE IF (ICASE.EQ.2) THEN
* .. CDOTU ..
CDOT(1) = CDOTU(N,CX,INCX,CY,INCY)
CALL CTEST(1,CDOT,CT7(KN,KI),CSIZE1(KN),SFAC)
ELSE IF (ICASE.EQ.3) THEN
* .. CAXPY ..
CALL CAXPY(N,CA,CX,INCX,CY,INCY)
CALL CTEST(LENY,CY,CT8(1,KN,KI),CSIZE2(1,KSIZE),SFAC)
ELSE IF (ICASE.EQ.4) THEN
* .. CCOPY ..
CALL CCOPY(N,CX,INCX,CY,INCY)
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0)
ELSE IF (ICASE.EQ.5) THEN
* .. CSWAP ..
CALL CSWAP(N,CX,INCX,CY,INCY)
CALL CTEST(LENX,CX,CT10X(1,KN,KI),CSIZE3,1.0E0)
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
END IF
*
40 CONTINUE
60 CONTINUE
RETURN
END
SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)
* ********************************* STEST **************************
*
* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
* NEGLIGIBLE.
*
* C. L. LAWSON, JPL, 1974 DEC 10
*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
REAL SFAC
INTEGER LEN
* .. Array Arguments ..
REAL SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
REAL SD
INTEGER I
* .. External Functions ..
REAL SDIFF
EXTERNAL SDIFF
* .. Intrinsic Functions ..
INTRINSIC ABS
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Executable Statements ..
*
DO 40 I = 1, LEN
SD = SCOMP(I) - STRUE(I)
IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0E0)
+ GO TO 40
*
* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
*
IF ( .NOT. PASS) GO TO 20
* PRINT FAIL MESSAGE AND HEADER.
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),
+ STRUE(I), SD, SSIZE(I)
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
99998 FORMAT (/' CASE N INCX INCY MODE I ',
+ ' COMP(I) TRUE(I) DIFFERENCE',
+ ' SIZE(I)',/1X)
99997 FORMAT (1X,I4,I3,3I5,I3,2E36.8,2E12.4)
END
SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
* ************************* STEST1 *****************************
*
* THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN
* REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE
* ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.
*
* C.L. LAWSON, JPL, 1978 DEC 6
*
* .. Scalar Arguments ..
REAL SCOMP1, SFAC, STRUE1
* .. Array Arguments ..
REAL SSIZE(*)
* .. Local Arrays ..
REAL SCOMP(1), STRUE(1)
* .. External Subroutines ..
EXTERNAL STEST
* .. Executable Statements ..
*
SCOMP(1) = SCOMP1
STRUE(1) = STRUE1
CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)
*
RETURN
END
REAL FUNCTION SDIFF(SA,SB)
* ********************************* SDIFF **************************
* COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15
*
* .. Scalar Arguments ..
REAL SA, SB
* .. Executable Statements ..
SDIFF = SA - SB
RETURN
END
SUBROUTINE CTEST(LEN,CCOMP,CTRUE,CSIZE,SFAC)
* **************************** CTEST *****************************
*
* C.L. LAWSON, JPL, 1978 DEC 6
*
* .. Scalar Arguments ..
REAL SFAC
INTEGER LEN
* .. Array Arguments ..
COMPLEX CCOMP(LEN), CSIZE(LEN), CTRUE(LEN)
* .. Local Scalars ..
INTEGER I
* .. Local Arrays ..
REAL SCOMP(20), SSIZE(20), STRUE(20)
* .. External Subroutines ..
EXTERNAL STEST
* .. Intrinsic Functions ..
INTRINSIC AIMAG, REAL
* .. Executable Statements ..
DO 20 I = 1, LEN
SCOMP(2*I-1) = REAL(CCOMP(I))
SCOMP(2*I) = AIMAG(CCOMP(I))
STRUE(2*I-1) = REAL(CTRUE(I))
STRUE(2*I) = AIMAG(CTRUE(I))
SSIZE(2*I-1) = REAL(CSIZE(I))
SSIZE(2*I) = AIMAG(CSIZE(I))
20 CONTINUE
*
CALL STEST(2*LEN,SCOMP,STRUE,SSIZE,SFAC)
RETURN
END
SUBROUTINE ITEST1(ICOMP,ITRUE)
* ********************************* ITEST1 *************************
*
* THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR
* EQUALITY.
* C. L. LAWSON, JPL, 1974 DEC 10
*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
INTEGER ICOMP, ITRUE
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER ID
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Executable Statements ..
IF (ICOMP.EQ.ITRUE) GO TO 40
*
* HERE ICOMP IS NOT EQUAL TO ITRUE.
*
IF ( .NOT. PASS) GO TO 20
* PRINT FAIL MESSAGE AND HEADER.
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 ID = ICOMP - ITRUE
WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
99998 FORMAT (/' CASE N INCX INCY MODE ',
+ ' COMP TRUE DIFFERENCE',
+ /1X)
99997 FORMAT (1X,I4,I3,3I5,2I36,I12)
END

35
blas/testing/cblat2.dat Normal file
View File

@ -0,0 +1,35 @@
'cblat2.summ' NAME OF SUMMARY OUTPUT FILE
6 UNIT NUMBER OF SUMMARY FILE
'cblat2.snap' NAME OF SNAPSHOT OUTPUT FILE
-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
F LOGICAL FLAG, T TO STOP ON FAILURES.
T LOGICAL FLAG, T TO TEST ERROR EXITS.
16.0 THRESHOLD VALUE OF TEST RATIO
6 NUMBER OF VALUES OF N
0 1 2 3 5 9 VALUES OF N
4 NUMBER OF VALUES OF K
0 1 2 4 VALUES OF K
4 NUMBER OF VALUES OF INCX AND INCY
1 2 -1 -2 VALUES OF INCX AND INCY
3 NUMBER OF VALUES OF ALPHA
(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
3 NUMBER OF VALUES OF BETA
(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
CGEMV T PUT F FOR NO TEST. SAME COLUMNS.
CGBMV T PUT F FOR NO TEST. SAME COLUMNS.
CHEMV T PUT F FOR NO TEST. SAME COLUMNS.
CHBMV T PUT F FOR NO TEST. SAME COLUMNS.
CHPMV T PUT F FOR NO TEST. SAME COLUMNS.
CTRMV T PUT F FOR NO TEST. SAME COLUMNS.
CTBMV T PUT F FOR NO TEST. SAME COLUMNS.
CTPMV T PUT F FOR NO TEST. SAME COLUMNS.
CTRSV T PUT F FOR NO TEST. SAME COLUMNS.
CTBSV T PUT F FOR NO TEST. SAME COLUMNS.
CTPSV T PUT F FOR NO TEST. SAME COLUMNS.
CGERC T PUT F FOR NO TEST. SAME COLUMNS.
CGERU T PUT F FOR NO TEST. SAME COLUMNS.
CHER T PUT F FOR NO TEST. SAME COLUMNS.
CHPR T PUT F FOR NO TEST. SAME COLUMNS.
CHER2 T PUT F FOR NO TEST. SAME COLUMNS.
CHPR2 T PUT F FOR NO TEST. SAME COLUMNS.

3241
blas/testing/cblat2.f Normal file

File diff suppressed because it is too large Load Diff

23
blas/testing/cblat3.dat Normal file
View File

@ -0,0 +1,23 @@
'cblat3.summ' NAME OF SUMMARY OUTPUT FILE
6 UNIT NUMBER OF SUMMARY FILE
'cblat3.snap' NAME OF SNAPSHOT OUTPUT FILE
-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
F LOGICAL FLAG, T TO STOP ON FAILURES.
F LOGICAL FLAG, T TO TEST ERROR EXITS.
16.0 THRESHOLD VALUE OF TEST RATIO
6 NUMBER OF VALUES OF N
0 1 2 3 5 9 VALUES OF N
3 NUMBER OF VALUES OF ALPHA
(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
3 NUMBER OF VALUES OF BETA
(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
CGEMM T PUT F FOR NO TEST. SAME COLUMNS.
CHEMM T PUT F FOR NO TEST. SAME COLUMNS.
CSYMM T PUT F FOR NO TEST. SAME COLUMNS.
CTRMM T PUT F FOR NO TEST. SAME COLUMNS.
CTRSM T PUT F FOR NO TEST. SAME COLUMNS.
CHERK T PUT F FOR NO TEST. SAME COLUMNS.
CSYRK T PUT F FOR NO TEST. SAME COLUMNS.
CHER2K T PUT F FOR NO TEST. SAME COLUMNS.
CSYR2K T PUT F FOR NO TEST. SAME COLUMNS.

3439
blas/testing/cblat3.f Normal file

File diff suppressed because it is too large Load Diff

769
blas/testing/dblat1.f Normal file
View File

@ -0,0 +1,769 @@
PROGRAM DBLAT1
* Test program for the DOUBLE PRECISION Level 1 BLAS.
* Based upon the original BLAS test routine together with:
* F06EAF Example Program Text
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SFAC
INTEGER IC
* .. External Subroutines ..
EXTERNAL CHECK0, CHECK1, CHECK2, CHECK3, HEADER
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SFAC/9.765625D-4/
* .. Executable Statements ..
WRITE (NOUT,99999)
DO 20 IC = 1, 10
ICASE = IC
CALL HEADER
*
* .. Initialize PASS, INCX, INCY, and MODE for a new case. ..
* .. the value 9999 for INCX, INCY or MODE will appear in the ..
* .. detailed output, if any, for cases that do not involve ..
* .. these parameters ..
*
PASS = .TRUE.
INCX = 9999
INCY = 9999
MODE = 9999
IF (ICASE.EQ.3) THEN
CALL CHECK0(SFAC)
ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.
+ ICASE.EQ.10) THEN
CALL CHECK1(SFAC)
ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.
+ ICASE.EQ.6) THEN
CALL CHECK2(SFAC)
ELSE IF (ICASE.EQ.4) THEN
CALL CHECK3(SFAC)
END IF
* -- Print
IF (PASS) WRITE (NOUT,99998)
20 CONTINUE
STOP
*
99999 FORMAT (' Real BLAS Test Program Results',/1X)
99998 FORMAT (' ----- PASS -----')
END
SUBROUTINE HEADER
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Arrays ..
CHARACTER*6 L(10)
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA L(1)/' DDOT '/
DATA L(2)/'DAXPY '/
DATA L(3)/'DROTG '/
DATA L(4)/' DROT '/
DATA L(5)/'DCOPY '/
DATA L(6)/'DSWAP '/
DATA L(7)/'DNRM2 '/
DATA L(8)/'DASUM '/
DATA L(9)/'DSCAL '/
DATA L(10)/'IDAMAX'/
* .. Executable Statements ..
WRITE (NOUT,99999) ICASE, L(ICASE)
RETURN
*
99999 FORMAT (/' Test of subprogram number',I3,12X,A6)
END
SUBROUTINE CHECK0(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION D12, SA, SB, SC, SS
INTEGER K
* .. Local Arrays ..
DOUBLE PRECISION DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
+ DS1(8)
* .. External Subroutines ..
EXTERNAL DROTG, STEST1
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA DA1/0.3D0, 0.4D0, -0.3D0, -0.4D0, -0.3D0, 0.0D0,
+ 0.0D0, 1.0D0/
DATA DB1/0.4D0, 0.3D0, 0.4D0, 0.3D0, -0.4D0, 0.0D0,
+ 1.0D0, 0.0D0/
DATA DC1/0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.6D0, 1.0D0,
+ 0.0D0, 1.0D0/
DATA DS1/0.8D0, 0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.0D0,
+ 1.0D0, 0.0D0/
DATA DATRUE/0.5D0, 0.5D0, 0.5D0, -0.5D0, -0.5D0,
+ 0.0D0, 1.0D0, 1.0D0/
DATA DBTRUE/0.0D0, 0.6D0, 0.0D0, -0.6D0, 0.0D0,
+ 0.0D0, 1.0D0, 0.0D0/
DATA D12/4096.0D0/
* .. Executable Statements ..
*
* Compute true values which cannot be prestored
* in decimal notation
*
DBTRUE(1) = 1.0D0/0.6D0
DBTRUE(3) = -1.0D0/0.6D0
DBTRUE(5) = 1.0D0/0.6D0
*
DO 20 K = 1, 8
* .. Set N=K for identification in output if any ..
N = K
IF (ICASE.EQ.3) THEN
* .. DROTG ..
IF (K.GT.8) GO TO 40
SA = DA1(K)
SB = DB1(K)
CALL DROTG(SA,SB,SC,SS)
CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC)
CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)
CALL STEST1(SC,DC1(K),DC1(K),SFAC)
CALL STEST1(SS,DS1(K),DS1(K),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
STOP
END IF
20 CONTINUE
40 RETURN
END
SUBROUTINE CHECK1(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER I, LEN, NP1
* .. Local Arrays ..
DOUBLE PRECISION DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),
+ SA(10), STEMP(1), STRUE(8), SX(8)
INTEGER ITRUE2(5)
* .. External Functions ..
DOUBLE PRECISION DASUM, DNRM2
INTEGER IDAMAX
EXTERNAL DASUM,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, 3.0D0, 0.0D0, 0.0D0,
+ 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0,
+ 0.20D0, -0.60D0, 0.30D0, 5.0D0, 5.0D0, 5.0D0,
+ 5.0D0, 5.0D0, 0.03D0, -0.09D0, 0.15D0, -0.03D0,
+ 6.0D0, 6.0D0, 6.0D0, 6.0D0, 0.10D0, 8.0D0,
+ 8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0,
+ 0.09D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0,
+ 9.0D0, 9.0D0, 0.09D0, 2.0D0, -0.12D0, 2.0D0,
+ 2.0D0, 2.0D0, 2.0D0, 2.0D0, 0.06D0, 3.0D0,
+ -0.18D0, 5.0D0, 0.09D0, 2.0D0, 2.0D0, 2.0D0,
+ 0.03D0, 4.0D0, -0.09D0, 6.0D0, -0.15D0, 7.0D0,
+ -0.03D0, 3.0D0/
DATA ITRUE2/0, 1, 2, 2, 3/
* .. Executable Statements ..
DO 80 INCX = 1, 2
DO 60 NP1 = 1, 5
N = NP1 - 1
LEN = 2*MAX(N,1)
* .. Set vector arguments ..
DO 20 I = 1, LEN
SX(I) = DV(I,NP1,INCX)
20 CONTINUE
*
IF (ICASE.EQ.7) THEN
* .. DNRM2 ..
STEMP(1) = DTRUE1(NP1)
CALL STEST1(DNRM2(N,SX,INCX),STEMP,STEMP,SFAC)
ELSE IF (ICASE.EQ.8) THEN
* .. DASUM ..
STEMP(1) = DTRUE3(NP1)
CALL STEST1(DASUM(N,SX,INCX),STEMP,STEMP,SFAC)
ELSE IF (ICASE.EQ.9) THEN
* .. DSCAL ..
CALL DSCAL(N,SA((INCX-1)*5+NP1),SX,INCX)
DO 40 I = 1, LEN
STRUE(I) = DTRUE5(I,NP1,INCX)
40 CONTINUE
CALL STEST(LEN,SX,STRUE,STRUE,SFAC)
ELSE IF (ICASE.EQ.10) THEN
* .. IDAMAX ..
CALL ITEST1(IDAMAX(N,SX,INCX),ITRUE2(NP1))
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
STOP
END IF
60 CONTINUE
80 CONTINUE
RETURN
END
SUBROUTINE CHECK2(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SA, SC, SS
INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
* .. Local Arrays ..
DOUBLE PRECISION DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),
+ DT8(7,4,4), DT9X(7,4,4), DT9Y(7,4,4), DX1(7),
+ DY1(7), SSIZE1(4), SSIZE2(14,2), STX(7), STY(7),
+ SX(7), SY(7)
INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
* .. External Functions ..
DOUBLE PRECISION DDOT
EXTERNAL DDOT
* .. External Subroutines ..
EXTERNAL DAXPY, DCOPY, DSWAP, STEST, STEST1
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SA/0.3D0/
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/
DATA NS/0, 1, 2, 4/
DATA DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0,
+ -0.4D0/
DATA DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0,
+ 0.8D0/
DATA SC, SS/0.8D0, 0.6D0/
DATA DT7/0.0D0, 0.30D0, 0.21D0, 0.62D0, 0.0D0,
+ 0.30D0, -0.07D0, 0.85D0, 0.0D0, 0.30D0, -0.79D0,
+ -0.74D0, 0.0D0, 0.30D0, 0.33D0, 1.27D0/
DATA DT8/0.5D0, 0.0D0, 0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0, 0.6D0, -0.9D0, 0.1D0, 0.0D0, 0.0D0,
+ 0.0D0, 0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.7D0,
+ -0.5D0, 0.2D0, 0.8D0/
DATA SSIZE1/0.0D0, 0.3D0, 1.6D0, 3.2D0/
DATA SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
+ 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
+ 0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
+ 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
+ 1.17D0, 1.17D0, 1.17D0/
* .. Executable Statements ..
*
DO 120 KI = 1, 4
INCX = INCXS(KI)
INCY = INCYS(KI)
MX = ABS(INCX)
MY = ABS(INCY)
*
DO 100 KN = 1, 4
N = NS(KN)
KSIZE = MIN(2,KN)
LENX = LENS(KN,MX)
LENY = LENS(KN,MY)
* .. Initialize all argument arrays ..
DO 20 I = 1, 7
SX(I) = DX1(I)
SY(I) = DY1(I)
20 CONTINUE
*
IF (ICASE.EQ.1) THEN
* .. DDOT ..
CALL STEST1(DDOT(N,SX,INCX,SY,INCY),DT7(KN,KI),SSIZE1(KN)
+ ,SFAC)
ELSE IF (ICASE.EQ.2) THEN
* .. DAXPY ..
CALL DAXPY(N,SA,SX,INCX,SY,INCY)
DO 40 J = 1, LENY
STY(J) = DT8(J,KN,KI)
40 CONTINUE
CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
ELSE IF (ICASE.EQ.5) THEN
* .. DCOPY ..
DO 60 I = 1, 7
STY(I) = DT10Y(I,KN,KI)
60 CONTINUE
CALL DCOPY(N,SX,INCX,SY,INCY)
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
ELSE IF (ICASE.EQ.6) THEN
* .. DSWAP ..
CALL DSWAP(N,SX,INCX,SY,INCY)
DO 80 I = 1, 7
STX(I) = DT10X(I,KN,KI)
STY(I) = DT10Y(I,KN,KI)
80 CONTINUE
CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0D0)
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
END IF
100 CONTINUE
120 CONTINUE
RETURN
END
SUBROUTINE CHECK3(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SA, SC, SS
INTEGER I, K, KI, KN, KSIZE, LENX, LENY, MX, MY
* .. Local Arrays ..
DOUBLE PRECISION COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4),
+ DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5),
+ MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5),
+ MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7),
+ SY(7)
INTEGER INCXS(4), INCYS(4), LENS(4,2), MWPINX(11),
+ MWPINY(11), MWPN(11), NS(4)
* .. External Subroutines ..
EXTERNAL DROT, STEST
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SA/0.3D0/
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/
DATA NS/0, 1, 2, 4/
DATA DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0,
+ -0.4D0/
DATA DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0,
+ 0.8D0/
DATA SC, SS/0.8D0, 0.6D0/
DATA DT9X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D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= 1, 7
SX(I) = DX1(I)
SY(I) = DY1(I)
STX(I) = DT9X(I,KN,KI)
STY(I) = DT9Y(I,KN,KI)
20 CONTINUE
CALL DROT(N,SX,INCX,SY,INCY,SC,SS)
CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC)
CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
STOP
END IF
40 CONTINUE
60 CONTINUE
*
MWPC(1) = 1
DO 80 I = 2, 11
MWPC(I) = 0
80 CONTINUE
MWPS(1) = 0
DO 100 I = 2, 6
MWPS(I) = 1
100 CONTINUE
DO 120 I = 7, 11
MWPS(I) = -1
120 CONTINUE
MWPINX(1) = 1
MWPINX(2) = 1
MWPINX(3) = 1
MWPINX(4) = -1
MWPINX(5) = 1
MWPINX(6) = -1
MWPINX(7) = 1
MWPINX(8) = 1
MWPINX(9) = -1
MWPINX(10) = 1
MWPINX(11) = -1
MWPINY(1) = 1
MWPINY(2) = 1
MWPINY(3) = -1
MWPINY(4) = -1
MWPINY(5) = 2
MWPINY(6) = 1
MWPINY(7) = 1
MWPINY(8) = -1
MWPINY(9) = -1
MWPINY(10) = 2
MWPINY(11) = 1
DO 140 I = 1, 11
MWPN(I) = 5
140 CONTINUE
MWPN(5) = 3
MWPN(10) = 3
DO 160 I = 1, 5
MWPX(I) = I
MWPY(I) = I
MWPTX(1,I) = I
MWPTY(1,I) = I
MWPTX(2,I) = I
MWPTY(2,I) = -I
MWPTX(3,I) = 6 - I
MWPTY(3,I) = I - 6
MWPTX(4,I) = I
MWPTY(4,I) = -I
MWPTX(6,I) = 6 - I
MWPTY(6,I) = I - 6
MWPTX(7,I) = -I
MWPTY(7,I) = I
MWPTX(8,I) = I - 6
MWPTY(8,I) = 6 - I
MWPTX(9,I) = -I
MWPTY(9,I) = I
MWPTX(11,I) = I - 6
MWPTY(11,I) = 6 - I
160 CONTINUE
MWPTX(5,1) = 1
MWPTX(5,2) = 3
MWPTX(5,3) = 5
MWPTX(5,4) = 4
MWPTX(5,5) = 5
MWPTY(5,1) = -1
MWPTY(5,2) = 2
MWPTY(5,3) = -2
MWPTY(5,4) = 4
MWPTY(5,5) = -3
MWPTX(10,1) = -1
MWPTX(10,2) = -3
MWPTX(10,3) = -5
MWPTX(10,4) = 4
MWPTX(10,5) = 5
MWPTY(10,1) = 1
MWPTY(10,2) = 2
MWPTY(10,3) = 2
MWPTY(10,4) = 4
MWPTY(10,5) = 3
DO 200 I = 1, 11
INCX = MWPINX(I)
INCY = MWPINY(I)
DO 180 K = 1, 5
COPYX(K) = MWPX(K)
COPYY(K) = MWPY(K)
MWPSTX(K) = MWPTX(I,K)
MWPSTY(K) = MWPTY(I,K)
180 CONTINUE
CALL DROT(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I))
CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC)
CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC)
200 CONTINUE
RETURN
END
SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)
* ********************************* STEST **************************
*
* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
* NEGLIGIBLE.
*
* C. L. LAWSON, JPL, 1974 DEC 10
*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
INTEGER LEN
* .. Array Arguments ..
DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SD
INTEGER I
* .. External Functions ..
DOUBLE PRECISION SDIFF
EXTERNAL SDIFF
* .. Intrinsic Functions ..
INTRINSIC ABS
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Executable Statements ..
*
DO 40 I = 1, LEN
SD = SCOMP(I) - STRUE(I)
IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0D0)
+ GO TO 40
*
* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
*
IF ( .NOT. PASS) GO TO 20
* PRINT FAIL MESSAGE AND HEADER.
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),
+ STRUE(I), SD, SSIZE(I)
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
99998 FORMAT (/' CASE N INCX INCY MODE I ',
+ ' COMP(I) TRUE(I) DIFFERENCE',
+ ' SIZE(I)',/1X)
99997 FORMAT (1X,I4,I3,3I5,I3,2D36.8,2D12.4)
END
SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
* ************************* STEST1 *****************************
*
* THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN
* REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE
* ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.
*
* C.L. LAWSON, JPL, 1978 DEC 6
*
* .. Scalar Arguments ..
DOUBLE PRECISION SCOMP1, SFAC, STRUE1
* .. Array Arguments ..
DOUBLE PRECISION SSIZE(*)
* .. Local Arrays ..
DOUBLE PRECISION SCOMP(1), STRUE(1)
* .. External Subroutines ..
EXTERNAL STEST
* .. Executable Statements ..
*
SCOMP(1) = SCOMP1
STRUE(1) = STRUE1
CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)
*
RETURN
END
DOUBLE PRECISION FUNCTION SDIFF(SA,SB)
* ********************************* SDIFF **************************
* COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15
*
* .. Scalar Arguments ..
DOUBLE PRECISION SA, SB
* .. Executable Statements ..
SDIFF = SA - SB
RETURN
END
SUBROUTINE ITEST1(ICOMP,ITRUE)
* ********************************* ITEST1 *************************
*
* THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR
* EQUALITY.
* C. L. LAWSON, JPL, 1974 DEC 10
*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
INTEGER ICOMP, ITRUE
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER ID
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Executable Statements ..
*
IF (ICOMP.EQ.ITRUE) GO TO 40
*
* HERE ICOMP IS NOT EQUAL TO ITRUE.
*
IF ( .NOT. PASS) GO TO 20
* PRINT FAIL MESSAGE AND HEADER.
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 ID = ICOMP - ITRUE
WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
99998 FORMAT (/' CASE N INCX INCY MODE ',
+ ' COMP TRUE DIFFERENCE',
+ /1X)
99997 FORMAT (1X,I4,I3,3I5,2I36,I12)
END

34
blas/testing/dblat2.dat Normal file
View File

@ -0,0 +1,34 @@
'dblat2.summ' NAME OF SUMMARY OUTPUT FILE
6 UNIT NUMBER OF SUMMARY FILE
'dblat2.snap' NAME OF SNAPSHOT OUTPUT FILE
-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
F LOGICAL FLAG, T TO STOP ON FAILURES.
T LOGICAL FLAG, T TO TEST ERROR EXITS.
16.0 THRESHOLD VALUE OF TEST RATIO
6 NUMBER OF VALUES OF N
0 1 2 3 5 9 VALUES OF N
4 NUMBER OF VALUES OF K
0 1 2 4 VALUES OF K
4 NUMBER OF VALUES OF INCX AND INCY
1 2 -1 -2 VALUES OF INCX AND INCY
3 NUMBER OF VALUES OF ALPHA
0.0 1.0 0.7 VALUES OF ALPHA
3 NUMBER OF VALUES OF BETA
0.0 1.0 0.9 VALUES OF BETA
DGEMV T PUT F FOR NO TEST. SAME COLUMNS.
DGBMV T PUT F FOR NO TEST. SAME COLUMNS.
DSYMV T PUT F FOR NO TEST. SAME COLUMNS.
DSBMV T PUT F FOR NO TEST. SAME COLUMNS.
DSPMV T PUT F FOR NO TEST. SAME COLUMNS.
DTRMV T PUT F FOR NO TEST. SAME COLUMNS.
DTBMV T PUT F FOR NO TEST. SAME COLUMNS.
DTPMV T PUT F FOR NO TEST. SAME COLUMNS.
DTRSV T PUT F FOR NO TEST. SAME COLUMNS.
DTBSV T PUT F FOR NO TEST. SAME COLUMNS.
DTPSV T PUT F FOR NO TEST. SAME COLUMNS.
DGER T PUT F FOR NO TEST. SAME COLUMNS.
DSYR T PUT F FOR NO TEST. SAME COLUMNS.
DSPR T PUT F FOR NO TEST. SAME COLUMNS.
DSYR2 T PUT F FOR NO TEST. SAME COLUMNS.
DSPR2 T PUT F FOR NO TEST. SAME COLUMNS.

3138
blas/testing/dblat2.f Normal file

File diff suppressed because it is too large Load Diff

20
blas/testing/dblat3.dat Normal file
View File

@ -0,0 +1,20 @@
'dblat3.summ' NAME OF SUMMARY OUTPUT FILE
6 UNIT NUMBER OF SUMMARY FILE
'dblat3.snap' NAME OF SNAPSHOT OUTPUT FILE
-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
F LOGICAL FLAG, T TO STOP ON FAILURES.
T LOGICAL FLAG, T TO TEST ERROR EXITS.
16.0 THRESHOLD VALUE OF TEST RATIO
6 NUMBER OF VALUES OF N
0 1 2 3 5 9 VALUES OF N
3 NUMBER OF VALUES OF ALPHA
0.0 1.0 0.7 VALUES OF ALPHA
3 NUMBER OF VALUES OF BETA
0.0 1.0 1.3 VALUES OF BETA
DGEMM T PUT F FOR NO TEST. SAME COLUMNS.
DSYMM T PUT F FOR NO TEST. SAME COLUMNS.
DTRMM T PUT F FOR NO TEST. SAME COLUMNS.
DTRSM T PUT F FOR NO TEST. SAME COLUMNS.
DSYRK T PUT F FOR NO TEST. SAME COLUMNS.
DSYR2K T PUT F FOR NO TEST. SAME COLUMNS.

2823
blas/testing/dblat3.f Normal file

File diff suppressed because it is too large Load Diff

28
blas/testing/runblastest.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
black='\E[30m'
red='\E[31m'
green='\E[32m'
yellow='\E[33m'
blue='\E[34m'
magenta='\E[35m'
cyan='\E[36m'
white='\E[37m'
if [ -f $2 ]; then
data=$2
if [ -f $1.summ ]; then rm $1.summ; fi
if [ -f $1.snap ]; then rm $1.snap; fi
else
data=$1
fi
if ! ./$1 < $data > /dev/null 2> .runtest.log ; then
echo -e $red Test $1 failed: $black
echo -e $blue
cat .runtest.log
echo -e $black
exit 1
else
echo -e $green Test $1 passed$black
fi

769
blas/testing/sblat1.f Normal file
View File

@ -0,0 +1,769 @@
PROGRAM SBLAT1
* Test program for the REAL Level 1 BLAS.
* Based upon the original BLAS test routine together with:
* F06EAF Example Program Text
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
REAL SFAC
INTEGER IC
* .. External Subroutines ..
EXTERNAL CHECK0, CHECK1, CHECK2, CHECK3, HEADER
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SFAC/9.765625E-4/
* .. Executable Statements ..
WRITE (NOUT,99999)
DO 20 IC = 1, 10
ICASE = IC
CALL HEADER
*
* .. Initialize PASS, INCX, INCY, and MODE for a new case. ..
* .. the value 9999 for INCX, INCY or MODE will appear in the ..
* .. detailed output, if any, for cases that do not involve ..
* .. these parameters ..
*
PASS = .TRUE.
INCX = 9999
INCY = 9999
MODE = 9999
IF (ICASE.EQ.3) THEN
CALL CHECK0(SFAC)
ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.
+ ICASE.EQ.10) THEN
CALL CHECK1(SFAC)
ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.
+ ICASE.EQ.6) THEN
CALL CHECK2(SFAC)
ELSE IF (ICASE.EQ.4) THEN
CALL CHECK3(SFAC)
END IF
* -- Print
IF (PASS) WRITE (NOUT,99998)
20 CONTINUE
STOP
*
99999 FORMAT (' Real BLAS Test Program Results',/1X)
99998 FORMAT (' ----- PASS -----')
END
SUBROUTINE HEADER
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Arrays ..
CHARACTER*6 L(10)
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA L(1)/' SDOT '/
DATA L(2)/'SAXPY '/
DATA L(3)/'SROTG '/
DATA L(4)/' SROT '/
DATA L(5)/'SCOPY '/
DATA L(6)/'SSWAP '/
DATA L(7)/'SNRM2 '/
DATA L(8)/'SASUM '/
DATA L(9)/'SSCAL '/
DATA L(10)/'ISAMAX'/
* .. Executable Statements ..
WRITE (NOUT,99999) ICASE, L(ICASE)
RETURN
*
99999 FORMAT (/' Test of subprogram number',I3,12X,A6)
END
SUBROUTINE CHECK0(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
REAL D12, SA, SB, SC, SS
INTEGER K
* .. Local Arrays ..
REAL DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
+ DS1(8)
* .. External Subroutines ..
EXTERNAL SROTG, STEST1
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA DA1/0.3E0, 0.4E0, -0.3E0, -0.4E0, -0.3E0, 0.0E0,
+ 0.0E0, 1.0E0/
DATA DB1/0.4E0, 0.3E0, 0.4E0, 0.3E0, -0.4E0, 0.0E0,
+ 1.0E0, 0.0E0/
DATA DC1/0.6E0, 0.8E0, -0.6E0, 0.8E0, 0.6E0, 1.0E0,
+ 0.0E0, 1.0E0/
DATA DS1/0.8E0, 0.6E0, 0.8E0, -0.6E0, 0.8E0, 0.0E0,
+ 1.0E0, 0.0E0/
DATA DATRUE/0.5E0, 0.5E0, 0.5E0, -0.5E0, -0.5E0,
+ 0.0E0, 1.0E0, 1.0E0/
DATA DBTRUE/0.0E0, 0.6E0, 0.0E0, -0.6E0, 0.0E0,
+ 0.0E0, 1.0E0, 0.0E0/
DATA D12/4096.0E0/
* .. Executable Statements ..
*
* Compute true values which cannot be prestored
* in decimal notation
*
DBTRUE(1) = 1.0E0/0.6E0
DBTRUE(3) = -1.0E0/0.6E0
DBTRUE(5) = 1.0E0/0.6E0
*
DO 20 K = 1, 8
* .. Set N=K for identification in output if any ..
N = K
IF (ICASE.EQ.3) THEN
* .. SROTG ..
IF (K.GT.8) GO TO 40
SA = DA1(K)
SB = DB1(K)
CALL SROTG(SA,SB,SC,SS)
CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC)
CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)
CALL STEST1(SC,DC1(K),DC1(K),SFAC)
CALL STEST1(SS,DS1(K),DS1(K),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
STOP
END IF
20 CONTINUE
40 RETURN
END
SUBROUTINE CHECK1(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER I, LEN, NP1
* .. Local Arrays ..
REAL DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),
+ SA(10), STEMP(1), STRUE(8), SX(8)
INTEGER ITRUE2(5)
* .. External Functions ..
REAL SASUM, SNRM2
INTEGER ISAMAX
EXTERNAL SASUM, SNRM2, ISAMAX
* .. External Subroutines ..
EXTERNAL ITEST1, SSCAL, STEST, STEST1
* .. Intrinsic Functions ..
INTRINSIC MAX
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SA/0.3E0, -1.0E0, 0.0E0, 1.0E0, 0.3E0, 0.3E0,
+ 0.3E0, 0.3E0, 0.3E0, 0.3E0/
DATA DV/0.1E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,
+ 2.0E0, 2.0E0, 0.3E0, 3.0E0, 3.0E0, 3.0E0, 3.0E0,
+ 3.0E0, 3.0E0, 3.0E0, 0.3E0, -0.4E0, 4.0E0,
+ 4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, 0.2E0,
+ -0.6E0, 0.3E0, 5.0E0, 5.0E0, 5.0E0, 5.0E0,
+ 5.0E0, 0.1E0, -0.3E0, 0.5E0, -0.1E0, 6.0E0,
+ 6.0E0, 6.0E0, 6.0E0, 0.1E0, 8.0E0, 8.0E0, 8.0E0,
+ 8.0E0, 8.0E0, 8.0E0, 8.0E0, 0.3E0, 9.0E0, 9.0E0,
+ 9.0E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, 0.3E0, 2.0E0,
+ -0.4E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,
+ 0.2E0, 3.0E0, -0.6E0, 5.0E0, 0.3E0, 2.0E0,
+ 2.0E0, 2.0E0, 0.1E0, 4.0E0, -0.3E0, 6.0E0,
+ -0.5E0, 7.0E0, -0.1E0, 3.0E0/
DATA DTRUE1/0.0E0, 0.3E0, 0.5E0, 0.7E0, 0.6E0/
DATA DTRUE3/0.0E0, 0.3E0, 0.7E0, 1.1E0, 1.0E0/
DATA DTRUE5/0.10E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,
+ 2.0E0, 2.0E0, 2.0E0, -0.3E0, 3.0E0, 3.0E0,
+ 3.0E0, 3.0E0, 3.0E0, 3.0E0, 3.0E0, 0.0E0, 0.0E0,
+ 4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0,
+ 0.20E0, -0.60E0, 0.30E0, 5.0E0, 5.0E0, 5.0E0,
+ 5.0E0, 5.0E0, 0.03E0, -0.09E0, 0.15E0, -0.03E0,
+ 6.0E0, 6.0E0, 6.0E0, 6.0E0, 0.10E0, 8.0E0,
+ 8.0E0, 8.0E0, 8.0E0, 8.0E0, 8.0E0, 8.0E0,
+ 0.09E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0,
+ 9.0E0, 9.0E0, 0.09E0, 2.0E0, -0.12E0, 2.0E0,
+ 2.0E0, 2.0E0, 2.0E0, 2.0E0, 0.06E0, 3.0E0,
+ -0.18E0, 5.0E0, 0.09E0, 2.0E0, 2.0E0, 2.0E0,
+ 0.03E0, 4.0E0, -0.09E0, 6.0E0, -0.15E0, 7.0E0,
+ -0.03E0, 3.0E0/
DATA ITRUE2/0, 1, 2, 2, 3/
* .. Executable Statements ..
DO 80 INCX = 1, 2
DO 60 NP1 = 1, 5
N = NP1 - 1
LEN = 2*MAX(N,1)
* .. Set vector arguments ..
DO 20 I = 1, LEN
SX(I) = DV(I,NP1,INCX)
20 CONTINUE
*
IF (ICASE.EQ.7) THEN
* .. SNRM2 ..
STEMP(1) = DTRUE1(NP1)
CALL STEST1(SNRM2(N,SX,INCX),STEMP,STEMP,SFAC)
ELSE IF (ICASE.EQ.8) THEN
* .. SASUM ..
STEMP(1) = DTRUE3(NP1)
CALL STEST1(SASUM(N,SX,INCX),STEMP,STEMP,SFAC)
ELSE IF (ICASE.EQ.9) THEN
* .. SSCAL ..
CALL SSCAL(N,SA((INCX-1)*5+NP1),SX,INCX)
DO 40 I = 1, LEN
STRUE(I) = DTRUE5(I,NP1,INCX)
40 CONTINUE
CALL STEST(LEN,SX,STRUE,STRUE,SFAC)
ELSE IF (ICASE.EQ.10) THEN
* .. ISAMAX ..
CALL ITEST1(ISAMAX(N,SX,INCX),ITRUE2(NP1))
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
STOP
END IF
60 CONTINUE
80 CONTINUE
RETURN
END
SUBROUTINE CHECK2(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
REAL SA, SC, SS
INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
* .. Local Arrays ..
REAL DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),
+ DT8(7,4,4), DT9X(7,4,4), DT9Y(7,4,4), DX1(7),
+ DY1(7), SSIZE1(4), SSIZE2(14,2), STX(7), STY(7),
+ SX(7), SY(7)
INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
* .. External Functions ..
REAL SDOT
EXTERNAL SDOT
* .. External Subroutines ..
EXTERNAL SAXPY, SCOPY, SSWAP, STEST, STEST1
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SA/0.3E0/
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/
DATA NS/0, 1, 2, 4/
DATA DX1/0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.9E0, -0.3E0,
+ -0.4E0/
DATA DY1/0.5E0, -0.9E0, 0.3E0, 0.7E0, -0.6E0, 0.2E0,
+ 0.8E0/
DATA SC, SS/0.8E0, 0.6E0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0, 0.9E0, -0.5E0, 0.6E0, 0.0E0, 0.0E0,
+ 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
+ 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
+ 0.0E0, 0.6E0, -0.9E0, 0.1E0, 0.0E0, 0.0E0,
+ 0.0E0, 0.0E0, 0.6E0, -0.9E0, 0.1E0, 0.7E0,
+ -0.5E0, 0.2E0, 0.8E0/
DATA SSIZE1/0.0E0, 0.3E0, 1.6E0, 3.2E0/
DATA SSIZE2/0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
+ 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
+ 0.0E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,
+ 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,
+ 1.17E0, 1.17E0, 1.17E0/
* .. Executable Statements ..
*
DO 120 KI = 1, 4
INCX = INCXS(KI)
INCY = INCYS(KI)
MX = ABS(INCX)
MY = ABS(INCY)
*
DO 100 KN = 1, 4
N = NS(KN)
KSIZE = MIN(2,KN)
LENX = LENS(KN,MX)
LENY = LENS(KN,MY)
* .. Initialize all argument arrays ..
DO 20 I = 1, 7
SX(I) = DX1(I)
SY(I) = DY1(I)
20 CONTINUE
*
IF (ICASE.EQ.1) THEN
* .. SDOT ..
CALL STEST1(SDOT(N,SX,INCX,SY,INCY),DT7(KN,KI),SSIZE1(KN)
+ ,SFAC)
ELSE IF (ICASE.EQ.2) THEN
* .. SAXPY ..
CALL SAXPY(N,SA,SX,INCX,SY,INCY)
DO 40 J = 1, LENY
STY(J) = DT8(J,KN,KI)
40 CONTINUE
CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
ELSE IF (ICASE.EQ.5) THEN
* .. SCOPY ..
DO 60 I = 1, 7
STY(I) = DT10Y(I,KN,KI)
60 CONTINUE
CALL SCOPY(N,SX,INCX,SY,INCY)
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)
ELSE IF (ICASE.EQ.6) THEN
* .. SSWAP ..
CALL SSWAP(N,SX,INCX,SY,INCY)
DO 80 I = 1, 7
STX(I) = DT10X(I,KN,KI)
STY(I) = DT10Y(I,KN,KI)
80 CONTINUE
CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0E0)
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
END IF
100 CONTINUE
120 CONTINUE
RETURN
END
SUBROUTINE CHECK3(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
REAL SA, SC, SS
INTEGER I, K, KI, KN, KSIZE, LENX, LENY, MX, MY
* .. Local Arrays ..
REAL COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4),
+ DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5),
+ MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5),
+ MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7),
+ SY(7)
INTEGER INCXS(4), INCYS(4), LENS(4,2), MWPINX(11),
+ MWPINY(11), MWPN(11), NS(4)
* .. External Subroutines ..
EXTERNAL SROT, STEST
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SA/0.3E0/
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/
DATA NS/0, 1, 2, 4/
DATA DX1/0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.9E0, -0.3E0,
+ -0.4E0/
DATA D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S(INCX)
MY = ABS(INCY)
*
DO 40 KN = 1, 4
N = NS(KN)
KSIZE = MIN(2,KN)
LENX = LENS(KN,MX)
LENY = LENS(KN,MY)
*
IF (ICASE.EQ.4) THEN
* .. SROT ..
DO 20 I = 1, 7
SX(I) = DX1(I)
SY(I) = DY1(I)
STX(I) = DT9X(I,KN,KI)
STY(I) = DT9Y(I,KN,KI)
20 CONTINUE
CALL SROT(N,SX,INCX,SY,INCY,SC,SS)
CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC)
CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
STOP
END IF
40 CONTINUE
60 CONTINUE
*
MWPC(1) = 1
DO 80 I = 2, 11
MWPC(I) = 0
80 CONTINUE
MWPS(1) = 0
DO 100 I = 2, 6
MWPS(I) = 1
100 CONTINUE
DO 120 I = 7, 11
MWPS(I) = -1
120 CONTINUE
MWPINX(1) = 1
MWPINX(2) = 1
MWPINX(3) = 1
MWPINX(4) = -1
MWPINX(5) = 1
MWPINX(6) = -1
MWPINX(7) = 1
MWPINX(8) = 1
MWPINX(9) = -1
MWPINX(10) = 1
MWPINX(11) = -1
MWPINY(1) = 1
MWPINY(2) = 1
MWPINY(3) = -1
MWPINY(4) = -1
MWPINY(5) = 2
MWPINY(6) = 1
MWPINY(7) = 1
MWPINY(8) = -1
MWPINY(9) = -1
MWPINY(10) = 2
MWPINY(11) = 1
DO 140 I = 1, 11
MWPN(I) = 5
140 CONTINUE
MWPN(5) = 3
MWPN(10) = 3
DO 160 I = 1, 5
MWPX(I) = I
MWPY(I) = I
MWPTX(1,I) = I
MWPTY(1,I) = I
MWPTX(2,I) = I
MWPTY(2,I) = -I
MWPTX(3,I) = 6 - I
MWPTY(3,I) = I - 6
MWPTX(4,I) = I
MWPTY(4,I) = -I
MWPTX(6,I) = 6 - I
MWPTY(6,I) = I - 6
MWPTX(7,I) = -I
MWPTY(7,I) = I
MWPTX(8,I) = I - 6
MWPTY(8,I) = 6 - I
MWPTX(9,I) = -I
MWPTY(9,I) = I
MWPTX(11,I) = I - 6
MWPTY(11,I) = 6 - I
160 CONTINUE
MWPTX(5,1) = 1
MWPTX(5,2) = 3
MWPTX(5,3) = 5
MWPTX(5,4) = 4
MWPTX(5,5) = 5
MWPTY(5,1) = -1
MWPTY(5,2) = 2
MWPTY(5,3) = -2
MWPTY(5,4) = 4
MWPTY(5,5) = -3
MWPTX(10,1) = -1
MWPTX(10,2) = -3
MWPTX(10,3) = -5
MWPTX(10,4) = 4
MWPTX(10,5) = 5
MWPTY(10,1) = 1
MWPTY(10,2) = 2
MWPTY(10,3) = 2
MWPTY(10,4) = 4
MWPTY(10,5) = 3
DO 200 I = 1, 11
INCX = MWPINX(I)
INCY = MWPINY(I)
DO 180 K = 1, 5
COPYX(K) = MWPX(K)
COPYY(K) = MWPY(K)
MWPSTX(K) = MWPTX(I,K)
MWPSTY(K) = MWPTY(I,K)
180 CONTINUE
CALL SROT(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I))
CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC)
CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC)
200 CONTINUE
RETURN
END
SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)
* ********************************* STEST **************************
*
* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
* NEGLIGIBLE.
*
* C. L. LAWSON, JPL, 1974 DEC 10
*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
REAL SFAC
INTEGER LEN
* .. Array Arguments ..
REAL SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
REAL SD
INTEGER I
* .. External Functions ..
REAL SDIFF
EXTERNAL SDIFF
* .. Intrinsic Functions ..
INTRINSIC ABS
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Executable Statements ..
*
DO 40 I = 1, LEN
SD = SCOMP(I) - STRUE(I)
IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0E0)
+ GO TO 40
*
* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
*
IF ( .NOT. PASS) GO TO 20
* PRINT FAIL MESSAGE AND HEADER.
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),
+ STRUE(I), SD, SSIZE(I)
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
99998 FORMAT (/' CASE N INCX INCY MODE I ',
+ ' COMP(I) TRUE(I) DIFFERENCE',
+ ' SIZE(I)',/1X)
99997 FORMAT (1X,I4,I3,3I5,I3,2E36.8,2E12.4)
END
SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
* ************************* STEST1 *****************************
*
* THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN
* REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE
* ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.
*
* C.L. LAWSON, JPL, 1978 DEC 6
*
* .. Scalar Arguments ..
REAL SCOMP1, SFAC, STRUE1
* .. Array Arguments ..
REAL SSIZE(*)
* .. Local Arrays ..
REAL SCOMP(1), STRUE(1)
* .. External Subroutines ..
EXTERNAL STEST
* .. Executable Statements ..
*
SCOMP(1) = SCOMP1
STRUE(1) = STRUE1
CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)
*
RETURN
END
REAL FUNCTION SDIFF(SA,SB)
* ********************************* SDIFF **************************
* COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15
*
* .. Scalar Arguments ..
REAL SA, SB
* .. Executable Statements ..
SDIFF = SA - SB
RETURN
END
SUBROUTINE ITEST1(ICOMP,ITRUE)
* ********************************* ITEST1 *************************
*
* THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR
* EQUALITY.
* C. L. LAWSON, JPL, 1974 DEC 10
*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
INTEGER ICOMP, ITRUE
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER ID
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Executable Statements ..
*
IF (ICOMP.EQ.ITRUE) GO TO 40
*
* HERE ICOMP IS NOT EQUAL TO ITRUE.
*
IF ( .NOT. PASS) GO TO 20
* PRINT FAIL MESSAGE AND HEADER.
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 ID = ICOMP - ITRUE
WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
99998 FORMAT (/' CASE N INCX INCY MODE ',
+ ' COMP TRUE DIFFERENCE',
+ /1X)
99997 FORMAT (1X,I4,I3,3I5,2I36,I12)
END

34
blas/testing/sblat2.dat Normal file
View File

@ -0,0 +1,34 @@
'sblat2.summ' NAME OF SUMMARY OUTPUT FILE
6 UNIT NUMBER OF SUMMARY FILE
'sblat2.snap' NAME OF SNAPSHOT OUTPUT FILE
-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
F LOGICAL FLAG, T TO STOP ON FAILURES.
T LOGICAL FLAG, T TO TEST ERROR EXITS.
16.0 THRESHOLD VALUE OF TEST RATIO
6 NUMBER OF VALUES OF N
0 1 2 3 5 9 VALUES OF N
4 NUMBER OF VALUES OF K
0 1 2 4 VALUES OF K
4 NUMBER OF VALUES OF INCX AND INCY
1 2 -1 -2 VALUES OF INCX AND INCY
3 NUMBER OF VALUES OF ALPHA
0.0 1.0 0.7 VALUES OF ALPHA
3 NUMBER OF VALUES OF BETA
0.0 1.0 0.9 VALUES OF BETA
SGEMV T PUT F FOR NO TEST. SAME COLUMNS.
SGBMV T PUT F FOR NO TEST. SAME COLUMNS.
SSYMV T PUT F FOR NO TEST. SAME COLUMNS.
SSBMV T PUT F FOR NO TEST. SAME COLUMNS.
SSPMV T PUT F FOR NO TEST. SAME COLUMNS.
STRMV T PUT F FOR NO TEST. SAME COLUMNS.
STBMV T PUT F FOR NO TEST. SAME COLUMNS.
STPMV T PUT F FOR NO TEST. SAME COLUMNS.
STRSV T PUT F FOR NO TEST. SAME COLUMNS.
STBSV T PUT F FOR NO TEST. SAME COLUMNS.
STPSV T PUT F FOR NO TEST. SAME COLUMNS.
SGER T PUT F FOR NO TEST. SAME COLUMNS.
SSYR T PUT F FOR NO TEST. SAME COLUMNS.
SSPR T PUT F FOR NO TEST. SAME COLUMNS.
SSYR2 T PUT F FOR NO TEST. SAME COLUMNS.
SSPR2 T PUT F FOR NO TEST. SAME COLUMNS.

3138
blas/testing/sblat2.f Normal file

File diff suppressed because it is too large Load Diff

20
blas/testing/sblat3.dat Normal file
View File

@ -0,0 +1,20 @@
'sblat3.summ' NAME OF SUMMARY OUTPUT FILE
6 UNIT NUMBER OF SUMMARY FILE
'sblat3.snap' NAME OF SNAPSHOT OUTPUT FILE
-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
F LOGICAL FLAG, T TO STOP ON FAILURES.
T LOGICAL FLAG, T TO TEST ERROR EXITS.
16.0 THRESHOLD VALUE OF TEST RATIO
6 NUMBER OF VALUES OF N
0 1 2 3 5 9 VALUES OF N
3 NUMBER OF VALUES OF ALPHA
0.0 1.0 0.7 VALUES OF ALPHA
3 NUMBER OF VALUES OF BETA
0.0 1.0 1.3 VALUES OF BETA
SGEMM T PUT F FOR NO TEST. SAME COLUMNS.
SSYMM T PUT F FOR NO TEST. SAME COLUMNS.
STRMM T PUT F FOR NO TEST. SAME COLUMNS.
STRSM T PUT F FOR NO TEST. SAME COLUMNS.
SSYRK T PUT F FOR NO TEST. SAME COLUMNS.
SSYR2K T PUT F FOR NO TEST. SAME COLUMNS.

2823
blas/testing/sblat3.f Normal file

File diff suppressed because it is too large Load Diff

681
blas/testing/zblat1.f Normal file
View File

@ -0,0 +1,681 @@
PROGRAM ZBLAT1
* Test program for the COMPLEX*16 Level 1 BLAS.
* Based upon the original BLAS test routine together with:
* F06GAF Example Program Text
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SFAC
INTEGER IC
* .. External Subroutines ..
EXTERNAL CHECK1, CHECK2, HEADER
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SFAC/9.765625D-4/
* .. Executable Statements ..
WRITE (NOUT,99999)
DO 20 IC = 1, 10
ICASE = IC
CALL HEADER
*
* Initialize PASS, INCX, INCY, and MODE for a new case.
* The value 9999 for INCX, INCY or MODE will appear in the
* detailed output, if any, for cases that do not involve
* these parameters.
*
PASS = .TRUE.
INCX = 9999
INCY = 9999
MODE = 9999
IF (ICASE.LE.5) THEN
CALL CHECK2(SFAC)
ELSE IF (ICASE.GE.6) THEN
CALL CHECK1(SFAC)
END IF
* -- Print
IF (PASS) WRITE (NOUT,99998)
20 CONTINUE
STOP
*
99999 FORMAT (' Complex BLAS Test Program Results',/1X)
99998 FORMAT (' ----- PASS -----')
END
SUBROUTINE HEADER
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Arrays ..
CHARACTER*6 L(10)
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA L(1)/'ZDOTC '/
DATA L(2)/'ZDOTU '/
DATA L(3)/'ZAXPY '/
DATA L(4)/'ZCOPY '/
DATA L(5)/'ZSWAP '/
DATA L(6)/'DZNRM2'/
DATA L(7)/'DZASUM'/
DATA L(8)/'ZSCAL '/
DATA L(9)/'ZDSCAL'/
DATA L(10)/'IZAMAX'/
* .. Executable Statements ..
WRITE (NOUT,99999) ICASE, L(ICASE)
RETURN
*
99999 FORMAT (/' Test of subprogram number',I3,12X,A6)
END
SUBROUTINE CHECK1(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
COMPLEX*16 CA
DOUBLE PRECISION SA
INTEGER I, J, LEN, NP1
* .. Local Arrays ..
COMPLEX*16 CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CX(8),
+ MWPCS(5), MWPCT(5)
DOUBLE PRECISION STRUE2(5), STRUE4(5)
INTEGER ITRUE3(5)
* .. External Functions ..
DOUBLE PRECISION DZASUM, DZNRM2
INTEGER IZAMAX
EXTERNAL DZASUM, DZNRM2, IZAMAX
* .. External Subroutines ..
EXTERNAL ZSCAL, ZDSCAL, CTEST, ITEST1, STEST1
* .. Intrinsic Functions ..
INTRINSIC MAX
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA SA, CA/0.3D0, (0.4D0,-0.7D0)/
DATA ((CV(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
+ (1.0D0,2.0D0), (0.3D0,-0.4D0), (3.0D0,4.0D0),
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
+ (0.1D0,-0.3D0), (0.5D0,-0.1D0), (5.0D0,6.0D0),
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (0.1D0,0.1D0),
+ (-0.6D0,0.1D0), (0.1D0,-0.3D0), (7.0D0,8.0D0),
+ (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
+ (7.0D0,8.0D0), (0.3D0,0.1D0), (0.1D0,0.4D0),
+ (0.4D0,0.1D0), (0.1D0,0.2D0), (2.0D0,3.0D0),
+ (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0)/
DATA ((CV(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
+ (4.0D0,5.0D0), (0.3D0,-0.4D0), (6.0D0,7.0D0),
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
+ (0.1D0,-0.3D0), (8.0D0,9.0D0), (0.5D0,-0.1D0),
+ (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
+ (2.0D0,5.0D0), (2.0D0,5.0D0), (0.1D0,0.1D0),
+ (3.0D0,6.0D0), (-0.6D0,0.1D0), (4.0D0,7.0D0),
+ (0.1D0,-0.3D0), (7.0D0,2.0D0), (7.0D0,2.0D0),
+ (7.0D0,2.0D0), (0.3D0,0.1D0), (5.0D0,8.0D0),
+ (0.1D0,0.4D0), (6.0D0,9.0D0), (0.4D0,0.1D0),
+ (8.0D0,3.0D0), (0.1D0,0.2D0), (9.0D0,4.0D0)/
DATA STRUE2/0.0D0, 0.5D0, 0.6D0, 0.7D0, 0.7D0/
DATA STRUE4/0.0D0, 0.7D0, 1.0D0, 1.3D0, 1.7D0/
DATA ((CTRUE5(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
+ (1.0D0,2.0D0), (-0.16D0,-0.37D0), (3.0D0,4.0D0),
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
+ (-0.17D0,-0.19D0), (0.13D0,-0.39D0),
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
+ (0.11D0,-0.03D0), (-0.17D0,0.46D0),
+ (-0.17D0,-0.19D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
+ (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
+ (0.19D0,-0.17D0), (0.32D0,0.09D0),
+ (0.23D0,-0.24D0), (0.18D0,0.01D0),
+ (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0),
+ (2.0D0,3.0D0)/
DATA ((CTRUE5(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
+ (4.0D0,5.0D0), (-0.16D0,-0.37D0), (6.0D0,7.0D0),
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
+ (-0.17D0,-0.19D0), (8.0D0,9.0D0),
+ (0.13D0,-0.39D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
+ (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
+ (0.11D0,-0.03D0), (3.0D0,6.0D0),
+ (-0.17D0,0.46D0), (4.0D0,7.0D0),
+ (-0.17D0,-0.19D0), (7.0D0,2.0D0), (7.0D0,2.0D0),
+ (7.0D0,2.0D0), (0.19D0,-0.17D0), (5.0D0,8.0D0),
+ (0.32D0,0.09D0), (6.0D0,9.0D0),
+ (0.23D0,-0.24D0), (8.0D0,3.0D0),
+ (0.18D0,0.01D0), (9.0D0,4.0D0)/
DATA ((CTRUE6(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
+ (1.0D0,2.0D0), (0.09D0,-0.12D0), (3.0D0,4.0D0),
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
+ (0.03D0,-0.09D0), (0.15D0,-0.03D0),
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
+ (0.03D0,0.03D0), (-0.18D0,0.03D0),
+ (0.03D0,-0.09D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
+ (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
+ (0.09D0,0.03D0), (0.03D0,0.12D0),
+ (0.12D0,0.03D0), (0.03D0,0.06D0), (2.0D0,3.0D0),
+ (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0)/
DATA ((CTRUE6(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
+ (4.0D0,5.0D0), (0.09D0,-0.12D0), (6.0D0,7.0D0),
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
+ (0.03D0,-0.09D0), (8.0D0,9.0D0),
+ (0.15D0,-0.03D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
+ (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
+ (0.03D0,0.03D0), (3.0D0,6.0D0),
+ (-0.18D0,0.03D0), (4.0D0,7.0D0),
+ (0.03D0,-0.09D0), (7.0D0,2.0D0), (7.0D0,2.0D0),
+ (7.0D0,2.0D0), (0.09D0,0.03D0), (5.0D0,8.0D0),
+ (0.03D0,0.12D0), (6.0D0,9.0D0), (0.12D0,0.03D0),
+ (8.0D0,3.0D0), (0.03D0,0.06D0), (9.0D0,4.0D0)/
DATA ITRUE3/0, 1, 2, 2, 2/
* .. Executable Statements ..
DO 60 INCX = 1, 2
DO 40 NP1 = 1, 5
N = NP1 - 1
LEN = 2*MAX(N,1)
* .. Set vector arguments ..
DO 20 I = 1, LEN
CX(I) = CV(I,NP1,INCX)
20 CONTINUE
IF (ICASE.EQ.6) THEN
* .. DZNRM2 ..
CALL STEST1(DZNRM2(N,CX,INCX),STRUE2(NP1),STRUE2(NP1),
+ SFAC)
ELSE IF (ICASE.EQ.7) THEN
* .. DZASUM ..
CALL STEST1(DZASUM(N,CX,INCX),STRUE4(NP1),STRUE4(NP1),
+ SFAC)
ELSE IF (ICASE.EQ.8) THEN
* .. ZSCAL ..
CALL ZSCAL(N,CA,CX,INCX)
CALL CTEST(LEN,CX,CTRUE5(1,NP1,INCX),CTRUE5(1,NP1,INCX),
+ SFAC)
ELSE IF (ICASE.EQ.9) THEN
* .. ZDSCAL ..
CALL ZDSCAL(N,SA,CX,INCX)
CALL CTEST(LEN,CX,CTRUE6(1,NP1,INCX),CTRUE6(1,NP1,INCX),
+ SFAC)
ELSE IF (ICASE.EQ.10) THEN
* .. IZAMAX ..
CALL ITEST1(IZAMAX(N,CX,INCX),ITRUE3(NP1))
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
STOP
END IF
*
40 CONTINUE
60 CONTINUE
*
INCX = 1
IF (ICASE.EQ.8) THEN
* ZSCAL
* Add a test for alpha equal to zero.
CA = (0.0D0,0.0D0)
DO 80 I = 1, 5
MWPCT(I) = (0.0D0,0.0D0)
MWPCS(I) = (1.0D0,1.0D0)
80 CONTINUE
CALL ZSCAL(5,CA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
ELSE IF (ICASE.EQ.9) THEN
* ZDSCAL
* Add a test for alpha equal to zero.
SA = 0.0D0
DO 100 I = 1, 5
MWPCT(I) = (0.0D0,0.0D0)
MWPCS(I) = (1.0D0,1.0D0)
100 CONTINUE
CALL ZDSCAL(5,SA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
* Add a test for alpha equal to one.
SA = 1.0D0
DO 120 I = 1, 5
MWPCT(I) = CX(I)
MWPCS(I) = CX(I)
120 CONTINUE
CALL ZDSCAL(5,SA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
* Add a test for alpha equal to minus one.
SA = -1.0D0
DO 140 I = 1, 5
MWPCT(I) = -CX(I)
MWPCS(I) = -CX(I)
140 CONTINUE
CALL ZDSCAL(5,SA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
END IF
RETURN
END
SUBROUTINE CHECK2(SFAC)
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
COMPLEX*16 CA
INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
* .. Local Arrays ..
COMPLEX*16 CDOT(1), CSIZE1(4), CSIZE2(7,2), CSIZE3(14),
+ CT10X(7,4,4), CT10Y(7,4,4), CT6(4,4), CT7(4,4),
+ CT8(7,4,4), CX(7), CX1(7), CY(7), CY1(7)
INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
* .. External Functions ..
COMPLEX*16 ZDOTC, ZDOTU
EXTERNAL ZDOTC, ZDOTU
* .. External Subroutines ..
EXTERNAL ZAXPY, ZCOPY, ZSWAP, CTEST
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Data statements ..
DATA CA/(0.4D0,-0.7D0)/
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/
DATA NS/0, 1, 2, 4/
DATA CX1/(0.7D0,-0.8D0), (-0.4D0,-0.7D0),
+ (-0.1D0,-0.9D0), (0.2D0,-0.8D0),
+ (-0.9D0,-0.4D0), (0.1D0,0.4D0), (-0.6D0,0.6D0)/
DATA CY1/(0.6D0,-0.6D0), (-0.9D0,0.5D0),
+ (0.7D0,-0.6D0), (0.1D0,-0.5D0), (-0.1D0,-0.2D0),
+ (-0.5D0,-0.3D0), (0.8D0,-0.7D0)/
DATA ((CT8(I,J,1),I=1,7),J=1,4)/(0.6D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.32D0,-1.41D0),
+ (-1.55D0,0.5D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.32D0,-1.41D0), (-1.55D0,0.5D0),
+ (0.03D0,-0.89D0), (-0.38D0,-0.96D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/
DATA ((CT8(I,J,2),I=1,7),J=1,4)/(0.6D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (-0.07D0,-0.89D0),
+ (-0.9D0,0.5D0), (0.42D0,-1.41D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.78D0,0.06D0), (-0.9D0,0.5D0),
+ (0.06D0,-0.13D0), (0.1D0,-0.5D0),
+ (-0.77D0,-0.49D0), (-0.5D0,-0.3D0),
+ (0.52D0,-1.51D0)/
DATA ((CT8(I,J,3),I=1,7),J=1,4)/(0.6D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (-0.07D0,-0.89D0),
+ (-1.18D0,-0.31D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.78D0,0.06D0), (-1.54D0,0.97D0),
+ (0.03D0,-0.89D0), (-0.18D0,-1.31D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/
DATA ((CT8(I,J,4),I=1,7),J=1,4)/(0.6D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.32D0,-1.41D0), (-0.9D0,0.5D0),
+ (0.05D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.32D0,-1.41D0),
+ (-0.9D0,0.5D0), (0.05D0,-0.6D0), (0.1D0,-0.5D0),
+ (-0.77D0,-0.49D0), (-0.5D0,-0.3D0),
+ (0.32D0,-1.16D0)/
DATA CT7/(0.0D0,0.0D0), (-0.06D0,-0.90D0),
+ (0.65D0,-0.47D0), (-0.34D0,-1.22D0),
+ (0.0D0,0.0D0), (-0.06D0,-0.90D0),
+ (-0.59D0,-1.46D0), (-1.04D0,-0.04D0),
+ (0.0D0,0.0D0), (-0.06D0,-0.90D0),
+ (-0.83D0,0.59D0), (0.07D0,-0.37D0),
+ (0.0D0,0.0D0), (-0.06D0,-0.90D0),
+ (-0.76D0,-1.15D0), (-1.33D0,-1.82D0)/
DATA CT6/(0.0D0,0.0D0), (0.90D0,0.06D0),
+ (0.91D0,-0.77D0), (1.80D0,-0.10D0),
+ (0.0D0,0.0D0), (0.90D0,0.06D0), (1.45D0,0.74D0),
+ (0.20D0,0.90D0), (0.0D0,0.0D0), (0.90D0,0.06D0),
+ (-0.55D0,0.23D0), (0.83D0,-0.39D0),
+ (0.0D0,0.0D0), (0.90D0,0.06D0), (1.04D0,0.79D0),
+ (1.95D0,1.22D0)/
DATA ((CT10X(I,J,1),I=1,7),J=1,4)/(0.7D0,-0.8D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.6D0,-0.6D0), (-0.9D0,0.5D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.6D0,-0.6D0),
+ (-0.9D0,0.5D0), (0.7D0,-0.6D0), (0.1D0,-0.5D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/
DATA ((CT10X(I,J,2),I=1,7),J=1,4)/(0.7D0,-0.8D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.7D0,-0.6D0), (-0.4D0,-0.7D0),
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.8D0,-0.7D0),
+ (-0.4D0,-0.7D0), (-0.1D0,-0.2D0),
+ (0.2D0,-0.8D0), (0.7D0,-0.6D0), (0.1D0,0.4D0),
+ (0.6D0,-0.6D0)/
DATA ((CT10X(I,J,3),I=1,7),J=1,4)/(0.7D0,-0.8D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (-0.9D0,0.5D0), (-0.4D0,-0.7D0),
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.1D0,-0.5D0),
+ (-0.4D0,-0.7D0), (0.7D0,-0.6D0), (0.2D0,-0.8D0),
+ (-0.9D0,0.5D0), (0.1D0,0.4D0), (0.6D0,-0.6D0)/
DATA ((CT10X(I,J,4),I=1,7),J=1,4)/(0.7D0,-0.8D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.6D0,-0.6D0), (0.7D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.6D0,-0.6D0),
+ (0.7D0,-0.6D0), (-0.1D0,-0.2D0), (0.8D0,-0.7D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/
DATA ((CT10Y(I,J,1),I=1,7),J=1,4)/(0.6D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.7D0,-0.8D0), (-0.4D0,-0.7D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.7D0,-0.8D0),
+ (-0.4D0,-0.7D0), (-0.1D0,-0.9D0),
+ (0.2D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0)/
DATA ((CT10Y(I,J,2),I=1,7),J=1,4)/(0.6D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (-0.1D0,-0.9D0), (-0.9D0,0.5D0),
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (-0.6D0,0.6D0),
+ (-0.9D0,0.5D0), (-0.9D0,-0.4D0), (0.1D0,-0.5D0),
+ (-0.1D0,-0.9D0), (-0.5D0,-0.3D0),
+ (0.7D0,-0.8D0)/
DATA ((CT10Y(I,J,3),I=1,7),J=1,4)/(0.6D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (-0.1D0,-0.9D0), (0.7D0,-0.8D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (-0.6D0,0.6D0),
+ (-0.9D0,-0.4D0), (-0.1D0,-0.9D0),
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0)/
DATA ((CT10Y(I,J,4),I=1,7),J=1,4)/(0.6D0,-0.6D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.7D0,-0.8D0), (-0.9D0,0.5D0),
+ (-0.4D0,-0.7D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.7D0,-0.8D0),
+ (-0.9D0,0.5D0), (-0.4D0,-0.7D0), (0.1D0,-0.5D0),
+ (-0.1D0,-0.9D0), (-0.5D0,-0.3D0),
+ (0.2D0,-0.8D0)/
DATA CSIZE1/(0.0D0,0.0D0), (0.9D0,0.9D0),
+ (1.63D0,1.73D0), (2.90D0,2.78D0)/
DATA CSIZE3/(0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (1.17D0,1.17D0),
+ (1.17D0,1.17D0), (1.17D0,1.17D0),
+ (1.17D0,1.17D0), (1.17D0,1.17D0),
+ (1.17D0,1.17D0), (1.17D0,1.17D0)/
DATA CSIZE2/(0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (1.54D0,1.54D0),
+ (1.54D0,1.54D0), (1.54D0,1.54D0),
+ (1.54D0,1.54D0), (1.54D0,1.54D0),
+ (1.54D0,1.54D0), (1.54D0,1.54D0)/
* .. Executable Statements ..
DO 60 KI = 1, 4
INCX = INCXS(KI)
INCY = INCYS(KI)
MX = ABS(INCX)
MY = ABS(INCY)
*
DO 40 KN = 1, 4
N = NS(KN)
KSIZE = MIN(2,KN)
LENX = LENS(KN,MX)
LENY = LENS(KN,MY)
* .. initialize all argument arrays ..
DO 20 I = 1, 7
CX(I) = CX1(I)
CY(I) = CY1(I)
20 CONTINUE
IF (ICASE.EQ.1) THEN
* .. ZDOTC ..
CDOT(1) = ZDOTC(N,CX,INCX,CY,INCY)
CALL CTEST(1,CDOT,CT6(KN,KI),CSIZE1(KN),SFAC)
ELSE IF (ICASE.EQ.2) THEN
* .. ZDOTU ..
CDOT(1) = ZDOTU(N,CX,INCX,CY,INCY)
CALL CTEST(1,CDOT,CT7(KN,KI),CSIZE1(KN),SFAC)
ELSE IF (ICASE.EQ.3) THEN
* .. ZAXPY ..
CALL ZAXPY(N,CA,CX,INCX,CY,INCY)
CALL CTEST(LENY,CY,CT8(1,KN,KI),CSIZE2(1,KSIZE),SFAC)
ELSE IF (ICASE.EQ.4) THEN
* .. ZCOPY ..
CALL ZCOPY(N,CX,INCX,CY,INCY)
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0)
ELSE IF (ICASE.EQ.5) THEN
* .. ZSWAP ..
CALL ZSWAP(N,CX,INCX,CY,INCY)
CALL CTEST(LENX,CX,CT10X(1,KN,KI),CSIZE3,1.0D0)
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
END IF
*
40 CONTINUE
60 CONTINUE
RETURN
END
SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)
* ********************************* STEST **************************
*
* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
* NEGLIGIBLE.
*
* C. L. LAWSON, JPL, 1974 DEC 10
*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
INTEGER LEN
* .. Array Arguments ..
DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SD
INTEGER I
* .. External Functions ..
DOUBLE PRECISION SDIFF
EXTERNAL SDIFF
* .. Intrinsic Functions ..
INTRINSIC ABS
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Executable Statements ..
*
DO 40 I = 1, LEN
SD = SCOMP(I) - STRUE(I)
IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0D0)
+ GO TO 40
*
* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
*
IF ( .NOT. PASS) GO TO 20
* PRINT FAIL MESSAGE AND HEADER.
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),
+ STRUE(I), SD, SSIZE(I)
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
99998 FORMAT (/' CASE N INCX INCY MODE I ',
+ ' COMP(I) TRUE(I) DIFFERENCE',
+ ' SIZE(I)',/1X)
99997 FORMAT (1X,I4,I3,3I5,I3,2D36.8,2D12.4)
END
SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
* ************************* STEST1 *****************************
*
* THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN
* REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE
* ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.
*
* C.L. LAWSON, JPL, 1978 DEC 6
*
* .. Scalar Arguments ..
DOUBLE PRECISION SCOMP1, SFAC, STRUE1
* .. Array Arguments ..
DOUBLE PRECISION SSIZE(*)
* .. Local Arrays ..
DOUBLE PRECISION SCOMP(1), STRUE(1)
* .. External Subroutines ..
EXTERNAL STEST
* .. Executable Statements ..
*
SCOMP(1) = SCOMP1
STRUE(1) = STRUE1
CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)
*
RETURN
END
DOUBLE PRECISION FUNCTION SDIFF(SA,SB)
* ********************************* SDIFF **************************
* COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15
*
* .. Scalar Arguments ..
DOUBLE PRECISION SA, SB
* .. Executable Statements ..
SDIFF = SA - SB
RETURN
END
SUBROUTINE CTEST(LEN,CCOMP,CTRUE,CSIZE,SFAC)
* **************************** CTEST *****************************
*
* C.L. LAWSON, JPL, 1978 DEC 6
*
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
INTEGER LEN
* .. Array Arguments ..
COMPLEX*16 CCOMP(LEN), CSIZE(LEN), CTRUE(LEN)
* .. Local Scalars ..
INTEGER I
* .. Local Arrays ..
DOUBLE PRECISION SCOMP(20), SSIZE(20), STRUE(20)
* .. External Subroutines ..
EXTERNAL STEST
* .. Intrinsic Functions ..
INTRINSIC DIMAG, DBLE
* .. Executable Statements ..
DO 20 I = 1, LEN
SCOMP(2*I-1) = DBLE(CCOMP(I))
SCOMP(2*I) = DIMAG(CCOMP(I))
STRUE(2*I-1) = DBLE(CTRUE(I))
STRUE(2*I) = DIMAG(CTRUE(I))
SSIZE(2*I-1) = DBLE(CSIZE(I))
SSIZE(2*I) = DIMAG(CSIZE(I))
20 CONTINUE
*
CALL STEST(2*LEN,SCOMP,STRUE,SSIZE,SFAC)
RETURN
END
SUBROUTINE ITEST1(ICOMP,ITRUE)
* ********************************* ITEST1 *************************
*
* THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR
* EQUALITY.
* C. L. LAWSON, JPL, 1974 DEC 10
*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalar Arguments ..
INTEGER ICOMP, ITRUE
* .. Scalars in Common ..
INTEGER ICASE, INCX, INCY, MODE, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER ID
* .. Common blocks ..
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
* .. Executable Statements ..
IF (ICOMP.EQ.ITRUE) GO TO 40
*
* HERE ICOMP IS NOT EQUAL TO ITRUE.
*
IF ( .NOT. PASS) GO TO 20
* PRINT FAIL MESSAGE AND HEADER.
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 ID = ICOMP - ITRUE
WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
99998 FORMAT (/' CASE N INCX INCY MODE ',
+ ' COMP TRUE DIFFERENCE',
+ /1X)
99997 FORMAT (1X,I4,I3,3I5,2I36,I12)
END

35
blas/testing/zblat2.dat Normal file
View File

@ -0,0 +1,35 @@
'zblat2.summ' NAME OF SUMMARY OUTPUT FILE
6 UNIT NUMBER OF SUMMARY FILE
'cbla2t.snap' NAME OF SNAPSHOT OUTPUT FILE
-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
F LOGICAL FLAG, T TO STOP ON FAILURES.
T LOGICAL FLAG, T TO TEST ERROR EXITS.
16.0 THRESHOLD VALUE OF TEST RATIO
6 NUMBER OF VALUES OF N
0 1 2 3 5 9 VALUES OF N
4 NUMBER OF VALUES OF K
0 1 2 4 VALUES OF K
4 NUMBER OF VALUES OF INCX AND INCY
1 2 -1 -2 VALUES OF INCX AND INCY
3 NUMBER OF VALUES OF ALPHA
(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
3 NUMBER OF VALUES OF BETA
(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
ZGEMV T PUT F FOR NO TEST. SAME COLUMNS.
ZGBMV T PUT F FOR NO TEST. SAME COLUMNS.
ZHEMV T PUT F FOR NO TEST. SAME COLUMNS.
ZHBMV T PUT F FOR NO TEST. SAME COLUMNS.
ZHPMV T PUT F FOR NO TEST. SAME COLUMNS.
ZTRMV T PUT F FOR NO TEST. SAME COLUMNS.
ZTBMV T PUT F FOR NO TEST. SAME COLUMNS.
ZTPMV T PUT F FOR NO TEST. SAME COLUMNS.
ZTRSV T PUT F FOR NO TEST. SAME COLUMNS.
ZTBSV T PUT F FOR NO TEST. SAME COLUMNS.
ZTPSV T PUT F FOR NO TEST. SAME COLUMNS.
ZGERC T PUT F FOR NO TEST. SAME COLUMNS.
ZGERU T PUT F FOR NO TEST. SAME COLUMNS.
ZHER T PUT F FOR NO TEST. SAME COLUMNS.
ZHPR T PUT F FOR NO TEST. SAME COLUMNS.
ZHER2 T PUT F FOR NO TEST. SAME COLUMNS.
ZHPR2 T PUT F FOR NO TEST. SAME COLUMNS.

3249
blas/testing/zblat2.f Normal file

File diff suppressed because it is too large Load Diff

23
blas/testing/zblat3.dat Normal file
View File

@ -0,0 +1,23 @@
'zblat3.summ' NAME OF SUMMARY OUTPUT FILE
6 UNIT NUMBER OF SUMMARY FILE
'zblat3.snap' NAME OF SNAPSHOT OUTPUT FILE
-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
F LOGICAL FLAG, T TO STOP ON FAILURES.
F LOGICAL FLAG, T TO TEST ERROR EXITS.
16.0 THRESHOLD VALUE OF TEST RATIO
6 NUMBER OF VALUES OF N
0 1 2 3 5 9 VALUES OF N
3 NUMBER OF VALUES OF ALPHA
(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
3 NUMBER OF VALUES OF BETA
(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
ZGEMM T PUT F FOR NO TEST. SAME COLUMNS.
ZHEMM T PUT F FOR NO TEST. SAME COLUMNS.
ZSYMM T PUT F FOR NO TEST. SAME COLUMNS.
ZTRMM T PUT F FOR NO TEST. SAME COLUMNS.
ZTRSM T PUT F FOR NO TEST. SAME COLUMNS.
ZHERK T PUT F FOR NO TEST. SAME COLUMNS.
ZSYRK T PUT F FOR NO TEST. SAME COLUMNS.
ZHER2K T PUT F FOR NO TEST. SAME COLUMNS.
ZSYR2K T PUT F FOR NO TEST. SAME COLUMNS.

3445
blas/testing/zblat3.f Normal file

File diff suppressed because it is too large Load Diff