SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ cprinterrs()

subroutine cprinterrs ( integer  outnum,
integer  maxerr,
integer  nerr,
integer, dimension(6, maxerr)  erribuf,
complex, dimension(2, maxerr)  errdbuf,
logical  counting,
integer, dimension(*)  tfailed 
)

Definition at line 10336 of file blacstest.f.

10338*
10339* -- BLACS tester (version 1.0) --
10340* University of Tennessee
10341* December 15, 1994
10342*
10343*
10344* .. Scalar Arguments ..
10345 LOGICAL COUNTING
10346 INTEGER OUTNUM, MAXERR, NERR
10347* ..
10348* .. Array Arguments ..
10349 INTEGER ERRIBUF(6, MAXERR), TFAILED(*)
10350 COMPLEX ERRDBUF(2, MAXERR)
10351* ..
10352*
10353* Purpose
10354* =======
10355* CPRINTERRS: Print errors that have been recorded
10356*
10357* Arguments
10358* =========
10359* OUTNUM (input) INTEGER
10360* Device number for output.
10361*
10362* MAXERR (input) INTEGER
10363* Max number of errors that can be stored in ERRIBUFF or
10364* ERRCBUFF
10365*
10366* NERR (output) INTEGER
10367* The number of errors that have been found.
10368*
10369* ERRIBUF (output) INTEGER array, dimension (6,MAXERRS)
10370* Buffer in which to store integer error information. It will
10371* be built up in the following format for the call to TSEND.
10372* All integer information is recorded in the following 6-tuple
10373* {TESTNUM, SRC, DEST, I, J, WHAT}. These values are figured:
10374* SRC = RSRC * NPROCS + CSRC
10375* DEST = RDEST * NPROCS + CDEST
10376* WHAT
10377* = 1 : Error in pre-padding
10378* = 2 : Error in post-padding
10379* = 3 : Error in LDA-M gap
10380* = 4 : Error in complementory triangle
10381* ELSE: Error in matrix
10382* If there are more errors than can fit in the error buffer,
10383* the error number will indicate the actual number of errors
10384* found, but the buffer will be truncated to the maximum
10385* number of errors which can fit.
10386*
10387* ERRDBUF (output) @(doctype) array, dimension (2, MAXERRS)
10388* Buffer in which to store error data information.
10389* {Incorrect, Predicted}
10390*
10391* TFAILED (input/ourput) INTEGER array, dimension NTESTS
10392* Workspace used to keep track of which tests failed.
10393* This array not accessed unless COUNTING is true.
10394*
10395* ===================================================================
10396*
10397* .. Parameters ..
10398 INTEGER ERR_PRE, ERR_POST, ERR_GAP, ERR_TRI, ERR_MAT
10399 parameter( err_pre = 1, err_post = 2, err_gap = 3, err_tri = 4 )
10400 parameter( err_mat = 5 )
10401* ..
10402* .. External Functions ..
10403 INTEGER IBTMYPROC, IBTNPROCS
10404 EXTERNAL ibtmyproc, ibtnprocs
10405* ..
10406* .. Local Scalars ..
10407 CHARACTER*1 MAT
10408 LOGICAL MATISINT
10409 INTEGER OLDTEST, NPROCS, PROW, PCOL, I, ERRTYPE
10410* ..
10411* .. Executable Statements ..
10412*
10413 IF( (ibtmyproc().NE.0) .OR. (nerr.LE.0) ) RETURN
10414 oldtest = -1
10415 nprocs = ibtnprocs()
10416 prow = erribuf(3,1) / nprocs
10417 pcol = mod( erribuf(3,1), nprocs )
10418 IF( nerr .GT. maxerr ) WRITE(outnum,13000)
10419*
10420 DO 20 i = 1, min( nerr, maxerr )
10421 IF( erribuf(1,i) .NE. oldtest ) THEN
10422 IF( oldtest .NE. -1 )
10423 $ WRITE(outnum,12000) prow, pcol, oldtest
10424 WRITE(outnum,*) ' '
10425 WRITE(outnum,1000) prow, pcol, erribuf(1,i)
10426 IF( counting ) tfailed( erribuf(1,i) ) = 1
10427 oldtest = erribuf(1, i)
10428 END IF
10429*
10430* Print out error message depending on type of error
10431*
10432 errtype = erribuf(6, i)
10433 IF( errtype .LT. -10 ) THEN
10434 errtype = -errtype - 10
10435 mat = 'C'
10436 matisint = .true.
10437 ELSE IF( errtype .LT. 0 ) THEN
10438 errtype = -errtype
10439 mat = 'R'
10440 matisint = .true.
10441 ELSE
10442 matisint = .false.
10443 END IF
10444*
10445* RA/CA arrays from MAX/MIN have different printing protocol
10446*
10447 IF( matisint ) THEN
10448 IF( erribuf(2, i) .EQ. -1 ) THEN
10449 WRITE(outnum,11000) erribuf(4,i), erribuf(5,i), mat,
10450 $ int( errdbuf(2,i) ), int( errdbuf(1,i) )
10451 ELSE IF( errtype .EQ. err_pre ) THEN
10452 WRITE(outnum,7000) erribuf(5,i), mat,
10453 $ int( errdbuf(2,i) ), int( errdbuf(1,i) )
10454 ELSE IF( errtype .EQ. err_post ) THEN
10455 WRITE(outnum,8000) erribuf(4,i), mat,
10456 $ int( errdbuf(2,i) ), int( errdbuf(1,i) )
10457 ELSE IF( errtype .EQ. err_gap ) THEN
10458 WRITE(outnum,9000) mat, erribuf(4,i), erribuf(5,i),
10459 $ int( errdbuf(2,i) ), int( errdbuf(1,i) )
10460 ELSE
10461 WRITE(outnum,10000) mat, erribuf(4,i), erribuf(5,i),
10462 $ int( errdbuf(2,i) ),
10463 $ int( errdbuf(1,i) )
10464 END IF
10465*
10466* Have memory overwrites in matrix A
10467*
10468 ELSE
10469 IF( errtype .EQ. err_pre ) THEN
10470 WRITE(outnum,2000) erribuf(5,i),
10471 $ real( errdbuf(2,i) ), aimag( errdbuf(2,i) ),
10472 $ real( errdbuf(1,i) ), aimag( errdbuf(1,i) )
10473 ELSE IF( errtype .EQ. err_post ) THEN
10474 WRITE(outnum,3000) erribuf(4,i),
10475 $ real( errdbuf(2,i) ), aimag( errdbuf(2,i) ),
10476 $ real( errdbuf(1,i) ), aimag( errdbuf(1,i) )
10477 ELSE IF( errtype .EQ. err_gap ) THEN
10478 WRITE(outnum,4000)
10479 $ erribuf(4,i), erribuf(5,i),
10480 $ real( errdbuf(2,i) ), aimag( errdbuf(2,i) ),
10481 $ real( errdbuf(1,i) ), aimag( errdbuf(1,i) )
10482 ELSE IF( errtype .EQ. err_tri ) THEN
10483 WRITE(outnum,5000) erribuf(4,i), erribuf(5,i),
10484 $ real( errdbuf(2,i) ), aimag( errdbuf(2,i) ),
10485 $ real( errdbuf(1,i) ), aimag( errdbuf(1,i) )
10486 ELSE
10487 WRITE(outnum,6000) erribuf(4,i), erribuf(5,i),
10488 $ real( errdbuf(2,i) ), aimag( errdbuf(2,i) ),
10489 $ real( errdbuf(1,i) ), aimag( errdbuf(1,i) )
10490 END IF
10491 END IF
10492 20 CONTINUE
10493 WRITE(outnum,12000) prow, pcol, oldtest
10494*
10495 1000 FORMAT('PROCESS {',i4,',',i4,'} REPORTS ERRORS IN TEST#',i6,':')
10496 2000 FORMAT(' Buffer overwrite ',i4,
10497 $ ' elements before the start of A:',/,
10498 $ ' Expected=','[',g15.8,',',g15.8,']',
10499 $ '; Received=','[',g15.8,',',g15.8,']')
10500 3000 FORMAT(' Buffer overwrite ',i4,' elements after the end of A:',
10501 $ /,' Expected=','[',g15.8,',',g15.8,']',
10502 $ '; Received=','[',g15.8,',',g15.8,']')
10503 4000 FORMAT(' LDA-M gap overwrite at postion (',i4,',',i4,'):',/,
10504 $ ' Expected=','[',g15.8,',',g15.8,']',
10505 $ '; Received=','[',g15.8,',',g15.8,']')
10506 5000 FORMAT(' Complementory triangle overwrite at A(',i4,',',i4,
10507 $ '):',/,' Expected=','[',g15.8,',',g15.8,']',
10508 $ '; Received=','[',g15.8,',',g15.8,']')
10509 6000 FORMAT(' Invalid element at A(',i4,',',i4,'):',/,
10510 $ ' Expected=','[',g15.8,',',g15.8,']',
10511 $ '; Received=','[',g15.8,',',g15.8,']')
10512 7000 FORMAT(' Buffer overwrite ',i4,' elements before the start of ',
10513 $ a1,'A:',/,' Expected=',i12,'; Received=',i12)
10514 8000 FORMAT(' Buffer overwrite ',i4,' elements after the end of ',
10515 $ a1,'A:',/,' Expected=',i12,'; Received=',i12)
10516*
10517 9000 FORMAT(' LD',a1,'A-M gap overwrite at postion (',i4,',',i4,'):'
10518 $ ,/,' Expected=',i12,'; Received=',i12)
10519*
1052010000 FORMAT(' Invalid element at ',a1,'A(',i4,',',i4,'):',/,
10521 $ ' Expected=',i12,'; Received=',i12)
1052211000 FORMAT(' Overwrite at position (',i4,',',i4,') of non-existent '
10523 $ ,a1,'A array.',/,' Expected=',i12,'; Received=',i12)
1052412000 FORMAT('PROCESS {',i4,',',i4,'} DONE ERROR REPORT FOR TEST#',
10525 $ i6,'.')
1052613000 FORMAT('WARNING: There were more errors than could be recorded.',
10527 $ /,'Increase MEMELTS to get complete listing.')
10528 RETURN
10529*
10530* End CPRINTERRS
10531*
integer function ibtnprocs()
Definition btprim.f:81
integer function ibtmyproc()
Definition btprim.f:47
#define min(A, B)
Definition pcgemr.c:181
Here is the caller graph for this function: