47 parameter ( nin = 5, nout = 6 )
49 parameter ( nsubs = 6 )
50 DOUBLE PRECISION ZERO, HALF, ONE
51 parameter ( zero = 0.0d0, half = 0.5d0, one = 1.0d0 )
53 parameter ( nmax = 65 )
54 INTEGER NIDMAX, NALMAX, NBEMAX
55 parameter ( nidmax = 9, nalmax = 7, nbemax = 7 )
57 DOUBLE PRECISION EPS, ERR, THRESH
58 INTEGER I, ISNUM, J, N, NALF, NBET, NIDIM, NTRA,
60 LOGICAL FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,
61 $ tsterr, corder, rorder
62 CHARACTER*1 TRANSA, TRANSB
66 DOUBLE PRECISION AA( nmax*nmax ), AB( nmax, 2*nmax ),
67 $ alf( nalmax ), as( nmax*nmax ),
68 $ bb( nmax*nmax ), bet( nbemax ),
69 $ bs( nmax*nmax ), c( nmax, nmax ),
70 $ cc( nmax*nmax ), cs( nmax*nmax ), ct( nmax ),
71 $ g( nmax ), w( 2*nmax )
72 INTEGER IDIM( nidmax )
73 LOGICAL LTEST( nsubs )
74 CHARACTER*12 SNAMES( nsubs )
76 DOUBLE PRECISION DDIFF
89 COMMON /infoc/infot, noutc, ok
92 DATA snames/
'cblas_dgemm ',
'cblas_dsymm ',
93 $
'cblas_dtrmm ',
'cblas_dtrsm ',
'cblas_dsyrk ',
102 READ( nin, fmt = * )snaps
103 READ( nin, fmt = * )ntra
106 OPEN( ntra, file = snaps, status =
'NEW' )
109 READ( nin, fmt = * )rewi
110 rewi = rewi.AND.trace
112 READ( nin, fmt = * )sfatal
114 READ( nin, fmt = * )tsterr
116 READ( nin, fmt = * )layout
118 READ( nin, fmt = * )thresh
123 READ( nin, fmt = * )nidim
124 IF( nidim.LT.1.OR.nidim.GT.nidmax )
THEN
125 WRITE( nout, fmt = 9997 )
'N', nidmax
128 READ( nin, fmt = * )( idim( i ), i = 1, nidim )
130 IF( idim( i ).LT.0.OR.idim( i ).GT.nmax )
THEN
131 WRITE( nout, fmt = 9996 )nmax
136 READ( nin, fmt = * )nalf
137 IF( nalf.LT.1.OR.nalf.GT.nalmax )
THEN
138 WRITE( nout, fmt = 9997 )
'ALPHA', nalmax
141 READ( nin, fmt = * )( alf( i ), i = 1, nalf )
143 READ( nin, fmt = * )nbet
144 IF( nbet.LT.1.OR.nbet.GT.nbemax )
THEN
145 WRITE( nout, fmt = 9997 )
'BETA', nbemax
148 READ( nin, fmt = * )( bet( i ), i = 1, nbet )
152 WRITE( nout, fmt = 9995 )
153 WRITE( nout, fmt = 9994 )( idim( i ), i = 1, nidim )
154 WRITE( nout, fmt = 9993 )( alf( i ), i = 1, nalf )
155 WRITE( nout, fmt = 9992 )( bet( i ), i = 1, nbet )
156 IF( .NOT.tsterr )
THEN
157 WRITE( nout, fmt = * )
158 WRITE( nout, fmt = 9984 )
160 WRITE( nout, fmt = * )
161 WRITE( nout, fmt = 9999 )thresh
162 WRITE( nout, fmt = * )
166 IF (layout.EQ.2)
THEN
169 WRITE( *, fmt = 10002 )
170 ELSE IF (layout.EQ.1)
THEN
172 WRITE( *, fmt = 10001 )
173 ELSE IF (layout.EQ.0)
THEN
175 WRITE( *, fmt = 10000 )
186 30
READ( nin, fmt = 9988, end = 60 )snamet, ltestt
188 IF( snamet.EQ.snames( i ) )
191 WRITE( nout, fmt = 9990 )snamet
193 50 ltest( i ) = ltestt
203 IF( ddiff( one + eps, one ).EQ.zero )
209 WRITE( nout, fmt = 9998 )eps
216 ab( i, j ) = max( i - j + 1, 0 )
218 ab( j, nmax + 1 ) = j
219 ab( 1, nmax + j ) = j
223 cc( j ) = j*( ( j + 1 )*j )/2 - ( ( j + 1 )*j*( j - 1 ) )/3
229 CALL dmmch( transa, transb, n, 1, n, one, ab, nmax,
230 $ ab( 1, nmax + 1 ), nmax, zero, c, nmax, ct, g, cc,
231 $ nmax, eps, err, fatal, nout, .true. )
232 same = lde( cc, ct, n )
233 IF( .NOT.same.OR.err.NE.zero )
THEN
234 WRITE( nout, fmt = 9989 )transa, transb, same, err
238 CALL dmmch( transa, transb, n, 1, n, one, ab, nmax,
239 $ ab( 1, nmax + 1 ), nmax, zero, c, nmax, ct, g, cc,
240 $ nmax, eps, err, fatal, nout, .true. )
241 same = lde( cc, ct, n )
242 IF( .NOT.same.OR.err.NE.zero )
THEN
243 WRITE( nout, fmt = 9989 )transa, transb, same, err
247 ab( j, nmax + 1 ) = n - j + 1
248 ab( 1, nmax + j ) = n - j + 1
251 cc( n - j + 1 ) = j*( ( j + 1 )*j )/2 -
252 $ ( ( j + 1 )*j*( j - 1 ) )/3
256 CALL dmmch( transa, transb, n, 1, n, one, ab, nmax,
257 $ ab( 1, nmax + 1 ), nmax, zero, c, nmax, ct, g, cc,
258 $ nmax, eps, err, fatal, nout, .true. )
259 same = lde( cc, ct, n )
260 IF( .NOT.same.OR.err.NE.zero )
THEN
261 WRITE( nout, fmt = 9989 )transa, transb, same, err
265 CALL dmmch( transa, transb, n, 1, n, one, ab, nmax,
266 $ ab( 1, nmax + 1 ), nmax, zero, c, nmax, ct, g, cc,
267 $ nmax, eps, err, fatal, nout, .true. )
268 same = lde( cc, ct, n )
269 IF( .NOT.same.OR.err.NE.zero )
THEN
270 WRITE( nout, fmt = 9989 )transa, transb, same, err
276 DO 200 isnum = 1, nsubs
277 WRITE( nout, fmt = * )
278 IF( .NOT.ltest( isnum ) )
THEN
280 WRITE( nout, fmt = 9987 )snames( isnum )
282 srnamt = snames( isnum )
285 CALL cd3chke( snames( isnum ) )
286 WRITE( nout, fmt = * )
292 GO TO ( 140, 150, 160, 160, 170, 180 )isnum
295 CALL dchk1( snames( isnum ), eps, thresh, nout, ntra, trace,
296 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
297 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
301 CALL dchk1( snames( isnum ), eps, thresh, nout, ntra, trace,
302 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
303 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
309 CALL dchk2( snames( isnum ), eps, thresh, nout, ntra, trace,
310 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
311 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
315 CALL dchk2( snames( isnum ), eps, thresh, nout, ntra, trace,
316 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
317 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
323 CALL dchk3( snames( isnum ), eps, thresh, nout, ntra, trace,
324 $ rewi, fatal, nidim, idim, nalf, alf, nmax, ab,
325 $ aa, as, ab( 1, nmax + 1 ), bb, bs, ct, g, c,
329 CALL dchk3( snames( isnum ), eps, thresh, nout, ntra, trace,
330 $ rewi, fatal, nidim, idim, nalf, alf, nmax, ab,
331 $ aa, as, ab( 1, nmax + 1 ), bb, bs, ct, g, c,
337 CALL dchk4( snames( isnum ), eps, thresh, nout, ntra, trace,
338 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
339 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
343 CALL dchk4( snames( isnum ), eps, thresh, nout, ntra, trace,
344 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
345 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
351 CALL dchk5( snames( isnum ), eps, thresh, nout, ntra, trace,
352 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
353 $ nmax, ab, aa, as, bb, bs, c, cc, cs, ct, g, w,
357 CALL dchk5( snames( isnum ), eps, thresh, nout, ntra, trace,
358 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
359 $ nmax, ab, aa, as, bb, bs, c, cc, cs, ct, g, w,
364 190
IF( fatal.AND.sfatal )
368 WRITE( nout, fmt = 9986 )
372 WRITE( nout, fmt = 9985 )
376 WRITE( nout, fmt = 9991 )
384 10002
FORMAT(
' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
385 10001
FORMAT(
' ROW-MAJOR DATA LAYOUT IS TESTED' )
386 10000
FORMAT(
' COLUMN-MAJOR DATA LAYOUT IS TESTED' )
387 9999
FORMAT(
' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',
389 9998
FORMAT(
' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1p, d9.1 )
390 9997
FORMAT(
' NUMBER OF VALUES OF ', a,
' IS LESS THAN 1 OR GREATER ',
392 9996
FORMAT(
' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', i2 )
393 9995
FORMAT(
' TESTS OF THE DOUBLE PRECISION LEVEL 3 BLAS', //
' THE F',
394 $
'OLLOWING PARAMETER VALUES WILL BE USED:' )
395 9994
FORMAT(
' FOR N ', 9i6 )
396 9993
FORMAT(
' FOR ALPHA ', 7f6.1 )
397 9992
FORMAT(
' FOR BETA ', 7f6.1 )
398 9991
FORMAT(
' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',
399 $ /
' ******* TESTS ABANDONED *******' )
400 9990
FORMAT(
' SUBPROGRAM NAME ', a12,
' NOT RECOGNIZED', /
' ******* T',
401 $
'ESTS ABANDONED *******' )
402 9989
FORMAT(
' ERROR IN DMMCH - IN-LINE DOT PRODUCTS ARE BEING EVALU',
403 $
'ATED WRONGLY.', /
' DMMCH WAS CALLED WITH TRANSA = ', a1,
404 $
' AND TRANSB = ', a1, /
' AND RETURNED SAME = ', l1,
' AND ',
405 $
'ERR = ', f12.3,
'.', /
' THIS MAY BE DUE TO FAULTS IN THE ',
406 $
'ARITHMETIC OR THE COMPILER.', /
' ******* TESTS ABANDONED ',
408 9988
FORMAT( a12,l2 )
409 9987
FORMAT( 1x, a12,
' WAS NOT TESTED' )
410 9986
FORMAT( /
' END OF TESTS' )
411 9985
FORMAT( /
' ******* FATAL ERROR - TESTS ABANDONED *******' )
412 9984
FORMAT(
' ERROR-EXITS WILL NOT BE TESTED' )
417 SUBROUTINE dchk1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
418 $ fatal, nidim, idim, nalf, alf, nbet, bet, nmax,
419 $ a, aa, as, b, bb, bs, c, cc, cs, ct, g, iorder)
432 DOUBLE PRECISION ZERO
433 parameter ( zero = 0.0d0 )
435 DOUBLE PRECISION EPS, THRESH
436 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
437 LOGICAL FATAL, REWI, TRACE
440 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
441 $ as( nmax*nmax ), b( nmax, nmax ),
442 $ bb( nmax*nmax ), bet( nbet ), bs( nmax*nmax ),
443 $ c( nmax, nmax ), cc( nmax*nmax ),
444 $ cs( nmax*nmax ), ct( nmax ), g( nmax )
445 INTEGER IDIM( nidim )
447 DOUBLE PRECISION ALPHA, ALS, BETA, BLS, ERR, ERRMAX
448 INTEGER I, IA, IB, ICA, ICB, IK, IM, IN, K, KS, LAA,
449 $ lbb, lcc, lda, ldas, ldb, ldbs, ldc, ldcs, m,
450 $ ma, mb, ms, n, na, nargs, nb, nc, ns
451 LOGICAL NULL, RESET, SAME, TRANA, TRANB
452 CHARACTER*1 TRANAS, TRANBS, TRANSA, TRANSB
467 COMMON /infoc/infot, noutc, ok
490 null = n.LE.0.OR.m.LE.0
496 transa = ich( ica: ica )
497 trana = transa.EQ.
'T'.OR.transa.EQ.
'C'
517 CALL dmake(
'GE',
' ',
' ', ma, na, a, nmax, aa, lda,
521 transb = ich( icb: icb )
522 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
542 CALL dmake(
'GE',
' ',
' ', mb, nb, b, nmax, bb,
553 CALL dmake(
'GE',
' ',
' ', m, n, c, nmax,
554 $ cc, ldc, reset, zero )
584 $
CALL dprcn1(ntra, nc, sname, iorder,
585 $ transa, transb, m, n, k, alpha, lda,
589 CALL cdgemm( iorder, transa, transb, m, n,
590 $ k, alpha, aa, lda, bb, ldb,
596 WRITE( nout, fmt = 9994 )
603 isame( 1 ) = transa.EQ.tranas
604 isame( 2 ) = transb.EQ.tranbs
608 isame( 6 ) = als.EQ.alpha
609 isame( 7 ) = lde( as, aa, laa )
610 isame( 8 ) = ldas.EQ.lda
611 isame( 9 ) = lde( bs, bb, lbb )
612 isame( 10 ) = ldbs.EQ.ldb
613 isame( 11 ) = bls.EQ.beta
615 isame( 12 ) = lde( cs, cc, lcc )
617 isame( 12 ) = lderes(
'GE',
' ', m, n, cs,
620 isame( 13 ) = ldcs.EQ.ldc
627 same = same.AND.isame( i )
628 IF( .NOT.isame( i ) )
629 $
WRITE( nout, fmt = 9998 )i
640 CALL dmmch( transa, transb, m, n, k,
641 $ alpha, a, nmax, b, nmax, beta,
642 $ c, nmax, ct, g, cc, ldc, eps,
643 $ err, fatal, nout, .true. )
644 errmax = max( errmax, err )
667 IF( errmax.LT.thresh )
THEN
668 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
669 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
671 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
672 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
677 WRITE( nout, fmt = 9996 )sname
678 CALL dprcn1(nout, nc, sname, iorder, transa, transb,
679 $ m, n, k, alpha, lda, ldb, beta, ldc)
684 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
685 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
686 $
'RATIO ', f8.2,
' - SUSPECT *******' )
687 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
688 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
689 $
'RATIO ', f8.2,
' - SUSPECT *******' )
690 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
691 $
' (', i6,
' CALL',
'S)' )
692 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
693 $
' (', i6,
' CALL',
'S)' )
694 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
695 $
'ANGED INCORRECTLY *******' )
696 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
697 9995
FORMAT( 1x, i6,
': ', a12,
'(''', a1,
''',''', a1,
''',',
698 $ 3( i3,
',' ), f4.1,
', A,', i3,
', B,', i3,
',', f4.1,
', ',
700 9994
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
706 SUBROUTINE dprcn1(NOUT, NC, SNAME, IORDER, TRANSA, TRANSB, M, N,
707 $ k, alpha, lda, ldb, beta, ldc)
708 INTEGER NOUT, NC, IORDER, M, N, K, LDA, LDB, LDC
709 DOUBLE PRECISION ALPHA, BETA
710 CHARACTER*1 TRANSA, TRANSB
712 CHARACTER*14 CRC, CTA,CTB
714 IF (transa.EQ.
'N')
THEN
715 cta =
' CblasNoTrans'
716 ELSE IF (transa.EQ.
'T')
THEN
719 cta =
'CblasConjTrans'
721 IF (transb.EQ.
'N')
THEN
722 ctb =
' CblasNoTrans'
723 ELSE IF (transb.EQ.
'T')
THEN
726 ctb =
'CblasConjTrans'
729 crc =
' CblasRowMajor'
731 crc =
' CblasColMajor'
733 WRITE(nout, fmt = 9995)nc,sname,crc, cta,ctb
734 WRITE(nout, fmt = 9994)m, n, k, alpha, lda, ldb, beta, ldc
736 9995
FORMAT( 1x, i6,
': ', a12,
'(', a14,
',', a14,
',', a14,
',')
737 9994
FORMAT( 20x, 3( i3,
',' ), f4.1,
', A,', i3,
', B,', i3,
',',
738 $ f4.1,
', ',
'C,', i3,
').' )
741 SUBROUTINE dchk2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
742 $ fatal, nidim, idim, nalf, alf, nbet, bet, nmax,
743 $ a, aa, as, b, bb, bs, c, cc, cs, ct, g, iorder)
756 DOUBLE PRECISION ZERO
757 parameter ( zero = 0.0d0 )
759 DOUBLE PRECISION EPS, THRESH
760 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
761 LOGICAL FATAL, REWI, TRACE
764 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
765 $ as( nmax*nmax ), b( nmax, nmax ),
766 $ bb( nmax*nmax ), bet( nbet ), bs( nmax*nmax ),
767 $ c( nmax, nmax ), cc( nmax*nmax ),
768 $ cs( nmax*nmax ), ct( nmax ), g( nmax )
769 INTEGER IDIM( nidim )
771 DOUBLE PRECISION ALPHA, ALS, BETA, BLS, ERR, ERRMAX
772 INTEGER I, IA, IB, ICS, ICU, IM, IN, LAA, LBB, LCC,
773 $ lda, ldas, ldb, ldbs, ldc, ldcs, m, ms, n, na,
775 LOGICAL LEFT, NULL, RESET, SAME
776 CHARACTER*1 SIDE, SIDES, UPLO, UPLOS
777 CHARACTER*2 ICHS, ICHU
791 COMMON /infoc/infot, noutc, ok
793 DATA ichs/
'LR'/, ichu/
'UL'/
814 null = n.LE.0.OR.m.LE.0
827 CALL dmake(
'GE',
' ',
' ', m, n, b, nmax, bb, ldb, reset,
831 side = ichs( ics: ics )
849 uplo = ichu( icu: icu )
853 CALL dmake(
'SY', uplo,
' ', na, na, a, nmax, aa, lda,
864 CALL dmake(
'GE',
' ',
' ', m, n, c, nmax, cc,
894 $
CALL dprcn2(ntra, nc, sname, iorder,
895 $ side, uplo, m, n, alpha, lda, ldb,
899 CALL cdsymm( iorder, side, uplo, m, n, alpha,
900 $ aa, lda, bb, ldb, beta, cc, ldc )
905 WRITE( nout, fmt = 9994 )
912 isame( 1 ) = sides.EQ.side
913 isame( 2 ) = uplos.EQ.uplo
916 isame( 5 ) = als.EQ.alpha
917 isame( 6 ) = lde( as, aa, laa )
918 isame( 7 ) = ldas.EQ.lda
919 isame( 8 ) = lde( bs, bb, lbb )
920 isame( 9 ) = ldbs.EQ.ldb
921 isame( 10 ) = bls.EQ.beta
923 isame( 11 ) = lde( cs, cc, lcc )
925 isame( 11 ) = lderes(
'GE',
' ', m, n, cs,
928 isame( 12 ) = ldcs.EQ.ldc
935 same = same.AND.isame( i )
936 IF( .NOT.isame( i ) )
937 $
WRITE( nout, fmt = 9998 )i
949 CALL dmmch(
'N',
'N', m, n, m, alpha, a,
950 $ nmax, b, nmax, beta, c, nmax,
951 $ ct, g, cc, ldc, eps, err,
952 $ fatal, nout, .true. )
954 CALL dmmch(
'N',
'N', m, n, n, alpha, b,
955 $ nmax, a, nmax, beta, c, nmax,
956 $ ct, g, cc, ldc, eps, err,
957 $ fatal, nout, .true. )
959 errmax = max( errmax, err )
980 IF( errmax.LT.thresh )
THEN
981 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
982 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
984 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
985 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
990 WRITE( nout, fmt = 9996 )sname
991 CALL dprcn2(nout, nc, sname, iorder, side, uplo, m, n, alpha, lda,
997 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
998 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
999 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1000 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1001 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1002 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1003 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1004 $
' (', i6,
' CALL',
'S)' )
1005 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1006 $
' (', i6,
' CALL',
'S)' )
1007 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1008 $
'ANGED INCORRECTLY *******' )
1009 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
1010 9995
FORMAT( 1x, i6,
': ', a12,
'(', 2(
'''', a1,
''',' ), 2( i3,
',' ),
1011 $ f4.1,
', A,', i3,
', B,', i3,
',', f4.1,
', C,', i3,
') ',
1013 9994
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1020 SUBROUTINE dprcn2(NOUT, NC, SNAME, IORDER, SIDE, UPLO, M, N,
1021 $ alpha, lda, ldb, beta, ldc)
1022 INTEGER NOUT, NC, IORDER, M, N, LDA, LDB, LDC
1023 DOUBLE PRECISION ALPHA, BETA
1024 CHARACTER*1 SIDE, UPLO
1026 CHARACTER*14 CRC, CS,CU
1028 IF (side.EQ.
'L')
THEN
1033 IF (uplo.EQ.
'U')
THEN
1038 IF (iorder.EQ.1)
THEN
1039 crc =
' CblasRowMajor'
1041 crc =
' CblasColMajor'
1043 WRITE(nout, fmt = 9995)nc,sname,crc, cs,cu
1044 WRITE(nout, fmt = 9994)m, n, alpha, lda, ldb, beta, ldc
1046 9995
FORMAT( 1x, i6,
': ', a12,
'(', a14,
',', a14,
',', a14,
',')
1047 9994
FORMAT( 20x, 2( i3,
',' ), f4.1,
', A,', i3,
', B,', i3,
',',
1048 $ f4.1,
', ',
'C,', i3,
').' )
1051 SUBROUTINE dchk3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1052 $ fatal, nidim, idim, nalf, alf, nmax, a, aa, as,
1053 $ b, bb, bs, ct, g, c, iorder )
1066 DOUBLE PRECISION ZERO, ONE
1067 parameter ( zero = 0.0d0, one = 1.0d0 )
1069 DOUBLE PRECISION EPS, THRESH
1070 INTEGER NALF, NIDIM, NMAX, NOUT, NTRA, IORDER
1071 LOGICAL FATAL, REWI, TRACE
1074 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
1075 $ as( nmax*nmax ), b( nmax, nmax ),
1076 $ bb( nmax*nmax ), bs( nmax*nmax ),
1077 $ c( nmax, nmax ), ct( nmax ), g( nmax )
1078 INTEGER IDIM( nidim )
1080 DOUBLE PRECISION ALPHA, ALS, ERR, ERRMAX
1081 INTEGER I, IA, ICD, ICS, ICT, ICU, IM, IN, J, LAA, LBB,
1082 $ lda, ldas, ldb, ldbs, m, ms, n, na, nargs, nc,
1084 LOGICAL LEFT, NULL, RESET, SAME
1085 CHARACTER*1 DIAG, DIAGS, SIDE, SIDES, TRANAS, TRANSA, UPLO,
1087 CHARACTER*2 ICHD, ICHS, ICHU
1093 EXTERNAL lde, lderes
1099 INTEGER INFOT, NOUTC
1102 COMMON /infoc/infot, noutc, ok
1104 DATA ichu/
'UL'/, icht/
'NTC'/, ichd/
'UN'/, ichs/
'LR'/
1118 DO 140 im = 1, nidim
1121 DO 130 in = 1, nidim
1131 null = m.LE.0.OR.n.LE.0
1134 side = ichs( ics: ics )
1151 uplo = ichu( icu: icu )
1154 transa = icht( ict: ict )
1157 diag = ichd( icd: icd )
1164 CALL dmake(
'TR', uplo, diag, na, na, a,
1165 $ nmax, aa, lda, reset, zero )
1169 CALL dmake(
'GE',
' ',
' ', m, n, b, nmax,
1170 $ bb, ldb, reset, zero )
1195 IF( sname( 10: 11 ).EQ.
'mm' )
THEN
1197 $
CALL dprcn3( ntra, nc, sname, iorder,
1198 $ side, uplo, transa, diag, m, n, alpha,
1202 CALL cdtrmm( iorder, side, uplo, transa,
1203 $ diag, m, n, alpha, aa, lda,
1205 ELSE IF( sname( 10: 11 ).EQ.
'sm' )
THEN
1207 $
CALL dprcn3( ntra, nc, sname, iorder,
1208 $ side, uplo, transa, diag, m, n, alpha,
1212 CALL cdtrsm( iorder, side, uplo, transa,
1213 $ diag, m, n, alpha, aa, lda,
1220 WRITE( nout, fmt = 9994 )
1227 isame( 1 ) = sides.EQ.side
1228 isame( 2 ) = uplos.EQ.uplo
1229 isame( 3 ) = tranas.EQ.transa
1230 isame( 4 ) = diags.EQ.diag
1231 isame( 5 ) = ms.EQ.m
1232 isame( 6 ) = ns.EQ.n
1233 isame( 7 ) = als.EQ.alpha
1234 isame( 8 ) = lde( as, aa, laa )
1235 isame( 9 ) = ldas.EQ.lda
1237 isame( 10 ) = lde( bs, bb, lbb )
1239 isame( 10 ) = lderes(
'GE',
' ', m, n, bs,
1242 isame( 11 ) = ldbs.EQ.ldb
1249 same = same.AND.isame( i )
1250 IF( .NOT.isame( i ) )
1251 $
WRITE( nout, fmt = 9998 )i
1259 IF( sname( 10: 11 ).EQ.
'mm' )
THEN
1264 CALL dmmch( transa,
'N', m, n, m,
1265 $ alpha, a, nmax, b, nmax,
1266 $ zero, c, nmax, ct, g,
1267 $ bb, ldb, eps, err,
1268 $ fatal, nout, .true. )
1270 CALL dmmch(
'N', transa, m, n, n,
1271 $ alpha, b, nmax, a, nmax,
1272 $ zero, c, nmax, ct, g,
1273 $ bb, ldb, eps, err,
1274 $ fatal, nout, .true. )
1276 ELSE IF( sname( 10: 11 ).EQ.
'sm' )
THEN
1283 c( i, j ) = bb( i + ( j - 1 )*
1285 bb( i + ( j - 1 )*ldb ) = alpha*
1291 CALL dmmch( transa,
'N', m, n, m,
1292 $ one, a, nmax, c, nmax,
1293 $ zero, b, nmax, ct, g,
1294 $ bb, ldb, eps, err,
1295 $ fatal, nout, .false. )
1297 CALL dmmch(
'N', transa, m, n, n,
1298 $ one, c, nmax, a, nmax,
1299 $ zero, b, nmax, ct, g,
1300 $ bb, ldb, eps, err,
1301 $ fatal, nout, .false. )
1304 errmax = max( errmax, err )
1327 IF( errmax.LT.thresh )
THEN
1328 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
1329 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
1331 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
1332 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
1337 WRITE( nout, fmt = 9996 )sname
1339 $
CALL dprcn3( ntra, nc, sname, iorder, side, uplo, transa, diag,
1340 $ m, n, alpha, lda, ldb)
1345 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1346 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1347 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1348 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1349 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1350 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1351 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1352 $
' (', i6,
' CALL',
'S)' )
1353 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1354 $
' (', i6,
' CALL',
'S)' )
1355 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1356 $
'ANGED INCORRECTLY *******' )
1357 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
1358 9995
FORMAT( 1x, i6,
': ', a12,
'(', 4(
'''', a1,
''',' ), 2( i3,
',' ),
1359 $ f4.1,
', A,', i3,
', B,', i3,
') .' )
1360 9994
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1367 SUBROUTINE dprcn3(NOUT, NC, SNAME, IORDER, SIDE, UPLO, TRANSA,
1368 $ diag, m, n, alpha, lda, ldb)
1369 INTEGER NOUT, NC, IORDER, M, N, LDA, LDB
1370 DOUBLE PRECISION ALPHA
1371 CHARACTER*1 SIDE, UPLO, TRANSA, DIAG
1373 CHARACTER*14 CRC, CS, CU, CA, CD
1375 IF (side.EQ.
'L')
THEN
1380 IF (uplo.EQ.
'U')
THEN
1385 IF (transa.EQ.
'N')
THEN
1386 ca =
' CblasNoTrans'
1387 ELSE IF (transa.EQ.
'T')
THEN
1390 ca =
'CblasConjTrans'
1392 IF (diag.EQ.
'N')
THEN
1393 cd =
' CblasNonUnit'
1397 IF (iorder.EQ.1)
THEN
1398 crc =
' CblasRowMajor'
1400 crc =
' CblasColMajor'
1402 WRITE(nout, fmt = 9995)nc,sname,crc, cs,cu
1403 WRITE(nout, fmt = 9994)ca, cd, m, n, alpha, lda, ldb
1405 9995
FORMAT( 1x, i6,
': ', a12,
'(', a14,
',', a14,
',', a14,
',')
1406 9994
FORMAT( 22x, 2( a14,
',') , 2( i3,
',' ),
1407 $ f4.1,
', A,', i3,
', B,', i3,
').' )
1410 SUBROUTINE dchk4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1411 $ fatal, nidim, idim, nalf, alf, nbet, bet, nmax,
1412 $ a, aa, as, b, bb, bs, c, cc, cs, ct, g, iorder)
1425 DOUBLE PRECISION ZERO
1426 parameter ( zero = 0.0d0 )
1428 DOUBLE PRECISION EPS, THRESH
1429 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
1430 LOGICAL FATAL, REWI, TRACE
1433 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
1434 $ as( nmax*nmax ), b( nmax, nmax ),
1435 $ bb( nmax*nmax ), bet( nbet ), bs( nmax*nmax ),
1436 $ c( nmax, nmax ), cc( nmax*nmax ),
1437 $ cs( nmax*nmax ), ct( nmax ), g( nmax )
1438 INTEGER IDIM( nidim )
1440 DOUBLE PRECISION ALPHA, ALS, BETA, BETS, ERR, ERRMAX
1441 INTEGER I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, K, KS,
1442 $ laa, lcc, lda, ldas, ldc, ldcs, lj, ma, n, na,
1444 LOGICAL NULL, RESET, SAME, TRAN, UPPER
1445 CHARACTER*1 TRANS, TRANSS, UPLO, UPLOS
1452 EXTERNAL lde, lderes
1458 INTEGER INFOT, NOUTC
1461 COMMON /infoc/infot, noutc, ok
1463 DATA icht/
'NTC'/, ichu/
'UL'/
1471 DO 100 in = 1, nidim
1487 trans = icht( ict: ict )
1488 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
1507 CALL dmake(
'GE',
' ',
' ', ma, na, a, nmax, aa, lda,
1511 uplo = ichu( icu: icu )
1522 CALL dmake(
'SY', uplo,
' ', n, n, c, nmax, cc,
1523 $ ldc, reset, zero )
1547 $
CALL dprcn4( ntra, nc, sname, iorder, uplo,
1548 $ trans, n, k, alpha, lda, beta, ldc)
1551 CALL cdsyrk( iorder, uplo, trans, n, k, alpha,
1552 $ aa, lda, beta, cc, ldc )
1557 WRITE( nout, fmt = 9993 )
1564 isame( 1 ) = uplos.EQ.uplo
1565 isame( 2 ) = transs.EQ.trans
1566 isame( 3 ) = ns.EQ.n
1567 isame( 4 ) = ks.EQ.k
1568 isame( 5 ) = als.EQ.alpha
1569 isame( 6 ) = lde( as, aa, laa )
1570 isame( 7 ) = ldas.EQ.lda
1571 isame( 8 ) = bets.EQ.beta
1573 isame( 9 ) = lde( cs, cc, lcc )
1575 isame( 9 ) = lderes(
'SY', uplo, n, n, cs,
1578 isame( 10 ) = ldcs.EQ.ldc
1585 same = same.AND.isame( i )
1586 IF( .NOT.isame( i ) )
1587 $
WRITE( nout, fmt = 9998 )i
1608 CALL dmmch(
'T',
'N', lj, 1, k, alpha,
1610 $ a( 1, j ), nmax, beta,
1611 $ c( jj, j ), nmax, ct, g,
1612 $ cc( jc ), ldc, eps, err,
1613 $ fatal, nout, .true. )
1615 CALL dmmch(
'N',
'T', lj, 1, k, alpha,
1617 $ a( j, 1 ), nmax, beta,
1618 $ c( jj, j ), nmax, ct, g,
1619 $ cc( jc ), ldc, eps, err,
1620 $ fatal, nout, .true. )
1627 errmax = max( errmax, err )
1649 IF( errmax.LT.thresh )
THEN
1650 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
1651 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
1653 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
1654 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
1660 $
WRITE( nout, fmt = 9995 )j
1663 WRITE( nout, fmt = 9996 )sname
1664 CALL dprcn4( nout, nc, sname, iorder, uplo, trans, n, k, alpha,
1670 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1671 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1672 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1673 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1674 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1675 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1676 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1677 $
' (', i6,
' CALL',
'S)' )
1678 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1679 $
' (', i6,
' CALL',
'S)' )
1680 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1681 $
'ANGED INCORRECTLY *******' )
1682 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
1683 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
1684 9994
FORMAT( 1x, i6,
': ', a12,
'(', 2(
'''', a1,
''',' ), 2( i3,
',' ),
1685 $ f4.1,
', A,', i3,
',', f4.1,
', C,', i3,
') .' )
1686 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1693 SUBROUTINE dprcn4(NOUT, NC, SNAME, IORDER, UPLO, TRANSA,
1694 $ n, k, alpha, lda, beta, ldc)
1695 INTEGER NOUT, NC, IORDER, N, K, LDA, LDC
1696 DOUBLE PRECISION ALPHA, BETA
1697 CHARACTER*1 UPLO, TRANSA
1699 CHARACTER*14 CRC, CU, CA
1701 IF (uplo.EQ.
'U')
THEN
1706 IF (transa.EQ.
'N')
THEN
1707 ca =
' CblasNoTrans'
1708 ELSE IF (transa.EQ.
'T')
THEN
1711 ca =
'CblasConjTrans'
1713 IF (iorder.EQ.1)
THEN
1714 crc =
' CblasRowMajor'
1716 crc =
' CblasColMajor'
1718 WRITE(nout, fmt = 9995)nc, sname, crc, cu, ca
1719 WRITE(nout, fmt = 9994)n, k, alpha, lda, beta, ldc
1721 9995
FORMAT( 1x, i6,
': ', a12,
'(', 3( a14,
',') )
1722 9994
FORMAT( 20x, 2( i3,
',' ),
1723 $ f4.1,
', A,', i3,
',', f4.1,
', C,', i3,
').' )
1726 SUBROUTINE dchk5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1727 $ fatal, nidim, idim, nalf, alf, nbet, bet, nmax,
1728 $ ab, aa, as, bb, bs, c, cc, cs, ct, g, w,
1742 DOUBLE PRECISION ZERO
1743 parameter ( zero = 0.0d0 )
1745 DOUBLE PRECISION EPS, THRESH
1746 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
1747 LOGICAL FATAL, REWI, TRACE
1750 DOUBLE PRECISION AA( nmax*nmax ), AB( 2*nmax*nmax ),
1751 $ alf( nalf ), as( nmax*nmax ), bb( nmax*nmax ),
1752 $ bet( nbet ), bs( nmax*nmax ), c( nmax, nmax ),
1753 $ cc( nmax*nmax ), cs( nmax*nmax ), ct( nmax ),
1754 $ g( nmax ), w( 2*nmax )
1755 INTEGER IDIM( nidim )
1757 DOUBLE PRECISION ALPHA, ALS, BETA, BETS, ERR, ERRMAX
1758 INTEGER I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, JJAB,
1759 $ k, ks, laa, lbb, lcc, lda, ldas, ldb, ldbs,
1760 $ ldc, ldcs, lj, ma, n, na, nargs, nc, ns
1761 LOGICAL NULL, RESET, SAME, TRAN, UPPER
1762 CHARACTER*1 TRANS, TRANSS, UPLO, UPLOS
1769 EXTERNAL lde, lderes
1775 INTEGER INFOT, NOUTC
1778 COMMON /infoc/infot, noutc, ok
1780 DATA icht/
'NTC'/, ichu/
'UL'/
1788 DO 130 in = 1, nidim
1800 DO 120 ik = 1, nidim
1804 trans = icht( ict: ict )
1805 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
1825 CALL dmake(
'GE',
' ',
' ', ma, na, ab, 2*nmax, aa,
1826 $ lda, reset, zero )
1828 CALL dmake(
'GE',
' ',
' ', ma, na, ab, nmax, aa, lda,
1837 CALL dmake(
'GE',
' ',
' ', ma, na, ab( k + 1 ),
1838 $ 2*nmax, bb, ldb, reset, zero )
1840 CALL dmake(
'GE',
' ',
' ', ma, na, ab( k*nmax + 1 ),
1841 $ nmax, bb, ldb, reset, zero )
1845 uplo = ichu( icu: icu )
1856 CALL dmake(
'SY', uplo,
' ', n, n, c, nmax, cc,
1857 $ ldc, reset, zero )
1885 $
CALL dprcn5( ntra, nc, sname, iorder, uplo,
1886 $ trans, n, k, alpha, lda, ldb, beta, ldc)
1889 CALL cdsyr2k( iorder, uplo, trans, n, k,
1890 $ alpha, aa, lda, bb, ldb, beta,
1896 WRITE( nout, fmt = 9993 )
1903 isame( 1 ) = uplos.EQ.uplo
1904 isame( 2 ) = transs.EQ.trans
1905 isame( 3 ) = ns.EQ.n
1906 isame( 4 ) = ks.EQ.k
1907 isame( 5 ) = als.EQ.alpha
1908 isame( 6 ) = lde( as, aa, laa )
1909 isame( 7 ) = ldas.EQ.lda
1910 isame( 8 ) = lde( bs, bb, lbb )
1911 isame( 9 ) = ldbs.EQ.ldb
1912 isame( 10 ) = bets.EQ.beta
1914 isame( 11 ) = lde( cs, cc, lcc )
1916 isame( 11 ) = lderes(
'SY', uplo, n, n, cs,
1919 isame( 12 ) = ldcs.EQ.ldc
1926 same = same.AND.isame( i )
1927 IF( .NOT.isame( i ) )
1928 $
WRITE( nout, fmt = 9998 )i
1951 w( i ) = ab( ( j - 1 )*2*nmax + k +
1953 w( k + i ) = ab( ( j - 1 )*2*nmax +
1956 CALL dmmch(
'T',
'N', lj, 1, 2*k,
1957 $ alpha, ab( jjab ), 2*nmax,
1959 $ c( jj, j ), nmax, ct, g,
1960 $ cc( jc ), ldc, eps, err,
1961 $ fatal, nout, .true. )
1964 w( i ) = ab( ( k + i - 1 )*nmax +
1966 w( k + i ) = ab( ( i - 1 )*nmax +
1969 CALL dmmch(
'N',
'N', lj, 1, 2*k,
1970 $ alpha, ab( jj ), nmax, w,
1971 $ 2*nmax, beta, c( jj, j ),
1972 $ nmax, ct, g, cc( jc ), ldc,
1973 $ eps, err, fatal, nout,
1981 $ jjab = jjab + 2*nmax
1983 errmax = max( errmax, err )
2005 IF( errmax.LT.thresh )
THEN
2006 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
2007 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
2009 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
2010 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
2016 $
WRITE( nout, fmt = 9995 )j
2019 WRITE( nout, fmt = 9996 )sname
2020 CALL dprcn5( nout, nc, sname, iorder, uplo, trans, n, k, alpha,
2021 $ lda, ldb, beta, ldc)
2026 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
2027 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2028 $
'RATIO ', f8.2,
' - SUSPECT *******' )
2029 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
2030 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2031 $
'RATIO ', f8.2,
' - SUSPECT *******' )
2032 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
2033 $
' (', i6,
' CALL',
'S)' )
2034 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
2035 $
' (', i6,
' CALL',
'S)' )
2036 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2037 $
'ANGED INCORRECTLY *******' )
2038 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
2039 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2040 9994
FORMAT( 1x, i6,
': ', a12,
'(', 2(
'''', a1,
''',' ), 2( i3,
',' ),
2041 $ f4.1,
', A,', i3,
', B,', i3,
',', f4.1,
', C,', i3,
') ',
2043 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2050 SUBROUTINE dprcn5(NOUT, NC, SNAME, IORDER, UPLO, TRANSA,
2051 $ n, k, alpha, lda, ldb, beta, ldc)
2052 INTEGER NOUT, NC, IORDER, N, K, LDA, LDB, LDC
2053 DOUBLE PRECISION ALPHA, BETA
2054 CHARACTER*1 UPLO, TRANSA
2056 CHARACTER*14 CRC, CU, CA
2058 IF (uplo.EQ.
'U')
THEN
2063 IF (transa.EQ.
'N')
THEN
2064 ca =
' CblasNoTrans'
2065 ELSE IF (transa.EQ.
'T')
THEN
2068 ca =
'CblasConjTrans'
2070 IF (iorder.EQ.1)
THEN
2071 crc =
' CblasRowMajor'
2073 crc =
' CblasColMajor'
2075 WRITE(nout, fmt = 9995)nc, sname, crc, cu, ca
2076 WRITE(nout, fmt = 9994)n, k, alpha, lda, ldb, beta, ldc
2078 9995
FORMAT( 1x, i6,
': ', a12,
'(', 3( a14,
',') )
2079 9994
FORMAT( 20x, 2( i3,
',' ),
2080 $ f4.1,
', A,', i3,
', B', i3,
',', f4.1,
', C,', i3,
').' )
2083 SUBROUTINE dmake( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, RESET,
2101 DOUBLE PRECISION ZERO, ONE
2102 parameter ( zero = 0.0d0, one = 1.0d0 )
2103 DOUBLE PRECISION ROGUE
2104 parameter ( rogue = -1.0d10 )
2106 DOUBLE PRECISION TRANSL
2107 INTEGER LDA, M, N, NMAX
2109 CHARACTER*1 DIAG, UPLO
2112 DOUBLE PRECISION A( nmax, * ), AA( * )
2114 INTEGER I, IBEG, IEND, J
2115 LOGICAL GEN, LOWER, SYM, TRI, UNIT, UPPER
2117 DOUBLE PRECISION DBEG
2123 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2124 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2125 unit = tri.AND.diag.EQ.
'U'
2131 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2133 a( i, j ) = dbeg( reset ) + transl
2136 IF( n.GT.3.AND.j.EQ.n/2 )
2139 a( j, i ) = a( i, j )
2147 $ a( j, j ) = a( j, j ) + one
2154 IF( type.EQ.
'GE' )
THEN
2157 aa( i + ( j - 1 )*lda ) = a( i, j )
2159 DO 40 i = m + 1, lda
2160 aa( i + ( j - 1 )*lda ) = rogue
2163 ELSE IF( type.EQ.
'SY'.OR.type.EQ.
'TR' )
THEN
2180 DO 60 i = 1, ibeg - 1
2181 aa( i + ( j - 1 )*lda ) = rogue
2183 DO 70 i = ibeg, iend
2184 aa( i + ( j - 1 )*lda ) = a( i, j )
2186 DO 80 i = iend + 1, lda
2187 aa( i + ( j - 1 )*lda ) = rogue
2196 SUBROUTINE dmmch( TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB,
2197 $ beta, c, ldc, ct, g, cc, ldcc, eps, err, fatal,
2211 DOUBLE PRECISION ZERO, ONE
2212 parameter ( zero = 0.0d0, one = 1.0d0 )
2214 DOUBLE PRECISION ALPHA, BETA, EPS, ERR
2215 INTEGER KK, LDA, LDB, LDC, LDCC, M, N, NOUT
2217 CHARACTER*1 TRANSA, TRANSB
2219 DOUBLE PRECISION A( lda, * ), B( ldb, * ), C( ldc, * ),
2220 $ cc( ldcc, * ), ct( * ), g( * )
2222 DOUBLE PRECISION ERRI
2224 LOGICAL TRANA, TRANB
2226 INTRINSIC abs, max, sqrt
2228 trana = transa.EQ.
'T'.OR.transa.EQ.
'C'
2229 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
2241 IF( .NOT.trana.AND..NOT.tranb )
THEN
2244 ct( i ) = ct( i ) + a( i, k )*b( k, j )
2245 g( i ) = g( i ) + abs( a( i, k ) )*abs( b( k, j ) )
2248 ELSE IF( trana.AND..NOT.tranb )
THEN
2251 ct( i ) = ct( i ) + a( k, i )*b( k, j )
2252 g( i ) = g( i ) + abs( a( k, i ) )*abs( b( k, j ) )
2255 ELSE IF( .NOT.trana.AND.tranb )
THEN
2258 ct( i ) = ct( i ) + a( i, k )*b( j, k )
2259 g( i ) = g( i ) + abs( a( i, k ) )*abs( b( j, k ) )
2262 ELSE IF( trana.AND.tranb )
THEN
2265 ct( i ) = ct( i ) + a( k, i )*b( j, k )
2266 g( i ) = g( i ) + abs( a( k, i ) )*abs( b( j, k ) )
2271 ct( i ) = alpha*ct( i ) + beta*c( i, j )
2272 g( i ) = abs( alpha )*g( i ) + abs( beta )*abs( c( i, j ) )
2279 erri = abs( ct( i ) - cc( i, j ) )/eps
2280 IF( g( i ).NE.zero )
2281 $ erri = erri/g( i )
2282 err = max( err, erri )
2283 IF( err*sqrt( eps ).GE.one )
2295 WRITE( nout, fmt = 9999 )
2298 WRITE( nout, fmt = 9998 )i, ct( i ), cc( i, j )
2300 WRITE( nout, fmt = 9998 )i, cc( i, j ), ct( i )
2304 $
WRITE( nout, fmt = 9997 )j
2309 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2310 $
'F ACCURATE *******', /
' EXPECTED RESULT COMPU',
2312 9998
FORMAT( 1x, i7, 2g18.6 )
2313 9997
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2318 LOGICAL FUNCTION lde( RI, RJ, LR )
2333 DOUBLE PRECISION RI( * ), RJ( * )
2338 IF( ri( i ).NE.rj( i ) )
2350 LOGICAL FUNCTION lderes( TYPE, UPLO, M, N, AA, AS, LDA )
2369 DOUBLE PRECISION AA( lda, * ), AS( lda, * )
2371 INTEGER I, IBEG, IEND, J
2375 IF( type.EQ.
'GE' )
THEN
2377 DO 10 i = m + 1, lda
2378 IF( aa( i, j ).NE.as( i, j ) )
2382 ELSE IF( type.EQ.
'SY' )
THEN
2391 DO 30 i = 1, ibeg - 1
2392 IF( aa( i, j ).NE.as( i, j ) )
2395 DO 40 i = iend + 1, lda
2396 IF( aa( i, j ).NE.as( i, j ) )
2412 DOUBLE PRECISION FUNCTION dbeg( RESET )
2447 i = i - 1000*( i/1000 )
2452 dbeg = ( i - 500 )/1001.0d0
2458 DOUBLE PRECISION FUNCTION ddiff( X, Y )
2469 DOUBLE PRECISION X, Y
subroutine dprcn1(NOUT, NC, SNAME, IORDER, TRANSA, TRANSB, M, N, K, ALPHA, LDA, LDB, BETA, LDC)
subroutine dprcn2(NOUT, NC, SNAME, IORDER, SIDE, UPLO, M, N, ALPHA, LDA, LDB, BETA, LDC)
subroutine dchk4(SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G, Z)
subroutine dchk3(SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI, FATAL, NIDIM, IDIM, NKB, KB, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX, XS, XT, G, Z)
subroutine dchk1(SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G)
subroutine dmake(TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL, KU, RESET, TRANSL)
subroutine dmmch(TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB, BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL, NOUT, MV)
logical function lde(RI, RJ, LR)
double precision function ddiff(X, Y)
subroutine dprcn3(NOUT, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, LDA, LDB)
subroutine dchk5(SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G, Z)
subroutine dchk2(SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G)
double precision function dbeg(RESET)
subroutine dprcn5(NOUT, NC, SNAME, IORDER, UPLO, TRANSA, N, K, ALPHA, LDA, LDB, BETA, LDC)
subroutine dprcn4(NOUT, NC, SNAME, IORDER, UPLO, TRANSA, N, K, ALPHA, LDA, BETA, LDC)
logical function lderes(TYPE, UPLO, M, N, AA, AS, LDA)