1 SUBROUTINE pdptinfo( SUMMRY, NOUT, UPLO, NMAT, NVAL, LDNVAL, NBW,
2 $ BWVAL, LDBWVAL, NNB, NBVAL, LDNBVAL, NNR,
3 $ NRVAL, LDNRVAL, NNBR, NBRVAL, LDNBRVAL,
4 $ NGRIDS, PVAL, LDPVAL, QVAL, LDQVAL, THRESH,
18 $ LDBWVAL, LDNBRVAL, LDNBVAL, LDNRVAL, LDNVAL,
19 $ ldpval, ldqval, ngrids, nmat, nnb, nnbr, nbw,
24 INTEGER NBRVAL( LDNBRVAL ), NBVAL( LDNBVAL ),
25 $ nrval( ldnrval ), nval( ldnval ),
27 $ pval( ldpval ), qval(ldqval), work( * )
154 PARAMETER ( NIN = 11 )
162 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
163 $ blacs_gridinit, blacs_setup,
icopy, igebr2d,
164 $ igebs2d, sgebr2d, sgebs2d
168 DOUBLE PRECISION PDLAMCH
169 EXTERNAL LSAME, PDLAMCH
183 OPEN( nin, file =
'BLLT.dat', status =
'OLD' )
184 READ( nin, fmt = * ) summry
189 READ( nin, fmt = 9999 ) usrinfo
193 READ( nin, fmt = * ) summry
194 READ( nin, fmt = * ) nout
195 IF( nout.NE.0 .AND. nout.NE.6 )
196 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
202 READ( nin, fmt = * ) uplo
207 READ( nin, fmt = * ) nmat
208 IF( nmat.LT.1 .OR. nmat.GT.ldnval )
THEN
209 WRITE( nout, fmt = 9994 )
'N', ldnval
212 READ( nin, fmt = * ) ( nval( i ), i = 1, nmat )
216 READ( nin, fmt = * ) nbw
218 IF( nbw.LT.1 .OR. nbw.GT.ldbwval )
THEN
219 WRITE( nout, fmt = 9994 )
'BW', ldbwval
222 READ( nin, fmt = * ) ( bwval( i ), i = 1, nbw )
226 READ( nin, fmt = * ) nnb
227 IF( nnb.LT.1 .OR. nnb.GT.ldnbval )
THEN
228 WRITE( nout, fmt = 9994 )
'NB', ldnbval
231 READ( nin, fmt = * ) ( nbval( i ), i = 1, nnb )
235 READ( nin, fmt = * ) nnr
236 IF( nnr.LT.1 .OR. nnr.GT.ldnrval )
THEN
237 WRITE( nout, fmt = 9994 )
'NRHS', ldnrval
240 READ( nin, fmt = * ) ( nrval( i ), i = 1, nnr )
244 READ( nin, fmt = * ) nnbr
245 IF( nnbr.LT.1 .OR. nnbr.GT.ldnbrval )
THEN
246 WRITE( nout, fmt = 9994 )
'NBRHS', ldnbrval
249 READ( nin, fmt = * ) ( nbrval( i ), i = 1, nnbr )
253 READ( nin, fmt = * ) ngrids
254 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
255 WRITE( nout, fmt = 9994 )
'Grids', ldpval
257 ELSE IF( ngrids.GT.ldqval )
THEN
258 WRITE( nout, fmt = 9994 )
'Grids', ldqval
263 DO 8738 i = 1, ngrids
269 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
273 READ( nin, fmt = * ) thresh
282 IF( nprocs.LT.1 )
THEN
285 nprocs =
max( nprocs, pval( i )*qval( i ) )
287 CALL blacs_setup( iam, nprocs )
293 CALL blacs_get( -1, 0, ictxt )
294 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
298 eps = pdlamch( ictxt,
'eps' )
302 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, thresh, 1 )
316 IF( lsame( uplo,
'L' ) )
THEN
323 CALL igebs2d( ictxt,
'All',
' ', 1, 1, i-1, 1 )
325 CALL igebs2d( ictxt,
'All',
' ', i-1, 1, work, i-1 )
328 CALL icopy( nmat, nval, 1, work( i ), 1 )
330 CALL icopy( nbw, bwval, 1, work( i ), 1 )
332 CALL icopy( nnb, nbval, 1, work( i ), 1 )
334 CALL icopy( nnr, nrval, 1, work( i ), 1 )
336 CALL icopy( nnbr, nbrval, 1, work( i ), 1 )
338 CALL icopy( ngrids, pval, 1, work( i ), 1 )
340 CALL icopy( ngrids, qval, 1, work( i ), 1 )
342 CALL igebs2d( ictxt,
'All',
' ', i-1, 1, work, i-1 )
346 WRITE( nout, fmt = 9999 )
347 $
'SCALAPACK banded linear systems.'
348 WRITE( nout, fmt = 9999 ) usrinfo
349 WRITE( nout, fmt = * )
350 WRITE( nout, fmt = 9999 )
351 $
'Tests of the parallel '//
352 $
'real double precision band matrix solve '
353 WRITE( nout, fmt = 9999 )
354 $
'The following scaled residual '//
355 $
'checks will be computed:'
356 WRITE( nout, fmt = 9999 )
357 $
' Solve residual = ||Ax - b|| / '//
358 $
'(||x|| * ||A|| * eps * N)'
359 IF( lsame( uplo,
'L' ) )
THEN
360 WRITE( nout, fmt = 9999 )
361 $
' Factorization residual = ||A - LL''|| /'//
362 $
' (||A|| * eps * N)'
364 WRITE( nout, fmt = 9999 )
365 $
' Factorization residual = ||A - U''U|| /'//
366 $
' (||A|| * eps * N)'
368 WRITE( nout, fmt = 9999 )
369 $
'The matrix A is randomly '//
370 $
'generated for each test.'
371 WRITE( nout, fmt = * )
372 WRITE( nout, fmt = 9999 )
373 $
'An explanation of the input/output '//
374 $
'parameters follows:'
375 WRITE( nout, fmt = 9999 )
376 $
'TIME : Indicates whether WALL or '//
377 $
'CPU time was used.'
379 WRITE( nout, fmt = 9999 )
380 $
'UPLO : Whether data represents ''Upper'//
381 $
''' or ''Lower'' triangular portion of array A.'
382 WRITE( nout, fmt = 9999 )
383 $
'TRANS : Whether solve is to be done with'//
384 $
' ''Transpose'' of matrix A (T,C) or not (N).'
385 WRITE( nout, fmt = 9999 )
386 $
'N : The number of rows and columns '//
388 WRITE( nout, fmt = 9999 )
389 $
'bw : The number of diagonals '//
391 WRITE( nout, fmt = 9999 )
392 $
'NB : The size of the column panels the'//
393 $
' matrix A is split into. [-1 for default]'
394 WRITE( nout, fmt = 9999 )
395 $
'NRHS : The total number of RHS to solve'//
397 WRITE( nout, fmt = 9999 )
398 $
'NBRHS : The number of RHS to be put on '//
399 $
'a column of processes before going'
400 WRITE( nout, fmt = 9999 )
401 $
' on to the next column of processes.'
402 WRITE( nout, fmt = 9999 )
403 $
'P : The number of process rows.'
404 WRITE( nout, fmt = 9999 )
405 $
'Q : The number of process columns.'
406 WRITE( nout, fmt = 9999 )
407 $
'THRESH : If a residual value is less than'//
408 $
' THRESH, CHECK is flagged as PASSED'
409 WRITE( nout, fmt = 9999 )
410 $
'Fact time: Time in seconds to factor the'//
412 WRITE( nout, fmt = 9999 )
413 $
'Sol Time: Time in seconds to solve the'//
415 WRITE( nout, fmt = 9999 )
416 $
'MFLOPS : Rate of execution for factor '//
417 $
'and solve using sequential operation count.'
418 WRITE( nout, fmt = 9999 )
419 $
'MFLOP2 : Rough estimate of speed '//
420 $
'using actual op count (accurate big P,N).'
421 WRITE( nout, fmt = * )
422 WRITE( nout, fmt = 9999 )
423 $
'The following parameter values will be used:'
424 WRITE( nout, fmt = 9999 )
426 WRITE( nout, fmt = 9996 )
427 $
'N ', ( nval(i), i = 1,
min(nmat, 10) )
429 $
WRITE( nout, fmt = 9997 ) ( nval(i), i = 11, nmat )
430 WRITE( nout, fmt = 9996 )
431 $
'bw ', ( bwval(i), i = 1,
min(nbw, 10) )
433 $
WRITE( nout, fmt = 9997 ) ( bwval(i), i = 11, nbw )
434 WRITE( nout, fmt = 9996 )
435 $
'NB ', ( nbval(i), i = 1,
min(nnb, 10) )
437 $
WRITE( nout, fmt = 9997 ) ( nbval(i), i = 11, nnb )
438 WRITE( nout, fmt = 9996 )
439 $
'NRHS ', ( nrval(i), i = 1,
min(nnr, 10) )
441 $
WRITE( nout, fmt = 9997 ) ( nrval(i), i = 11, nnr )
442 WRITE( nout, fmt = 9996 )
443 $
'NBRHS', ( nbrval(i), i = 1,
min(nnbr, 10) )
445 $
WRITE( nout, fmt = 9997 ) ( nbrval(i), i = 11, nnbr )
446 WRITE( nout, fmt = 9996 )
447 $
'P ', ( pval(i), i = 1,
min(ngrids, 10) )
449 $
WRITE( nout, fmt = 9997) ( pval(i), i = 11, ngrids )
450 WRITE( nout, fmt = 9996 )
451 $
'Q ', ( qval(i), i = 1,
min(ngrids, 10) )
453 $
WRITE( nout, fmt = 9997 ) ( qval(i), i = 11, ngrids )
454 WRITE( nout, fmt = * )
455 WRITE( nout, fmt = 9995 ) eps
456 WRITE( nout, fmt = 9998 ) thresh
463 $
CALL blacs_setup( iam, nprocs )
468 CALL blacs_get( -1, 0, ictxt )
469 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
473 eps = pdlamch( ictxt,
'eps' )
475 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, thresh, 1, 0, 0 )
476 CALL igebr2d( ictxt,
'All',
' ', 1, 1, i, 1, 0, 0 )
477 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
491 IF( work( i ) .EQ. 1 )
THEN
498 i = nmat + nbw + nnb + nnr + nnbr + 2*ngrids
500 CALL igebr2d( ictxt,
'All',
' ', 1, i, work, 1, 0, 0 )
502 CALL icopy( nmat, work( i ), 1, nval, 1 )
504 CALL icopy( nbw, work( i ), 1, bwval, 1 )
506 CALL icopy( nnb, work( i ), 1, nbval, 1 )
508 CALL icopy( nnr, work( i ), 1, nrval, 1 )
510 CALL icopy( nnbr, work( i ), 1, nbrval, 1 )
512 CALL icopy( ngrids, work( i ), 1, pval, 1 )
514 CALL icopy( ngrids, work( i ), 1, qval, 1 )
518 CALL blacs_gridexit( ictxt )
522 20
WRITE( nout, fmt = 9993 )
524 IF( nout.NE.6 .AND. nout.NE.0 )
527 CALL blacs_abort( ictxt, 1 )
531 9998
FORMAT(
'Routines pass computational tests if scaled residual ',
532 $
'is less than ', g12.5 )
533 9997
FORMAT(
' ', 10i6 )
534 9996
FORMAT( 2x, a5,
': ', 10i6 )
535 9995
FORMAT(
'Relative machine precision (eps) is taken to be ',
537 9994
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
539 9993
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )