1 SUBROUTINE pschekpad( ICTXT, MESS, M, N, A, LDA, IPRE, IPOST,
10 INTEGER ICTXT, IPOST, IPRE, LDA, M, N
81 INTEGER I, IAM, IDUMM, INFO, J, K, MYCOL, MYROW,
85 EXTERNAL blacs_gridinfo, igamx2d
91 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
92 iam = myrow*npcol + mycol
99 IF( a( i ).NE.chkval )
THEN
100 WRITE( *, fmt = 9998 ) myrow, mycol, mess,
' pre', i,
106 WRITE( *, fmt = * )
'WARNING no pre-guardzone in PSCHEKPAD'
111 IF( ipost.GT.0 )
THEN
113 DO 20 i = j, j+ipost-1
114 IF( a( i ).NE.chkval )
THEN
115 WRITE( *, fmt = 9998 ) myrow, mycol, mess,
'post',
122 $
'WARNING no post-guardzone buffer in PSCHEKPAD'
130 DO 30 i = k, k + (lda-m) - 1
131 IF( a( i ).NE.chkval )
THEN
132 WRITE( *, fmt = 9997 ) myrow, mycol, mess,
133 $ i-ipre-lda*(j-1), j, a( i )
141 CALL igamx2d( ictxt,
'All',
' ', 1, 1, info, 1, idumm, idumm, -1,
143 IF( iam.EQ.0 .AND. info.GE.0 )
THEN
144 WRITE( *, fmt = 9999 ) info / npcol, mod( info, npcol ), mess
147 9999
FORMAT(
'{', i5,
',', i5,
'}: Memory overwrite in ', a )
148 9998
FORMAT(
'{', i5,
',', i5,
'}: ', a,
' memory overwrite in ',
149 $ a4,
'-guardzone: loc(', i3,
') = ', g11.4 )
150 9997
FORMAT(
'{', i5,
',', i5,
'}: ', a,
' memory overwrite in ',
151 $
'lda-m gap: loc(', i3,
',', i3,
') = ', g11.4 )