SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
All Classes Files Functions Variables Typedefs Macros

◆ pchkpbe()

subroutine pchkpbe ( integer  ictxt,
integer  nout,
character*(*)  sname,
integer  infot 
)

Definition at line 1083 of file pblastst.f.

1084*
1085* -- PBLAS test routine (version 2.0) --
1086* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
1087* and University of California, Berkeley.
1088* April 1, 1998
1089*
1090* .. Scalar Arguments ..
1091 INTEGER ICTXT, INFOT, NOUT
1092 CHARACTER*(*) SNAME
1093* ..
1094*
1095* Purpose
1096* =======
1097*
1098* PCHKPBE tests whether a PBLAS routine has detected an error when it
1099* should. This routine does a global operation to ensure all processes
1100* have detected this error. If an error has been detected an error
1101* message is displayed.
1102*
1103* Notes
1104* =====
1105*
1106* A description vector is associated with each 2D block-cyclicly dis-
1107* tributed matrix. This vector stores the information required to
1108* establish the mapping between a matrix entry and its corresponding
1109* process and memory location.
1110*
1111* In the following comments, the character _ should be read as
1112* "of the distributed matrix". Let A be a generic term for any 2D
1113* block cyclicly distributed matrix. Its description vector is DESCA:
1114*
1115* NOTATION STORED IN EXPLANATION
1116* ---------------- --------------- ------------------------------------
1117* DTYPE_A (global) DESCA( DTYPE_ ) The descriptor type.
1118* CTXT_A (global) DESCA( CTXT_ ) The BLACS context handle, indicating
1119* the NPROW x NPCOL BLACS process grid
1120* A is distributed over. The context
1121* itself is global, but the handle
1122* (the integer value) may vary.
1123* M_A (global) DESCA( M_ ) The number of rows in the distribu-
1124* ted matrix A, M_A >= 0.
1125* N_A (global) DESCA( N_ ) The number of columns in the distri-
1126* buted matrix A, N_A >= 0.
1127* IMB_A (global) DESCA( IMB_ ) The number of rows of the upper left
1128* block of the matrix A, IMB_A > 0.
1129* INB_A (global) DESCA( INB_ ) The number of columns of the upper
1130* left block of the matrix A,
1131* INB_A > 0.
1132* MB_A (global) DESCA( MB_ ) The blocking factor used to distri-
1133* bute the last M_A-IMB_A rows of A,
1134* MB_A > 0.
1135* NB_A (global) DESCA( NB_ ) The blocking factor used to distri-
1136* bute the last N_A-INB_A columns of
1137* A, NB_A > 0.
1138* RSRC_A (global) DESCA( RSRC_ ) The process row over which the first
1139* row of the matrix A is distributed,
1140* NPROW > RSRC_A >= 0.
1141* CSRC_A (global) DESCA( CSRC_ ) The process column over which the
1142* first column of A is distributed.
1143* NPCOL > CSRC_A >= 0.
1144* LLD_A (local) DESCA( LLD_ ) The leading dimension of the local
1145* array storing the local blocks of
1146* the distributed matrix A,
1147* IF( Lc( 1, N_A ) > 0 )
1148* LLD_A >= MAX( 1, Lr( 1, M_A ) )
1149* ELSE
1150* LLD_A >= 1.
1151*
1152* Let K be the number of rows of a matrix A starting at the global in-
1153* dex IA,i.e, A( IA:IA+K-1, : ). Lr( IA, K ) denotes the number of rows
1154* that the process of row coordinate MYROW ( 0 <= MYROW < NPROW ) would
1155* receive if these K rows were distributed over NPROW processes. If K
1156* is the number of columns of a matrix A starting at the global index
1157* JA, i.e, A( :, JA:JA+K-1, : ), Lc( JA, K ) denotes the number of co-
1158* lumns that the process MYCOL ( 0 <= MYCOL < NPCOL ) would receive if
1159* these K columns were distributed over NPCOL processes.
1160*
1161* The values of Lr() and Lc() may be determined via a call to the func-
1162* tion PB_NUMROC:
1163* Lr( IA, K ) = PB_NUMROC( K, IA, IMB_A, MB_A, MYROW, RSRC_A, NPROW )
1164* Lc( JA, K ) = PB_NUMROC( K, JA, INB_A, NB_A, MYCOL, CSRC_A, NPCOL )
1165*
1166* Arguments
1167* =========
1168*
1169* ICTXT (local input) INTEGER
1170* On entry, ICTXT specifies the BLACS context handle, indica-
1171* ting the global context of the operation. The context itself
1172* is global, but the value of ICTXT is local.
1173*
1174* NOUT (global input) INTEGER
1175* On entry, NOUT specifies the unit number for the output file.
1176* When NOUT is 6, output to screen, when NOUT is 0, output to
1177* stderr. NOUT is only defined for process 0.
1178*
1179* SNAME (global input) CHARACTER*(*)
1180* On entry, SNAME specifies the subroutine name calling this
1181* subprogram.
1182*
1183* INFOT (global input) INTEGER
1184* On entry, INFOT specifies the position of the wrong argument.
1185* If the PBLAS error handler is called, INFO will be set to
1186* -INFOT. This routine verifies if the error was reported by
1187* all processes by doing a global sum, and assert the result to
1188* be NPROW * NPCOL.
1189*
1190* -- Written on April 1, 1998 by
1191* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
1192*
1193* =====================================================================
1194*
1195* .. Local Scalars ..
1196 INTEGER GERR, MYCOL, MYROW, NPCOL, NPROW
1197* ..
1198* .. External Subroutines ..
1199 EXTERNAL blacs_gridinfo, igsum2d
1200* ..
1201* .. Common Blocks ..
1202 INTEGER INFO, NBLOG
1203 COMMON /infoc/info, nblog
1204* ..
1205* .. Executable Statements ..
1206*
1207 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
1208*
1209 gerr = 0
1210 IF( info.NE.-infot )
1211 $ gerr = 1
1212*
1213 CALL igsum2d( ictxt, 'All', ' ', 1, 1, gerr, 1, -1, 0 )
1214*
1215 IF( myrow.EQ.0 .AND. mycol.EQ.0 ) THEN
1216 IF( gerr.EQ.( nprow * npcol ) ) THEN
1217 WRITE( nout, fmt = 9999 ) sname, info, -infot
1218 END IF
1219 END IF
1220*
1221 9999 FORMAT( 1x, a7, ': *** ERROR *** ERROR CODE RETURNED = ', i6,
1222 $ ' SHOULD HAVE BEEN ', i6 )
1223*
1224 RETURN
1225*
1226* End of PCHKPBE
1227*
Here is the caller graph for this function: