3 * Test program for the REAL Level 3 Blas.
5 * The program must be driven by a short data file. The first 13 records
6 * of the file are read using list-directed input, the last 6 records
7 * are read using the format ( A12, L2 ). An annotated example of a data
8 * file can be obtained by deleting the first 3 characters from the
10 * 'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
11 * -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
12 * F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
13 * F LOGICAL FLAG, T TO STOP ON FAILURES.
14 * T LOGICAL FLAG, T TO TEST ERROR EXITS.
15 * 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
16 * 16.0 THRESHOLD VALUE OF TEST RATIO
17 * 6 NUMBER OF VALUES OF N
18 * 0 1 2 3 5 9 VALUES OF N
19 * 3 NUMBER OF VALUES OF ALPHA
20 * 0.0 1.0 0.7 VALUES OF ALPHA
21 * 3 NUMBER OF VALUES OF BETA
22 * 0.0 1.0 1.3 VALUES OF BETA
23 * cblas_sgemm T PUT F FOR NO TEST. SAME COLUMNS.
24 * cblas_ssymm T PUT F FOR NO TEST. SAME COLUMNS.
25 * cblas_strmm T PUT F FOR NO TEST. SAME COLUMNS.
26 * cblas_strsm T PUT F FOR NO TEST. SAME COLUMNS.
27 * cblas_ssyrk T PUT F FOR NO TEST. SAME COLUMNS.
28 * cblas_ssyr2k T PUT F FOR NO TEST. SAME COLUMNS.
32 * Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
33 * A Set of Level 3 Basic Linear Algebra Subprograms.
35 * Technical Memorandum No.88 (Revision 1), Mathematics and
36 * Computer Science Division, Argonne National Laboratory, 9700
37 * South Cass Avenue, Argonne, Illinois 60439, US.
39 * -- Written on 8-February-1989.
40 * Jack Dongarra, Argonne National Laboratory.
41 * Iain Duff, AERE Harwell.
42 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
43 * Sven Hammarling, Numerical Algorithms Group Ltd.
47 PARAMETER ( NIN = 5, NOUT = 6 )
49 PARAMETER ( NSUBS = 6 )
51 PARAMETER ( ZERO = 0.0, HALF = 0.5, ONE = 1.0 )
53 PARAMETER ( NMAX = 65 )
54 INTEGER NIDMAX, NALMAX, NBEMAX
55 PARAMETER ( NIDMAX = 9, NALMAX = 7, NBEMAX = 7 )
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 REAL 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 )
75 * .. External Functions ..
79 * .. External Subroutines ..
80 EXTERNAL SCHK1, SCHK2, SCHK3, SCHK4, SCHK5, CS3CHKE,
82 * .. Intrinsic Functions ..
84 * .. Scalars in Common ..
89 COMMON /INFOC/INFOT, NOUTC, OK
91 * .. Data statements ..
92 DATA SNAMES/'cblas_sgemm ', 'cblas_ssymm ',
93 $ 'cblas_strmm ', 'cblas_strsm ','cblas_ssyrk ',
95 * .. Executable Statements ..
98 * Read name and unit number for summary output file and open file.
100 READ( NIN, FMT = * )SNAPS
101 READ( NIN, FMT = * )NTRA
104 * OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' )
105 OPEN( NTRA, FILE = SNAPS )
107 * Read the flag that directs rewinding of the snapshot file.
108 READ( NIN, FMT = * )REWI
109 REWI = REWI.AND.TRACE
110 * Read the flag that directs stopping on any failure.
111 READ( NIN, FMT = * )SFATAL
112 * Read the flag that indicates whether error exits are to be tested.
113 READ( NIN, FMT = * )TSTERR
114 * Read the flag that indicates whether row-major data layout to be tested.
115 READ( NIN, FMT = * )LAYOUT
116 * Read the threshold value of the test ratio
117 READ( NIN, FMT = * )THRESH
119 * Read and check the parameter values for the tests.
122 READ( NIN, FMT = * )NIDIM
123 IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN
124 WRITE( NOUT, FMT = 9997 )'N', NIDMAX
127 READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )
129 IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN
130 WRITE( NOUT, FMT = 9996 )NMAX
135 READ( NIN, FMT = * )NALF
136 IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN
137 WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX
140 READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )
142 READ( NIN, FMT = * )NBET
143 IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN
144 WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX
147 READ( NIN, FMT = * )( BET( I ), I = 1, NBET )
149 * Report values of parameters.
151 WRITE( NOUT, FMT = 9995 )
152 WRITE( NOUT, FMT = 9994 )( IDIM( I ), I = 1, NIDIM )
153 WRITE( NOUT, FMT = 9993 )( ALF( I ), I = 1, NALF )
154 WRITE( NOUT, FMT = 9992 )( BET( I ), I = 1, NBET )
155 IF( .NOT.TSTERR )THEN
156 WRITE( NOUT, FMT = * )
157 WRITE( NOUT, FMT = 9984 )
159 WRITE( NOUT, FMT = * )
160 WRITE( NOUT, FMT = 9999 )THRESH
161 WRITE( NOUT, FMT = * )
165 IF (LAYOUT.EQ.2) THEN
168 WRITE( *, FMT = 10002 )
169 ELSE IF (LAYOUT.EQ.1) THEN
171 WRITE( *, FMT = 10001 )
172 ELSE IF (LAYOUT.EQ.0) THEN
174 WRITE( *, FMT = 10000 )
179 * Read names of subroutines and flags which indicate
180 * whether they are to be tested.
185 30 READ( NIN, FMT = 9988, END = 60 )SNAMET, LTESTT
187 IF( SNAMET.EQ.SNAMES( I ) )
190 WRITE( NOUT, FMT = 9990 )SNAMET
192 50 LTEST( I ) = LTESTT
198 * Compute EPS (the machine precision).
202 IF( SDIFF( ONE + EPS, ONE ).EQ.ZERO )
208 WRITE( NOUT, FMT = 9998 )EPS
210 * Check the reliability of SMMCH using exact data.
215 AB( I, J ) = MAX( I - J + 1, 0 )
217 AB( J, NMAX + 1 ) = J
218 AB( 1, NMAX + J ) = J
222 CC( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3
224 * CC holds the exact result. On exit from SMMCH CT holds
225 * the result computed by SMMCH.
228 CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
229 $ AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,
230 $ NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )
231 SAME = LSE( CC, CT, N )
232 IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
233 WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
237 CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
238 $ AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,
239 $ NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )
240 SAME = LSE( CC, CT, N )
241 IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
242 WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
246 AB( J, NMAX + 1 ) = N - J + 1
247 AB( 1, NMAX + J ) = N - J + 1
250 CC( N - J + 1 ) = J*( ( J + 1 )*J )/2 -
251 $ ( ( J + 1 )*J*( J - 1 ) )/3
255 CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
256 $ AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,
257 $ NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )
258 SAME = LSE( CC, CT, N )
259 IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
260 WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
264 CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
265 $ AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,
266 $ NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )
267 SAME = LSE( CC, CT, N )
268 IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
269 WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
273 * Test each subroutine in turn.
275 DO 200 ISNUM = 1, NSUBS
276 WRITE( NOUT, FMT = * )
277 IF( .NOT.LTEST( ISNUM ) )THEN
278 * Subprogram is not to be tested.
279 WRITE( NOUT, FMT = 9987 )SNAMES( ISNUM )
281 SRNAMT = SNAMES( ISNUM )
284 CALL CS3CHKE( SNAMES( ISNUM ) )
285 WRITE( NOUT, FMT = * )
291 GO TO ( 140, 150, 160, 160, 170, 180 )ISNUM
294 CALL SCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
295 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
296 $ NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
300 CALL SCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
301 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
302 $ NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
308 CALL SCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
309 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
310 $ NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
314 CALL SCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
315 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
316 $ NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
320 * Test STRMM, 03, STRSM, 04.
322 CALL SCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
323 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NMAX, AB,
324 $ AA, AS, AB( 1, NMAX + 1 ), BB, BS, CT, G, C,
328 CALL SCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
329 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NMAX, AB,
330 $ AA, AS, AB( 1, NMAX + 1 ), BB, BS, CT, G, C,
336 CALL SCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
337 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
338 $ NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
342 CALL SCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
343 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
344 $ NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
350 CALL SCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
351 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
352 $ NMAX, AB, AA, AS, BB, BS, C, CC, CS, CT, G, W,
356 CALL SCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
357 $ REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
358 $ NMAX, AB, AA, AS, BB, BS, C, CC, CS, CT, G, W,
363 190 IF( FATAL.AND.SFATAL )
367 WRITE( NOUT, FMT = 9986 )
371 WRITE( NOUT, FMT = 9985 )
375 WRITE( NOUT, FMT = 9991 )
383 10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
384 10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
385 10000 FORMAT( ' COLUMN-MAJOR DATA LAYOUT IS TESTED' )
386 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',
388 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, E9.1 )
389 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',
391 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )
392 9995 FORMAT( ' TESTS OF THE REAL LEVEL 3 BLAS', //' THE F',
393 $ 'OLLOWING PARAMETER VALUES WILL BE USED:' )
394 9994 FORMAT( ' FOR N ', 9I6 )
395 9993 FORMAT( ' FOR ALPHA ', 7F6.1 )
396 9992 FORMAT( ' FOR BETA ', 7F6.1 )
397 9991 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',
398 $ /' ******* TESTS ABANDONED *******' )
399 9990 FORMAT( ' SUBPROGRAM NAME ', A12,' NOT RECOGNIZED', /' ******* ',
400 $ 'TESTS ABANDONED *******' )
401 9989 FORMAT( ' ERROR IN SMMCH - IN-LINE DOT PRODUCTS ARE BEING EVALU',
402 $ 'ATED WRONGLY.', /' SMMCH WAS CALLED WITH TRANSA = ', A1,
403 $ ' AND TRANSB = ', A1, /' AND RETURNED SAME = ', L1, ' AND ',
404 $ 'ERR = ', F12.3, '.', /' THIS MAY BE DUE TO FAULTS IN THE ',
405 $ 'ARITHMETIC OR THE COMPILER.', /' ******* TESTS ABANDONED ',
407 9988 FORMAT( A12,L2 )
408 9987 FORMAT( 1X, A12,' WAS NOT TESTED' )
409 9986 FORMAT( /' END OF TESTS' )
410 9985 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )
411 9984 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )
416 SUBROUTINE SCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
417 $ FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
418 $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G,
423 * Auxiliary routine for test program for Level 3 Blas.
425 * -- Written on 8-February-1989.
426 * Jack Dongarra, Argonne National Laboratory.
427 * Iain Duff, AERE Harwell.
428 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
429 * Sven Hammarling, Numerical Algorithms Group Ltd.
433 PARAMETER ( ZERO = 0.0 )
434 * .. Scalar Arguments ..
436 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
437 LOGICAL FATAL, REWI, TRACE
439 * .. Array Arguments ..
440 REAL 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 )
446 * .. Local Scalars ..
447 REAL 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
456 * .. External Functions ..
459 * .. External Subroutines ..
460 EXTERNAL CSGEMM, SMAKE, SMMCH
461 * .. Intrinsic Functions ..
463 * .. Scalars in Common ..
466 * .. Common blocks ..
467 COMMON /INFOC/INFOT, NOUTC, OK
468 * .. Data statements ..
470 * .. Executable Statements ..
482 * Set LDC to 1 more than minimum value if room.
486 * Skip tests if not enough room.
490 NULL = N.LE.0.OR.M.LE.0
496 TRANSA = ICH( ICA: ICA )
497 TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'
506 * Set LDA to 1 more than minimum value if room.
510 * Skip tests if not enough room.
515 * Generate the matrix A.
517 CALL SMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,
521 TRANSB = ICH( ICB: ICB )
522 TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'
531 * Set LDB to 1 more than minimum value if room.
535 * Skip tests if not enough room.
540 * Generate the matrix B.
542 CALL SMAKE( 'GE', ' ', ' ', MB, NB, B, NMAX, BB,
551 * Generate the matrix C.
553 CALL SMAKE( 'GE', ' ', ' ', M, N, C, NMAX,
554 $ CC, LDC, RESET, ZERO )
558 * Save every datum before calling the
581 * Call the subroutine.
584 $ CALL SPRCN1(NTRA, NC, SNAME, IORDER,
585 $ TRANSA, TRANSB, M, N, K, ALPHA, LDA,
589 CALL CSGEMM( IORDER, TRANSA, TRANSB, M, N,
590 $ K, ALPHA, AA, LDA, BB, LDB,
593 * Check if error-exit was taken incorrectly.
596 WRITE( NOUT, FMT = 9994 )
601 * See what data changed inside subroutines.
603 ISAME( 1 ) = TRANSA.EQ.TRANAS
604 ISAME( 2 ) = TRANSB.EQ.TRANBS
608 ISAME( 6 ) = ALS.EQ.ALPHA
609 ISAME( 7 ) = LSE( AS, AA, LAA )
610 ISAME( 8 ) = LDAS.EQ.LDA
611 ISAME( 9 ) = LSE( BS, BB, LBB )
612 ISAME( 10 ) = LDBS.EQ.LDB
613 ISAME( 11 ) = BLS.EQ.BETA
615 ISAME( 12 ) = LSE( CS, CC, LCC )
617 ISAME( 12 ) = LSERES( 'GE', ' ', M, N, CS,
620 ISAME( 13 ) = LDCS.EQ.LDC
622 * If data was incorrectly changed, report
627 SAME = SAME.AND.ISAME( I )
628 IF( .NOT.ISAME( I ) )
629 $ WRITE( NOUT, FMT = 9998 )I+1
640 CALL SMMCH( 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 )
645 * If got really bad answer, report and
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 SPRCN1(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 *',
709 SUBROUTINE SPRCN1(NOUT, NC, SNAME, IORDER, TRANSA, TRANSB, M, N,
710 $ K, ALPHA, LDA, LDB, BETA, LDC)
711 INTEGER NOUT, NC, IORDER, M, N, K, LDA, LDB, LDC
713 CHARACTER*1 TRANSA, TRANSB
715 CHARACTER*14 CRC, CTA,CTB
717 IF (TRANSA.EQ.'N')THEN
718 CTA = ' CblasNoTrans'
719 ELSE IF (TRANSA.EQ.'T')THEN
722 CTA = 'CblasConjTrans'
724 IF (TRANSB.EQ.'N')THEN
725 CTB = ' CblasNoTrans'
726 ELSE IF (TRANSB.EQ.'T')THEN
729 CTB = 'CblasConjTrans'
732 CRC = ' CblasRowMajor'
734 CRC = ' CblasColMajor'
736 WRITE(NOUT, FMT = 9995)NC,SNAME,CRC, CTA,CTB
737 WRITE(NOUT, FMT = 9994)M, N, K, ALPHA, LDA, LDB, BETA, LDC
739 9995 FORMAT( 1X, I6, ': ', A12,'(', A14, ',', A14, ',', A14, ',')
740 9994 FORMAT( 20X, 3( I3, ',' ), F4.1, ', A,', I3, ', B,', I3, ',',
741 $ F4.1, ', ', 'C,', I3, ').' )
744 SUBROUTINE SCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
745 $ FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
746 $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G,
751 * Auxiliary routine for test program for Level 3 Blas.
753 * -- Written on 8-February-1989.
754 * Jack Dongarra, Argonne National Laboratory.
755 * Iain Duff, AERE Harwell.
756 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
757 * Sven Hammarling, Numerical Algorithms Group Ltd.
761 PARAMETER ( ZERO = 0.0 )
762 * .. Scalar Arguments ..
764 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
765 LOGICAL FATAL, REWI, TRACE
767 * .. Array Arguments ..
768 REAL A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
769 $ AS( NMAX*NMAX ), B( NMAX, NMAX ),
770 $ BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),
771 $ C( NMAX, NMAX ), CC( NMAX*NMAX ),
772 $ CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )
773 INTEGER IDIM( NIDIM )
774 * .. Local Scalars ..
775 REAL ALPHA, ALS, BETA, BLS, ERR, ERRMAX
776 INTEGER I, IA, IB, ICS, ICU, IM, IN, LAA, LBB, LCC,
777 $ LDA, LDAS, LDB, LDBS, LDC, LDCS, M, MS, N, NA,
779 LOGICAL LEFT, NULL, RESET, SAME
780 CHARACTER*1 SIDE, SIDES, UPLO, UPLOS
781 CHARACTER*2 ICHS, ICHU
784 * .. External Functions ..
787 * .. External Subroutines ..
788 EXTERNAL SMAKE, SMMCH, CSSYMM
789 * .. Intrinsic Functions ..
791 * .. Scalars in Common ..
794 * .. Common blocks ..
795 COMMON /INFOC/INFOT, NOUTC, OK
796 * .. Data statements ..
797 DATA ICHS/'LR'/, ICHU/'UL'/
798 * .. Executable Statements ..
810 * Set LDC to 1 more than minimum value if room.
814 * Skip tests if not enough room.
818 NULL = N.LE.0.OR.M.LE.0
820 * Set LDB to 1 more than minimum value if room.
824 * Skip tests if not enough room.
829 * Generate the matrix B.
831 CALL SMAKE( 'GE', ' ', ' ', M, N, B, NMAX, BB, LDB, RESET,
835 SIDE = ICHS( ICS: ICS )
843 * Set LDA to 1 more than minimum value if room.
847 * Skip tests if not enough room.
853 UPLO = ICHU( ICU: ICU )
855 * Generate the symmetric matrix A.
857 CALL SMAKE( 'SY', UPLO, ' ', NA, NA, A, NMAX, AA, LDA,
866 * Generate the matrix C.
868 CALL SMAKE( 'GE', ' ', ' ', M, N, C, NMAX, CC,
873 * Save every datum before calling the
895 * Call the subroutine.
898 $ CALL SPRCN2(NTRA, NC, SNAME, IORDER,
899 $ SIDE, UPLO, M, N, ALPHA, LDA, LDB,
903 CALL CSSYMM( IORDER, SIDE, UPLO, M, N, ALPHA,
904 $ AA, LDA, BB, LDB, BETA, CC, LDC )
906 * Check if error-exit was taken incorrectly.
909 WRITE( NOUT, FMT = 9994 )
914 * See what data changed inside subroutines.
916 ISAME( 1 ) = SIDES.EQ.SIDE
917 ISAME( 2 ) = UPLOS.EQ.UPLO
920 ISAME( 5 ) = ALS.EQ.ALPHA
921 ISAME( 6 ) = LSE( AS, AA, LAA )
922 ISAME( 7 ) = LDAS.EQ.LDA
923 ISAME( 8 ) = LSE( BS, BB, LBB )
924 ISAME( 9 ) = LDBS.EQ.LDB
925 ISAME( 10 ) = BLS.EQ.BETA
927 ISAME( 11 ) = LSE( CS, CC, LCC )
929 ISAME( 11 ) = LSERES( 'GE', ' ', M, N, CS,
932 ISAME( 12 ) = LDCS.EQ.LDC
934 * If data was incorrectly changed, report and
939 SAME = SAME.AND.ISAME( I )
940 IF( .NOT.ISAME( I ) )
941 $ WRITE( NOUT, FMT = 9998 )I+1
953 CALL SMMCH( 'N', 'N', M, N, M, ALPHA, A,
954 $ NMAX, B, NMAX, BETA, C, NMAX,
955 $ CT, G, CC, LDC, EPS, ERR,
956 $ FATAL, NOUT, .TRUE. )
958 CALL SMMCH( 'N', 'N', M, N, N, ALPHA, B,
959 $ NMAX, A, NMAX, BETA, C, NMAX,
960 $ CT, G, CC, LDC, EPS, ERR,
961 $ FATAL, NOUT, .TRUE. )
963 ERRMAX = MAX( ERRMAX, ERR )
964 * If got really bad answer, report and
984 IF( ERRMAX.LT.THRESH )THEN
985 IF ( IORDER.EQ.0) WRITE( NOUT, FMT = 10000 )SNAME, NC
986 IF ( IORDER.EQ.1) WRITE( NOUT, FMT = 10001 )SNAME, NC
988 IF ( IORDER.EQ.0) WRITE( NOUT, FMT = 10002 )SNAME, NC, ERRMAX
989 IF ( IORDER.EQ.1) WRITE( NOUT, FMT = 10003 )SNAME, NC, ERRMAX
994 WRITE( NOUT, FMT = 9996 )SNAME
995 CALL SPRCN2(NOUT, NC, SNAME, IORDER, SIDE, UPLO, M, N, ALPHA, LDA,
1001 10003 FORMAT( ' ', A12,' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1002 $ 'TESTS (', I6, ' CALLS)', /' ******* BUT WITH MAXIMUM TEST ',
1003 $ 'RATIO ', F8.2, ' - SUSPECT *******' )
1004 10002 FORMAT( ' ', A12,' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1005 $ 'TESTS (', I6, ' CALLS)', /' ******* BUT WITH MAXIMUM TEST ',
1006 $ 'RATIO ', F8.2, ' - SUSPECT *******' )
1007 10001 FORMAT( ' ', A12,' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1008 $ ' (', I6, ' CALL', 'S)' )
1009 10000 FORMAT( ' ', A12,' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1010 $ ' (', I6, ' CALL', 'S)' )
1011 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
1012 $ 'ANGED INCORRECTLY *******' )
1013 9996 FORMAT( ' ******* ', A12,' FAILED ON CALL NUMBER:' )
1014 9995 FORMAT( 1X, I6, ': ', A12,'(', 2( '''', A1, ''',' ), 2( I3, ',' ),
1015 $ F4.1, ', A,', I3, ', B,', I3, ',', F4.1, ', C,', I3, ') ',
1017 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1024 SUBROUTINE SPRCN2(NOUT, NC, SNAME, IORDER, SIDE, UPLO, M, N,
1025 $ ALPHA, LDA, LDB, BETA, LDC)
1026 INTEGER NOUT, NC, IORDER, M, N, LDA, LDB, LDC
1028 CHARACTER*1 SIDE, UPLO
1030 CHARACTER*14 CRC, CS,CU
1032 IF (SIDE.EQ.'L')THEN
1037 IF (UPLO.EQ.'U')THEN
1042 IF (IORDER.EQ.1)THEN
1043 CRC = ' CblasRowMajor'
1045 CRC = ' CblasColMajor'
1047 WRITE(NOUT, FMT = 9995)NC,SNAME,CRC, CS,CU
1048 WRITE(NOUT, FMT = 9994)M, N, ALPHA, LDA, LDB, BETA, LDC
1050 9995 FORMAT( 1X, I6, ': ', A12,'(', A14, ',', A14, ',', A14, ',')
1051 9994 FORMAT( 20X, 2( I3, ',' ), F4.1, ', A,', I3, ', B,', I3, ',',
1052 $ F4.1, ', ', 'C,', I3, ').' )
1055 SUBROUTINE SCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1056 $ FATAL, NIDIM, IDIM, NALF, ALF, NMAX, A, AA, AS,
1057 $ B, BB, BS, CT, G, C, IORDER )
1059 * Tests STRMM and STRSM.
1061 * Auxiliary routine for test program for Level 3 Blas.
1063 * -- Written on 8-February-1989.
1064 * Jack Dongarra, Argonne National Laboratory.
1065 * Iain Duff, AERE Harwell.
1066 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
1067 * Sven Hammarling, Numerical Algorithms Group Ltd.
1071 PARAMETER ( ZERO = 0.0, ONE = 1.0 )
1072 * .. Scalar Arguments ..
1074 INTEGER NALF, NIDIM, NMAX, NOUT, NTRA, IORDER
1075 LOGICAL FATAL, REWI, TRACE
1077 * .. Array Arguments ..
1078 REAL A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
1079 $ AS( NMAX*NMAX ), B( NMAX, NMAX ),
1080 $ BB( NMAX*NMAX ), BS( NMAX*NMAX ),
1081 $ C( NMAX, NMAX ), CT( NMAX ), G( NMAX )
1082 INTEGER IDIM( NIDIM )
1083 * .. Local Scalars ..
1084 REAL ALPHA, ALS, ERR, ERRMAX
1085 INTEGER I, IA, ICD, ICS, ICT, ICU, IM, IN, J, LAA, LBB,
1086 $ LDA, LDAS, LDB, LDBS, M, MS, N, NA, NARGS, NC,
1088 LOGICAL LEFT, NULL, RESET, SAME
1089 CHARACTER*1 DIAG, DIAGS, SIDE, SIDES, TRANAS, TRANSA, UPLO,
1091 CHARACTER*2 ICHD, ICHS, ICHU
1093 * .. Local Arrays ..
1095 * .. External Functions ..
1097 EXTERNAL LSE, LSERES
1098 * .. External Subroutines ..
1099 EXTERNAL SMAKE, SMMCH, CSTRMM, CSTRSM
1100 * .. Intrinsic Functions ..
1102 * .. Scalars in Common ..
1103 INTEGER INFOT, NOUTC
1105 * .. Common blocks ..
1106 COMMON /INFOC/INFOT, NOUTC, OK
1107 * .. Data statements ..
1108 DATA ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/, ICHS/'LR'/
1109 * .. Executable Statements ..
1115 * Set up zero matrix for SMMCH.
1122 DO 140 IM = 1, NIDIM
1125 DO 130 IN = 1, NIDIM
1127 * Set LDB to 1 more than minimum value if room.
1131 * Skip tests if not enough room.
1135 NULL = M.LE.0.OR.N.LE.0
1138 SIDE = ICHS( ICS: ICS )
1145 * Set LDA to 1 more than minimum value if room.
1149 * Skip tests if not enough room.
1155 UPLO = ICHU( ICU: ICU )
1158 TRANSA = ICHT( ICT: ICT )
1161 DIAG = ICHD( ICD: ICD )
1166 * Generate the matrix A.
1168 CALL SMAKE( 'TR', UPLO, DIAG, NA, NA, A,
1169 $ NMAX, AA, LDA, RESET, ZERO )
1171 * Generate the matrix B.
1173 CALL SMAKE( 'GE', ' ', ' ', M, N, B, NMAX,
1174 $ BB, LDB, RESET, ZERO )
1178 * Save every datum before calling the
1197 * Call the subroutine.
1199 IF( SNAME( 10: 11 ).EQ.'mm' )THEN
1201 $ CALL SPRCN3( NTRA, NC, SNAME, IORDER,
1202 $ SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,
1206 CALL CSTRMM( IORDER, SIDE, UPLO, TRANSA,
1207 $ DIAG, M, N, ALPHA, AA, LDA,
1209 ELSE IF( SNAME( 10: 11 ).EQ.'sm' )THEN
1211 $ CALL SPRCN3( NTRA, NC, SNAME, IORDER,
1212 $ SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,
1216 CALL CSTRSM( IORDER, SIDE, UPLO, TRANSA,
1217 $ DIAG, M, N, ALPHA, AA, LDA,
1221 * Check if error-exit was taken incorrectly.
1224 WRITE( NOUT, FMT = 9994 )
1229 * See what data changed inside subroutines.
1231 ISAME( 1 ) = SIDES.EQ.SIDE
1232 ISAME( 2 ) = UPLOS.EQ.UPLO
1233 ISAME( 3 ) = TRANAS.EQ.TRANSA
1234 ISAME( 4 ) = DIAGS.EQ.DIAG
1235 ISAME( 5 ) = MS.EQ.M
1236 ISAME( 6 ) = NS.EQ.N
1237 ISAME( 7 ) = ALS.EQ.ALPHA
1238 ISAME( 8 ) = LSE( AS, AA, LAA )
1239 ISAME( 9 ) = LDAS.EQ.LDA
1241 ISAME( 10 ) = LSE( BS, BB, LBB )
1243 ISAME( 10 ) = LSERES( 'GE', ' ', M, N, BS,
1246 ISAME( 11 ) = LDBS.EQ.LDB
1248 * If data was incorrectly changed, report and
1253 SAME = SAME.AND.ISAME( I )
1254 IF( .NOT.ISAME( I ) )
1255 $ WRITE( NOUT, FMT = 9998 )I+1
1263 IF( SNAME( 10: 11 ).EQ.'mm' )THEN
1268 CALL SMMCH( TRANSA, 'N', M, N, M,
1269 $ ALPHA, A, NMAX, B, NMAX,
1270 $ ZERO, C, NMAX, CT, G,
1271 $ BB, LDB, EPS, ERR,
1272 $ FATAL, NOUT, .TRUE. )
1274 CALL SMMCH( 'N', TRANSA, M, N, N,
1275 $ ALPHA, B, NMAX, A, NMAX,
1276 $ ZERO, C, NMAX, CT, G,
1277 $ BB, LDB, EPS, ERR,
1278 $ FATAL, NOUT, .TRUE. )
1280 ELSE IF( SNAME( 10: 11 ).EQ.'sm' )THEN
1282 * Compute approximation to original
1287 C( I, J ) = BB( I + ( J - 1 )*
1289 BB( I + ( J - 1 )*LDB ) = ALPHA*
1295 CALL SMMCH( TRANSA, 'N', M, N, M,
1296 $ ONE, A, NMAX, C, NMAX,
1297 $ ZERO, B, NMAX, CT, G,
1298 $ BB, LDB, EPS, ERR,
1299 $ FATAL, NOUT, .FALSE. )
1301 CALL SMMCH( 'N', TRANSA, M, N, N,
1302 $ ONE, C, NMAX, A, NMAX,
1303 $ ZERO, B, NMAX, CT, G,
1304 $ BB, LDB, EPS, ERR,
1305 $ FATAL, NOUT, .FALSE. )
1308 ERRMAX = MAX( ERRMAX, ERR )
1309 * If got really bad answer, report and
1331 IF( ERRMAX.LT.THRESH )THEN
1332 IF ( IORDER.EQ.0) WRITE( NOUT, FMT = 10000 )SNAME, NC
1333 IF ( IORDER.EQ.1) WRITE( NOUT, FMT = 10001 )SNAME, NC
1335 IF ( IORDER.EQ.0) WRITE( NOUT, FMT = 10002 )SNAME, NC, ERRMAX
1336 IF ( IORDER.EQ.1) WRITE( NOUT, FMT = 10003 )SNAME, NC, ERRMAX
1341 WRITE( NOUT, FMT = 9996 )SNAME
1342 CALL SPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG,
1343 $ M, N, ALPHA, LDA, LDB)
1348 10003 FORMAT( ' ', A12,' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1349 $ 'TESTS (', I6, ' CALLS)', /' ******* BUT WITH MAXIMUM TEST ',
1350 $ 'RATIO ', F8.2, ' - SUSPECT *******' )
1351 10002 FORMAT( ' ', A12,' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1352 $ 'TESTS (', I6, ' CALLS)', /' ******* BUT WITH MAXIMUM TEST ',
1353 $ 'RATIO ', F8.2, ' - SUSPECT *******' )
1354 10001 FORMAT( ' ', A12,' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1355 $ ' (', I6, ' CALL', 'S)' )
1356 10000 FORMAT( ' ', A12,' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1357 $ ' (', I6, ' CALL', 'S)' )
1358 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
1359 $ 'ANGED INCORRECTLY *******' )
1360 9996 FORMAT( ' ******* ', A12,' FAILED ON CALL NUMBER:' )
1361 9995 FORMAT( 1X, I6, ': ', A12,'(', 4( '''', A1, ''',' ), 2( I3, ',' ),
1362 $ F4.1, ', A,', I3, ', B,', I3, ') .' )
1363 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1370 SUBROUTINE SPRCN3(NOUT, NC, SNAME, IORDER, SIDE, UPLO, TRANSA,
1371 $ DIAG, M, N, ALPHA, LDA, LDB)
1372 INTEGER NOUT, NC, IORDER, M, N, LDA, LDB
1374 CHARACTER*1 SIDE, UPLO, TRANSA, DIAG
1376 CHARACTER*14 CRC, CS, CU, CA, CD
1378 IF (SIDE.EQ.'L')THEN
1383 IF (UPLO.EQ.'U')THEN
1388 IF (TRANSA.EQ.'N')THEN
1389 CA = ' CblasNoTrans'
1390 ELSE IF (TRANSA.EQ.'T')THEN
1393 CA = 'CblasConjTrans'
1395 IF (DIAG.EQ.'N')THEN
1396 CD = ' CblasNonUnit'
1400 IF (IORDER.EQ.1)THEN
1401 CRC = 'CblasRowMajor'
1403 CRC = 'CblasColMajor'
1405 WRITE(NOUT, FMT = 9995)NC,SNAME,CRC, CS,CU
1406 WRITE(NOUT, FMT = 9994)CA, CD, M, N, ALPHA, LDA, LDB
1408 9995 FORMAT( 1X, I6, ': ', A12,'(', A14, ',', A14, ',', A14, ',')
1409 9994 FORMAT( 22X, 2( A14, ',') , 2( I3, ',' ),
1410 $ F4.1, ', A,', I3, ', B,', I3, ').' )
1413 SUBROUTINE SCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1414 $ FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
1415 $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G,
1420 * Auxiliary routine for test program for Level 3 Blas.
1422 * -- Written on 8-February-1989.
1423 * Jack Dongarra, Argonne National Laboratory.
1424 * Iain Duff, AERE Harwell.
1425 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
1426 * Sven Hammarling, Numerical Algorithms Group Ltd.
1430 PARAMETER ( ZERO = 0.0 )
1431 * .. Scalar Arguments ..
1433 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
1434 LOGICAL FATAL, REWI, TRACE
1436 * .. Array Arguments ..
1437 REAL A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
1438 $ AS( NMAX*NMAX ), B( NMAX, NMAX ),
1439 $ BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),
1440 $ C( NMAX, NMAX ), CC( NMAX*NMAX ),
1441 $ CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )
1442 INTEGER IDIM( NIDIM )
1443 * .. Local Scalars ..
1444 REAL ALPHA, ALS, BETA, BETS, ERR, ERRMAX
1445 INTEGER I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, K, KS,
1446 $ LAA, LCC, LDA, LDAS, LDC, LDCS, LJ, MA, N, NA,
1448 LOGICAL NULL, RESET, SAME, TRAN, UPPER
1449 CHARACTER*1 TRANS, TRANSS, UPLO, UPLOS
1452 * .. Local Arrays ..
1454 * .. External Functions ..
1456 EXTERNAL LSE, LSERES
1457 * .. External Subroutines ..
1458 EXTERNAL SMAKE, SMMCH, CSSYRK
1459 * .. Intrinsic Functions ..
1461 * .. Scalars in Common ..
1462 INTEGER INFOT, NOUTC
1464 * .. Common blocks ..
1465 COMMON /INFOC/INFOT, NOUTC, OK
1466 * .. Data statements ..
1467 DATA ICHT/'NTC'/, ICHU/'UL'/
1468 * .. Executable Statements ..
1475 DO 100 IN = 1, NIDIM
1477 * Set LDC to 1 more than minimum value if room.
1481 * Skip tests if not enough room.
1491 TRANS = ICHT( ICT: ICT )
1492 TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'
1500 * Set LDA to 1 more than minimum value if room.
1504 * Skip tests if not enough room.
1509 * Generate the matrix A.
1511 CALL SMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,
1515 UPLO = ICHU( ICU: ICU )
1524 * Generate the matrix C.
1526 CALL SMAKE( 'SY', UPLO, ' ', N, N, C, NMAX, CC,
1527 $ LDC, RESET, ZERO )
1531 * Save every datum before calling the subroutine.
1548 * Call the subroutine.
1551 $ CALL SPRCN4( NTRA, NC, SNAME, IORDER, UPLO,
1552 $ TRANS, N, K, ALPHA, LDA, BETA, LDC)
1555 CALL CSSYRK( IORDER, UPLO, TRANS, N, K, ALPHA,
1556 $ AA, LDA, BETA, CC, LDC )
1558 * Check if error-exit was taken incorrectly.
1561 WRITE( NOUT, FMT = 9993 )
1566 * See what data changed inside subroutines.
1568 ISAME( 1 ) = UPLOS.EQ.UPLO
1569 ISAME( 2 ) = TRANSS.EQ.TRANS
1570 ISAME( 3 ) = NS.EQ.N
1571 ISAME( 4 ) = KS.EQ.K
1572 ISAME( 5 ) = ALS.EQ.ALPHA
1573 ISAME( 6 ) = LSE( AS, AA, LAA )
1574 ISAME( 7 ) = LDAS.EQ.LDA
1575 ISAME( 8 ) = BETS.EQ.BETA
1577 ISAME( 9 ) = LSE( CS, CC, LCC )
1579 ISAME( 9 ) = LSERES( 'SY', UPLO, N, N, CS,
1582 ISAME( 10 ) = LDCS.EQ.LDC
1584 * If data was incorrectly changed, report and
1589 SAME = SAME.AND.ISAME( I )
1590 IF( .NOT.ISAME( I ) )
1591 $ WRITE( NOUT, FMT = 9998 )I+1
1600 * Check the result column by column.
1612 CALL SMMCH( 'T', 'N', LJ, 1, K, ALPHA,
1614 $ A( 1, J ), NMAX, BETA,
1615 $ C( JJ, J ), NMAX, CT, G,
1616 $ CC( JC ), LDC, EPS, ERR,
1617 $ FATAL, NOUT, .TRUE. )
1619 CALL SMMCH( 'N', 'T', LJ, 1, K, ALPHA,
1621 $ A( J, 1 ), NMAX, BETA,
1622 $ C( JJ, J ), NMAX, CT, G,
1623 $ CC( JC ), LDC, EPS, ERR,
1624 $ FATAL, NOUT, .TRUE. )
1631 ERRMAX = MAX( ERRMAX, ERR )
1632 * If got really bad answer, report and
1653 IF( ERRMAX.LT.THRESH )THEN
1654 IF ( IORDER.EQ.0) WRITE( NOUT, FMT = 10000 )SNAME, NC
1655 IF ( IORDER.EQ.1) WRITE( NOUT, FMT = 10001 )SNAME, NC
1657 IF ( IORDER.EQ.0) WRITE( NOUT, FMT = 10002 )SNAME, NC, ERRMAX
1658 IF ( IORDER.EQ.1) WRITE( NOUT, FMT = 10003 )SNAME, NC, ERRMAX
1664 $ WRITE( NOUT, FMT = 9995 )J
1667 WRITE( NOUT, FMT = 9996 )SNAME
1668 CALL SPRCN4( NOUT, NC, SNAME, IORDER, UPLO, TRANS, N, K, ALPHA,
1674 10003 FORMAT( ' ', A12,' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1675 $ 'TESTS (', I6, ' CALLS)', /' ******* BUT WITH MAXIMUM TEST ',
1676 $ 'RATIO ', F8.2, ' - SUSPECT *******' )
1677 10002 FORMAT( ' ', A12,' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1678 $ 'TESTS (', I6, ' CALLS)', /' ******* BUT WITH MAXIMUM TEST ',
1679 $ 'RATIO ', F8.2, ' - SUSPECT *******' )
1680 10001 FORMAT( ' ', A12,' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1681 $ ' (', I6, ' CALL', 'S)' )
1682 10000 FORMAT( ' ', A12,' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1683 $ ' (', I6, ' CALL', 'S)' )
1684 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
1685 $ 'ANGED INCORRECTLY *******' )
1686 9996 FORMAT( ' ******* ', A12,' FAILED ON CALL NUMBER:' )
1687 9995 FORMAT( ' THESE ARE THE RESULTS FOR COLUMN ', I3 )
1688 9994 FORMAT( 1X, I6, ': ', A12,'(', 2( '''', A1, ''',' ), 2( I3, ',' ),
1689 $ F4.1, ', A,', I3, ',', F4.1, ', C,', I3, ') .' )
1690 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1697 SUBROUTINE SPRCN4(NOUT, NC, SNAME, IORDER, UPLO, TRANSA,
1698 $ N, K, ALPHA, LDA, BETA, LDC)
1699 INTEGER NOUT, NC, IORDER, N, K, LDA, LDC
1701 CHARACTER*1 UPLO, TRANSA
1703 CHARACTER*14 CRC, CU, CA
1705 IF (UPLO.EQ.'U')THEN
1710 IF (TRANSA.EQ.'N')THEN
1711 CA = ' CblasNoTrans'
1712 ELSE IF (TRANSA.EQ.'T')THEN
1715 CA = 'CblasConjTrans'
1717 IF (IORDER.EQ.1)THEN
1718 CRC = ' CblasRowMajor'
1720 CRC = ' CblasColMajor'
1722 WRITE(NOUT, FMT = 9995)NC, SNAME, CRC, CU, CA
1723 WRITE(NOUT, FMT = 9994)N, K, ALPHA, LDA, BETA, LDC
1725 9995 FORMAT( 1X, I6, ': ', A12,'(', 3( A14, ',') )
1726 9994 FORMAT( 20X, 2( I3, ',' ),
1727 $ F4.1, ', A,', I3, ',', F4.1, ', C,', I3, ').' )
1730 SUBROUTINE SCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1731 $ FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
1732 $ AB, AA, AS, BB, BS, C, CC, CS, CT, G, W,
1737 * Auxiliary routine for test program for Level 3 Blas.
1739 * -- Written on 8-February-1989.
1740 * Jack Dongarra, Argonne National Laboratory.
1741 * Iain Duff, AERE Harwell.
1742 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
1743 * Sven Hammarling, Numerical Algorithms Group Ltd.
1747 PARAMETER ( ZERO = 0.0 )
1748 * .. Scalar Arguments ..
1750 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
1751 LOGICAL FATAL, REWI, TRACE
1753 * .. Array Arguments ..
1754 REAL AA( NMAX*NMAX ), AB( 2*NMAX*NMAX ),
1755 $ ALF( NALF ), AS( NMAX*NMAX ), BB( NMAX*NMAX ),
1756 $ BET( NBET ), BS( NMAX*NMAX ), C( NMAX, NMAX ),
1757 $ CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),
1758 $ G( NMAX ), W( 2*NMAX )
1759 INTEGER IDIM( NIDIM )
1760 * .. Local Scalars ..
1761 REAL ALPHA, ALS, BETA, BETS, ERR, ERRMAX
1762 INTEGER I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, JJAB,
1763 $ K, KS, LAA, LBB, LCC, LDA, LDAS, LDB, LDBS,
1764 $ LDC, LDCS, LJ, MA, N, NA, NARGS, NC, NS
1765 LOGICAL NULL, RESET, SAME, TRAN, UPPER
1766 CHARACTER*1 TRANS, TRANSS, UPLO, UPLOS
1769 * .. Local Arrays ..
1771 * .. External Functions ..
1773 EXTERNAL LSE, LSERES
1774 * .. External Subroutines ..
1775 EXTERNAL SMAKE, SMMCH, CSSYR2K
1776 * .. Intrinsic Functions ..
1778 * .. Scalars in Common ..
1779 INTEGER INFOT, NOUTC
1781 * .. Common blocks ..
1782 COMMON /INFOC/INFOT, NOUTC, OK
1783 * .. Data statements ..
1784 DATA ICHT/'NTC'/, ICHU/'UL'/
1785 * .. Executable Statements ..
1792 DO 130 IN = 1, NIDIM
1794 * Set LDC to 1 more than minimum value if room.
1798 * Skip tests if not enough room.
1804 DO 120 IK = 1, NIDIM
1808 TRANS = ICHT( ICT: ICT )
1809 TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'
1817 * Set LDA to 1 more than minimum value if room.
1821 * Skip tests if not enough room.
1826 * Generate the matrix A.
1829 CALL SMAKE( 'GE', ' ', ' ', MA, NA, AB, 2*NMAX, AA,
1830 $ LDA, RESET, ZERO )
1832 CALL SMAKE( 'GE', ' ', ' ', MA, NA, AB, NMAX, AA, LDA,
1836 * Generate the matrix B.
1841 CALL SMAKE( 'GE', ' ', ' ', MA, NA, AB( K + 1 ),
1842 $ 2*NMAX, BB, LDB, RESET, ZERO )
1844 CALL SMAKE( 'GE', ' ', ' ', MA, NA, AB( K*NMAX + 1 ),
1845 $ NMAX, BB, LDB, RESET, ZERO )
1849 UPLO = ICHU( ICU: ICU )
1858 * Generate the matrix C.
1860 CALL SMAKE( 'SY', UPLO, ' ', N, N, C, NMAX, CC,
1861 $ LDC, RESET, ZERO )
1865 * Save every datum before calling the subroutine.
1886 * Call the subroutine.
1889 $ CALL SPRCN5( NTRA, NC, SNAME, IORDER, UPLO,
1890 $ TRANS, N, K, ALPHA, LDA, LDB, BETA, LDC)
1893 CALL CSSYR2K( IORDER, UPLO, TRANS, N, K, ALPHA,
1894 $ AA, LDA, BB, LDB, BETA, CC, LDC )
1896 * Check if error-exit was taken incorrectly.
1899 WRITE( NOUT, FMT = 9993 )
1904 * See what data changed inside subroutines.
1906 ISAME( 1 ) = UPLOS.EQ.UPLO
1907 ISAME( 2 ) = TRANSS.EQ.TRANS
1908 ISAME( 3 ) = NS.EQ.N
1909 ISAME( 4 ) = KS.EQ.K
1910 ISAME( 5 ) = ALS.EQ.ALPHA
1911 ISAME( 6 ) = LSE( AS, AA, LAA )
1912 ISAME( 7 ) = LDAS.EQ.LDA
1913 ISAME( 8 ) = LSE( BS, BB, LBB )
1914 ISAME( 9 ) = LDBS.EQ.LDB
1915 ISAME( 10 ) = BETS.EQ.BETA
1917 ISAME( 11 ) = LSE( CS, CC, LCC )
1919 ISAME( 11 ) = LSERES( 'SY', UPLO, N, N, CS,
1922 ISAME( 12 ) = LDCS.EQ.LDC
1924 * If data was incorrectly changed, report and
1929 SAME = SAME.AND.ISAME( I )
1930 IF( .NOT.ISAME( I ) )
1931 $ WRITE( NOUT, FMT = 9998 )I+1
1940 * Check the result column by column.
1954 W( I ) = AB( ( J - 1 )*2*NMAX + K +
1956 W( K + I ) = AB( ( J - 1 )*2*NMAX +
1959 CALL SMMCH( 'T', 'N', LJ, 1, 2*K,
1960 $ ALPHA, AB( JJAB ), 2*NMAX,
1962 $ C( JJ, J ), NMAX, CT, G,
1963 $ CC( JC ), LDC, EPS, ERR,
1964 $ FATAL, NOUT, .TRUE. )
1967 W( I ) = AB( ( K + I - 1 )*NMAX +
1969 W( K + I ) = AB( ( I - 1 )*NMAX +
1972 CALL SMMCH( 'N', 'N', LJ, 1, 2*K,
1973 $ ALPHA, AB( JJ ), NMAX, W,
1974 $ 2*NMAX, BETA, C( JJ, J ),
1975 $ NMAX, CT, G, CC( JC ), LDC,
1976 $ EPS, ERR, FATAL, NOUT,
1984 $ JJAB = JJAB + 2*NMAX
1986 ERRMAX = MAX( ERRMAX, ERR )
1987 * If got really bad answer, report and
2008 IF( ERRMAX.LT.THRESH )THEN
2009 IF ( IORDER.EQ.0) WRITE( NOUT, FMT = 10000 )SNAME, NC
2010 IF ( IORDER.EQ.1) WRITE( NOUT, FMT = 10001 )SNAME, NC
2012 IF ( IORDER.EQ.0) WRITE( NOUT, FMT = 10002 )SNAME, NC, ERRMAX
2013 IF ( IORDER.EQ.1) WRITE( NOUT, FMT = 10003 )SNAME, NC, ERRMAX
2019 $ WRITE( NOUT, FMT = 9995 )J
2022 WRITE( NOUT, FMT = 9996 )SNAME
2023 CALL SPRCN5( NOUT, NC, SNAME, IORDER, UPLO, TRANS, N, K, ALPHA,
2024 $ LDA, LDB, BETA, LDC)
2029 10003 FORMAT( ' ', A12,' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
2030 $ 'TESTS (', I6, ' CALLS)', /' ******* BUT WITH MAXIMUM TEST ',
2031 $ 'RATIO ', F8.2, ' - SUSPECT *******' )
2032 10002 FORMAT( ' ', A12,' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
2033 $ 'TESTS (', I6, ' CALLS)', /' ******* BUT WITH MAXIMUM TEST ',
2034 $ 'RATIO ', F8.2, ' - SUSPECT *******' )
2035 10001 FORMAT( ' ', A12,' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
2036 $ ' (', I6, ' CALL', 'S)' )
2037 10000 FORMAT( ' ', A12,' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
2038 $ ' (', I6, ' CALL', 'S)' )
2039 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
2040 $ 'ANGED INCORRECTLY *******' )
2041 9996 FORMAT( ' ******* ', A12,' FAILED ON CALL NUMBER:' )
2042 9995 FORMAT( ' THESE ARE THE RESULTS FOR COLUMN ', I3 )
2043 9994 FORMAT( 1X, I6, ': ', A12,'(', 2( '''', A1, ''',' ), 2( I3, ',' ),
2044 $ F4.1, ', A,', I3, ', B,', I3, ',', F4.1, ', C,', I3, ') ',
2046 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2053 SUBROUTINE SPRCN5(NOUT, NC, SNAME, IORDER, UPLO, TRANSA,
2054 $ N, K, ALPHA, LDA, LDB, BETA, LDC)
2055 INTEGER NOUT, NC, IORDER, N, K, LDA, LDB, LDC
2057 CHARACTER*1 UPLO, TRANSA
2059 CHARACTER*14 CRC, CU, CA
2061 IF (UPLO.EQ.'U')THEN
2066 IF (TRANSA.EQ.'N')THEN
2067 CA = ' CblasNoTrans'
2068 ELSE IF (TRANSA.EQ.'T')THEN
2071 CA = 'CblasConjTrans'
2073 IF (IORDER.EQ.1)THEN
2074 CRC = ' CblasRowMajor'
2076 CRC = ' CblasColMajor'
2078 WRITE(NOUT, FMT = 9995)NC, SNAME, CRC, CU, CA
2079 WRITE(NOUT, FMT = 9994)N, K, ALPHA, LDA, LDB, BETA, LDC
2081 9995 FORMAT( 1X, I6, ': ', A12,'(', 3( A14, ',') )
2082 9994 FORMAT( 20X, 2( I3, ',' ),
2083 $ F4.1, ', A,', I3, ', B', I3, ',', F4.1, ', C,', I3, ').' )
2086 SUBROUTINE SMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, RESET,
2089 * Generates values for an M by N matrix A.
2090 * Stores the values in the array AA in the data structure required
2091 * by the routine, with unwanted elements set to rogue value.
2093 * TYPE is 'GE', 'SY' or 'TR'.
2095 * Auxiliary routine for test program for Level 3 Blas.
2097 * -- Written on 8-February-1989.
2098 * Jack Dongarra, Argonne National Laboratory.
2099 * Iain Duff, AERE Harwell.
2100 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
2101 * Sven Hammarling, Numerical Algorithms Group Ltd.
2105 PARAMETER ( ZERO = 0.0, ONE = 1.0 )
2107 PARAMETER ( ROGUE = -1.0E10 )
2108 * .. Scalar Arguments ..
2110 INTEGER LDA, M, N, NMAX
2112 CHARACTER*1 DIAG, UPLO
2114 * .. Array Arguments ..
2115 REAL A( NMAX, * ), AA( * )
2116 * .. Local Scalars ..
2117 INTEGER I, IBEG, IEND, J
2118 LOGICAL GEN, LOWER, SYM, TRI, UNIT, UPPER
2119 * .. External Functions ..
2122 * .. Executable Statements ..
2126 UPPER = ( SYM.OR.TRI ).AND.UPLO.EQ.'U'
2127 LOWER = ( SYM.OR.TRI ).AND.UPLO.EQ.'L'
2128 UNIT = TRI.AND.DIAG.EQ.'U'
2130 * Generate data in array A.
2134 IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )
2136 A( I, J ) = SBEG( RESET ) + TRANSL
2138 * Set some elements to zero
2139 IF( N.GT.3.AND.J.EQ.N/2 )
2142 A( J, I ) = A( I, J )
2150 $ A( J, J ) = A( J, J ) + ONE
2155 * Store elements in array AS in data structure required by routine.
2157 IF( TYPE.EQ.'GE' )THEN
2160 AA( I + ( J - 1 )*LDA ) = A( I, J )
2162 DO 40 I = M + 1, LDA
2163 AA( I + ( J - 1 )*LDA ) = ROGUE
2166 ELSE IF( TYPE.EQ.'SY'.OR.TYPE.EQ.'TR' )THEN
2183 DO 60 I = 1, IBEG - 1
2184 AA( I + ( J - 1 )*LDA ) = ROGUE
2186 DO 70 I = IBEG, IEND
2187 AA( I + ( J - 1 )*LDA ) = A( I, J )
2189 DO 80 I = IEND + 1, LDA
2190 AA( I + ( J - 1 )*LDA ) = ROGUE
2199 SUBROUTINE SMMCH( TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB,
2200 $ BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL,
2203 * Checks the results of the computational tests.
2205 * Auxiliary routine for test program for Level 3 Blas.
2207 * -- Written on 8-February-1989.
2208 * Jack Dongarra, Argonne National Laboratory.
2209 * Iain Duff, AERE Harwell.
2210 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
2211 * Sven Hammarling, Numerical Algorithms Group Ltd.
2215 PARAMETER ( ZERO = 0.0, ONE = 1.0 )
2216 * .. Scalar Arguments ..
2217 REAL ALPHA, BETA, EPS, ERR
2218 INTEGER KK, LDA, LDB, LDC, LDCC, M, N, NOUT
2220 CHARACTER*1 TRANSA, TRANSB
2221 * .. Array Arguments ..
2222 REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
2223 $ CC( LDCC, * ), CT( * ), G( * )
2224 * .. Local Scalars ..
2227 LOGICAL TRANA, TRANB
2228 * .. Intrinsic Functions ..
2229 INTRINSIC ABS, MAX, SQRT
2230 * .. Executable Statements ..
2231 TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'
2232 TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'
2234 * Compute expected result, one column at a time, in CT using data
2236 * Compute gauges in G.
2244 IF( .NOT.TRANA.AND..NOT.TRANB )THEN
2247 CT( I ) = CT( I ) + A( I, K )*B( K, J )
2248 G( I ) = G( I ) + ABS( A( I, K ) )*ABS( B( K, J ) )
2251 ELSE IF( TRANA.AND..NOT.TRANB )THEN
2254 CT( I ) = CT( I ) + A( K, I )*B( K, J )
2255 G( I ) = G( I ) + ABS( A( K, I ) )*ABS( B( K, J ) )
2258 ELSE IF( .NOT.TRANA.AND.TRANB )THEN
2261 CT( I ) = CT( I ) + A( I, K )*B( J, K )
2262 G( I ) = G( I ) + ABS( A( I, K ) )*ABS( B( J, K ) )
2265 ELSE IF( TRANA.AND.TRANB )THEN
2268 CT( I ) = CT( I ) + A( K, I )*B( J, K )
2269 G( I ) = G( I ) + ABS( A( K, I ) )*ABS( B( J, K ) )
2274 CT( I ) = ALPHA*CT( I ) + BETA*C( I, J )
2275 G( I ) = ABS( ALPHA )*G( I ) + ABS( BETA )*ABS( C( I, J ) )
2278 * Compute the error ratio for this result.
2282 ERRI = ABS( CT( I ) - CC( I, J ) )/EPS
2283 IF( G( I ).NE.ZERO )
2284 $ ERRI = ERRI/G( I )
2285 ERR = MAX( ERR, ERRI )
2286 IF( ERR*SQRT( EPS ).GE.ONE )
2292 * If the loop completes, all results are at least half accurate.
2295 * Report fatal error.
2298 WRITE( NOUT, FMT = 9999 )
2301 WRITE( NOUT, FMT = 9998 )I, CT( I ), CC( I, J )
2303 WRITE( NOUT, FMT = 9998 )I, CC( I, J ), CT( I )
2307 $ WRITE( NOUT, FMT = 9997 )J
2312 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2313 $ 'F ACCURATE *******', /' EXPECTED RESULT COMPU',
2315 9998 FORMAT( 1X, I7, 2G18.6 )
2316 9997 FORMAT( ' THESE ARE THE RESULTS FOR COLUMN ', I3 )
2321 LOGICAL FUNCTION LSE( RI, RJ, LR )
2323 * Tests if two arrays are identical.
2325 * Auxiliary routine for test program for Level 3 Blas.
2327 * -- Written on 8-February-1989.
2328 * Jack Dongarra, Argonne National Laboratory.
2329 * Iain Duff, AERE Harwell.
2330 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
2331 * Sven Hammarling, Numerical Algorithms Group Ltd.
2333 * .. Scalar Arguments ..
2335 * .. Array Arguments ..
2336 REAL RI( * ), RJ( * )
2337 * .. Local Scalars ..
2339 * .. Executable Statements ..
2341 IF( RI( I ).NE.RJ( I ) )
2353 LOGICAL FUNCTION LSERES( TYPE, UPLO, M, N, AA, AS, LDA )
2355 * Tests if selected elements in two arrays are equal.
2357 * TYPE is 'GE' or 'SY'.
2359 * Auxiliary routine for test program for Level 3 Blas.
2361 * -- Written on 8-February-1989.
2362 * Jack Dongarra, Argonne National Laboratory.
2363 * Iain Duff, AERE Harwell.
2364 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
2365 * Sven Hammarling, Numerical Algorithms Group Ltd.
2367 * .. Scalar Arguments ..
2371 * .. Array Arguments ..
2372 REAL AA( LDA, * ), AS( LDA, * )
2373 * .. Local Scalars ..
2374 INTEGER I, IBEG, IEND, J
2376 * .. Executable Statements ..
2378 IF( TYPE.EQ.'GE' )THEN
2380 DO 10 I = M + 1, LDA
2381 IF( AA( I, J ).NE.AS( I, J ) )
2385 ELSE IF( TYPE.EQ.'SY' )THEN
2394 DO 30 I = 1, IBEG - 1
2395 IF( AA( I, J ).NE.AS( I, J ) )
2398 DO 40 I = IEND + 1, LDA
2399 IF( AA( I, J ).NE.AS( I, J ) )
2415 REAL FUNCTION SBEG( RESET )
2417 * Generates random numbers uniformly distributed between -0.5 and 0.5.
2419 * Auxiliary routine for test program for Level 3 Blas.
2421 * -- Written on 8-February-1989.
2422 * Jack Dongarra, Argonne National Laboratory.
2423 * Iain Duff, AERE Harwell.
2424 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
2425 * Sven Hammarling, Numerical Algorithms Group Ltd.
2427 * .. Scalar Arguments ..
2429 * .. Local Scalars ..
2431 * .. Save statement ..
2433 * .. Executable Statements ..
2435 * Initialize local variables.
2442 * The sequence of values of I is bounded between 1 and 999.
2443 * If initial I = 1,2,3,6,7 or 9, the period will be 50.
2444 * If initial I = 4 or 8, the period will be 25.
2445 * If initial I = 5, the period will be 10.
2446 * IC is used to break up the period by skipping 1 value of I in 6.
2450 I = I - 1000*( I/1000 )
2455 SBEG = ( I - 500 )/1001.0
2461 REAL FUNCTION SDIFF( X, Y )
2463 * Auxiliary routine for test program for Level 3 Blas.
2465 * -- Written on 8-February-1989.
2466 * Jack Dongarra, Argonne National Laboratory.
2467 * Iain Duff, AERE Harwell.
2468 * Jeremy Du Croz, Numerical Algorithms Group Ltd.
2469 * Sven Hammarling, Numerical Algorithms Group Ltd.
2471 * .. Scalar Arguments ..
2473 * .. Executable Statements ..