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

◆ cbtcheckin()

subroutine cbtcheckin ( integer  nftests,
integer  outnum,
integer  maxerr,
integer  nerr,
integer, dimension(*)  ierr,
complex, dimension(*)  cval,
integer, dimension(*)  tfailed 
)

Definition at line 9467 of file blacstest.f.

9469 INTEGER NFTESTS, OUTNUM, MAXERR, NERR
9470 INTEGER IERR(*), TFAILED(*)
9471 COMPLEX CVAL(*)
9472*
9473* Purpose
9474* =======
9475* CBTCHECKIN: Process 0 receives error report from all processes.
9476*
9477* Arguments
9478* =========
9479* NFTESTS (input/output) INTEGER
9480* if NFTESTS is <= 0 upon entry, NFTESTS is not written to.
9481* Otherwise, on entry it specifies the total number of tests
9482* run, and on exit it is the number of tests which failed.
9483*
9484* OUTNUM (input) INTEGER
9485* Device number for output.
9486*
9487* MAXERR (input) INTEGER
9488* Max number of errors that can be stored in ERRIBUFF or
9489* ERRCBUFF
9490*
9491* NERR (output) INTEGER
9492* The number of errors that have been found.
9493*
9494* ERRIBUF (output) INTEGER array, dimension (6,MAXERRS)
9495* Buffer in which to store integer error information. It will
9496* be built up in the following format for the call to TSEND.
9497* All integer information is recorded in the following 6-tuple
9498* {TESTNUM, SRC, DEST, I, J, WHAT}. These values are figured:
9499* SRC = RSRC * NPROCS + CSRC
9500* DEST = RDEST * NPROCS + CDEST
9501* WHAT
9502* = 1 : Error in pre-padding
9503* = 2 : Error in post-padding
9504* = 3 : Error in LDA-M gap
9505* = 4 : Error in complementory triangle
9506* ELSE: Error in matrix
9507* If there are more errors than can fit in the error buffer,
9508* the error number will indicate the actual number of errors
9509* found, but the buffer will be truncated to the maximum
9510* number of errors which can fit.
9511*
9512* ERRDBUF (output) @(doctype) array, dimension (2, MAXERRS)
9513* Buffer in which to store error data information.
9514* {Incorrect, Predicted}
9515*
9516* TFAILED (workspace) INTEGER array, dimension NFTESTS
9517* Workspace used to keep track of which tests failed.
9518* If input of NFTESTS < 1, this array not accessed.
9519*
9520* ===================================================================
9521*
9522* .. External Functions ..
9523 INTEGER IBTMYPROC, IBTNPROCS, IBTMSGID
9524 EXTERNAL ibtmyproc, ibtnprocs, ibtmsgid
9525* ..
9526* .. Local Scalars ..
9527 LOGICAL COUNTING
9528 INTEGER K, NERR2, IAM, NPROCS, NTESTS
9529*
9530* Proc 0 collects error info from everyone
9531*
9532 iam = ibtmyproc()
9533 nprocs = ibtnprocs()
9534*
9535 IF( iam .EQ. 0 ) THEN
9536*
9537* If we are finding out how many failed tests there are, initialize
9538* the total number of tests (NTESTS), and zero the test failed array
9539*
9540 counting = nftests .GT. 0
9541 IF( counting ) THEN
9542 ntests = nftests
9543 DO 10 k = 1, ntests
9544 tfailed(k) = 0
9545 10 CONTINUE
9546 END IF
9547*
9548 CALL cprinterrs(outnum, maxerr, nerr, ierr, cval, counting,
9549 $ tfailed)
9550*
9551 DO 20 k = 1, nprocs-1
9552 CALL btsend(3, 0, k, k, ibtmsgid()+50)
9553 CALL btrecv(3, 1, nerr2, k, ibtmsgid()+50)
9554 IF( nerr2 .GT. 0 ) THEN
9555 nerr = nerr + nerr2
9556 CALL btrecv(3, nerr2*6, ierr, k, ibtmsgid()+51)
9557 CALL btrecv(5, nerr2*2, cval, k, ibtmsgid()+51)
9558 CALL cprinterrs(outnum, maxerr, nerr2, ierr, cval,
9559 $ counting, tfailed)
9560 END IF
9561 20 CONTINUE
9562*
9563* Count up number of tests that failed
9564*
9565 IF( counting ) THEN
9566 nftests = 0
9567 DO 30 k = 1, ntests
9568 nftests = nftests + tfailed(k)
9569 30 CONTINUE
9570 END IF
9571*
9572* Send my error info to proc 0
9573*
9574 ELSE
9575 CALL btrecv(3, 0, k, 0, ibtmsgid()+50)
9576 CALL btsend(3, 1, nerr, 0, ibtmsgid()+50)
9577 IF( nerr .GT. 0 ) THEN
9578 CALL btsend(3, nerr*6, ierr, 0, ibtmsgid()+51)
9579 CALL btsend(5, nerr*2, cval, 0, ibtmsgid()+51)
9580 END IF
9581 ENDIF
9582*
9583 RETURN
9584*
9585* End of CBTCHECKIN
9586*
subroutine cprinterrs(outnum, maxerr, nerr, erribuf, errdbuf, counting, tfailed)
integer function ibtmsgid()
Definition blacstest.f:1361
subroutine btrecv(dtype, n, buff, src, msgid)
Definition btprim.f:207
integer function ibtnprocs()
Definition btprim.f:81
integer function ibtmyproc()
Definition btprim.f:47
subroutine btsend(dtype, n, buff, dest, msgid)
Definition btprim.f:115
Here is the call graph for this function:
Here is the caller graph for this function: