1 SUBROUTINE pstrdinfo( SUMMRY, NOUT, UPLO, NMAT, NVAL, LDNVAL, NNB,
2 $ NBVAL, LDNBVAL, NGRIDS, PVAL, LDPVAL, QVAL,
3 $ LDQVAL, THRESH, WORK, IAM, NPROCS )
12 INTEGER IAM, LDNBVAL, LDNVAL, LDPVAL, LDQVAL,
13 $ ngrids, nmat, nnb, nprocs, nout
17 CHARACTER*( * ) SUMMRY*(*)
18 INTEGER NBVAL( LDNBVAL ), NVAL( LDNVAL ),
19 $ pval( ldpval ), qval( ldqval ), work( * )
109 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
110 $ LLD_, MB_, M_, NB_, N_, RSRC_
111 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
113 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
115 PARAMETER ( NIN = 11 )
130 EXTERNAL pslamch, lsame
144 OPEN( nin, file=
'TRD.dat', status=
'OLD' )
150 READ( nin, fmt = 9999 ) usrinfo
154 READ( nin, fmt = * ) summry
156 IF( nout.NE.0 .AND. nout.NE.6 )
157 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
163 READ( nin, fmt = * ) uplo
167 READ( nin, fmt = * ) nmat
169 WRITE( nout, fmt = 9994 )
'N',
177 IF( nnb.LT.1 .OR. nnb.GT.ldnbval )
THEN
178 WRITE( nout, fmt = 9994 )
'NB', ldnbval
181 READ( nin, fmt = * ) ( nbval( i ), i = 1, nnb )
185 READ( nin, fmt = * ) ngrids
186 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
187 WRITE( nout, fmt = 9994 )
'Grids', ldpval
189 ELSE IF( ngrids.GT.ldqval )
THEN
190 WRITE( nout, fmt = 9994 )
'Grids', ldqval
196 READ( nin, fmt = * ) ( pval( i ), i = 1, ngrids )
197 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
201 READ( nin, fmt = * ) thresh
210 IF( nprocs.LT.1 )
THEN
213 nprocs =
max( nprocs, pval( i )*qval( i ) )
215 CALL blacs_setup( iam, nprocs )
221 CALL blacs_get( -1, 0, ictxt )
226 eps = pslamch( ictxt,
'eps' )
230 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, thresh, 1 )
235 IF( lsame( uplo,
'L' ) )
THEN
240 CALL igebs2d( ictxt,
'All',
' ', 4, 1, work, 4 )
243 CALL icopy( nmat, nval, 1, work( i ), 1 )
245 CALL icopy( nnb, nbval, 1, work( i ), 1 )
247 CALL icopy( ngrids, pval, 1, work( i ), 1 )
249 CALL icopy( ngrids, qval, 1, work( i ), 1 )
251 CALL igebs2d( ictxt,
'All',
' ', i, 1, work, i )
255 WRITE( nout, fmt = 9999 )
256 $
'ScaLAPACK Reduction Routine to symmetric '//
257 $
'tridiagonal form.'
258 WRITE( nout, fmt = 9999 ) usrinfo
259 WRITE( nout, fmt = * )
260 WRITE( nout, fmt = 9999 )
261 $
'Tests of the parallel '//
262 $
'real single precision symmetric '//
264 WRITE( nout, fmt = 9999 )
'reduction routines.'
265 WRITE( nout, fmt = 9999 )
266 $
'The following scaled residual '//
267 $
'checks will be computed:'
268 WRITE( nout, fmt = 9999 )
269 $
' ||A - QTQ''|| / (||A|| * eps * N)'
270 WRITE( nout, fmt = 9999 )
271 $
'The matrix A is randomly '//
272 $
'generated for each test.'
273 WRITE( nout, fmt = * )
274 WRITE( nout, fmt = 9999 )
275 $
'An explanation of the input/output '//
276 $
'parameters follows:'
277 WRITE( nout, fmt = 9999 )
278 $
'UPLO : Whether the ''Upper'' or ''Low'//
279 $
'er'' part of A is to be referenced.'
280 WRITE( nout, fmt = 9999 )
281 $
'TIME : Indicates whether WALL or '//
282 $
'CPU time was used.'
283 WRITE( nout, fmt = 9999 )
284 $
'N : The number of rows and columns '//
286 WRITE( NOUT, FMT = 9999 )
287 $ 'nb :
the size of
the square blocks
'//
289 WRITE( NOUT, FMT = 9999 )
290 $ 'p :
the number of process rows.
'
291 WRITE( NOUT, FMT = 9999 )
292 $ 'q :
the number of process columns.
'
293 WRITE( NOUT, FMT = 9999 )
294 $ 'thresh :
If a residual
value is less
'//
295 $ 'than thresh, check is flagged as passed.
'
296 WRITE( NOUT, FMT = 9999 )
297 $ 'trd time : time in seconds to reduce
the'//
298 $ ' matrix to tridiagonal form.
'
299 WRITE( NOUT, FMT = 9999 )
300 $ 'mflops : rate of execution
for '//
301 $ 'symmetric tridiagonal reduction.
'
302 WRITE( NOUT, FMT = * )
303 WRITE( NOUT, FMT = 9999 )
304 $ 'the following
parameter values will be used:
'
305 WRITE( NOUT, FMT = 9999 )
307 WRITE( NOUT, FMT = 9996 )
308 $ 'n
', ( NVAL( I ), I = 1, MIN( NMAT, 10 ) )
310 $ WRITE( NOUT, FMT = 9997 ) ( NVAL( I ), I = 11, NMAT )
311 WRITE( NOUT, FMT = 9996 )
312 $ 'nb
', ( NBVAL( I ), I = 1, MIN( NNB, 10 ) )
314 $ WRITE( NOUT, FMT = 9997 ) ( NBVAL( I ), I = 11, NNB )
315 WRITE( NOUT, FMT = 9996 )
316 $ 'p ', ( pval( i ), i = 1,
min( ngrids, 10 ) )
318 $
WRITE( nout, fmt = 9997 ) ( pval( i ), i = 11, ngrids )
319 WRITE( nout, fmt = 9996 )
320 $
'Q ', ( qval( i ), i = 1,
min( ngrids, 10 ) )
322 $
WRITE( nout, fmt = 9997 ) ( qval( i ), i = 11, ngrids )
323 WRITE( nout, fmt = * )
324 WRITE( nout, fmt = 9995 ) eps
325 WRITE( nout, fmt = 9998 ) thresh
332 $
CALL blacs_setup( iam, nprocs )
337 CALL blacs_get( -1, 0, ictxt )
342 eps = pslamch( ictxt,
'eps' )
344 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, thresh, 1, 0, 0 )
345 CALL igebr2d( ictxt,
'All',
' ', 4, 1, work, 4, 0, 0 )
349 IF( work( 4 ).EQ.1 )
THEN
355 i = nmat + nnb + 2*ngrids
356 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
358 CALL icopy( nmat, work( i ), 1, nval, 1 )
360 CALL icopy( nnb, work( i ), 1, nbval, 1 )
362 CALL icopy( ngrids, work( i ), 1, pval, 1 )
364 CALL icopy( ngrids, work( i ), 1, qval, 1 )
372 20
WRITE( nout, fmt = 9993 )
374 IF( nout.NE.6 .AND. nout.NE.0 )
376 CALL blacs_abort( ictxt, 1 )
381 9998
FORMAT(
'Routines pass computational tests if scaled residual ',
382 $
'is less than ', g12.5 )
383 9997
FORMAT(
' ', 10i6 )
384 9996
FORMAT( 2x, a5,
' : ', 10i6 )
385 9995
FORMAT(
'Relative machine precision (eps) is taken to be ',
387 9994
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
389 9993
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )
subroutine pstrdinfo(summry, nout, uplo, nmat, nval, ldnval, nnb, nbval, ldnbval, ngrids, pval, ldpval, qval, ldqval, thresh, work, iam, nprocs)