1 SUBROUTINE pdscaexinfo( SUMMRY, NOUT, N, NRHS, NB, NPROW, NPCOL,
15 CHARACTER*( * ) SUMMRY
16 INTEGER IAM, N, NRHS, NB, NOUT, NPCOL, NPROCS, NPROW
33 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
34 $ blacs_gridinit, blacs_setup, igebr2d, igebs2d
45 OPEN( nin, file=
'SCAEX.dat', status=
'OLD' )
46 READ( nin, fmt = * ) summry
51 READ( nin, fmt = 9999 ) usrinfo
55 READ( nin, fmt = * ) summry
56 READ( nin, fmt = * ) nout
57 IF( nout.NE.0 .AND. nout.NE.6 )
58 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
64 READ( nin, fmt = * ) n
65 READ( nin, fmt = * ) nrhs
69 READ( nin, fmt = * ) nb
73 READ( nin, fmt = * ) nprow
74 READ( nin, fmt = * ) npcol
82 IF( nprocs.LT.1 )
THEN
83 nprocs = nprow * npcol
84 CALL blacs_setup( iam, nprocs )
90 CALL blacs_get( -1, 0, ictxt )
91 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
100 CALL igebs2d( ictxt,
'All',
' ', 5, 1, work, 5 )
104 WRITE( nout, fmt = 9999 )
105 $
'SCALAPACK example driver.'
106 WRITE( nout, fmt = 9999 ) usrinfo
107 WRITE( nout, fmt = * )
108 WRITE( nout, fmt = 9999 )
109 $
'The matrices A and B are read from '//
111 WRITE( nout, fmt = * )
112 WRITE( nout, fmt = 9999 )
113 $
'An explanation of the input/output '//
114 $
'parameters follows:'
116 WRITE( nout, fmt = 9999 )
117 $
'N : The order of the matrix A.'
118 WRITE( nout, fmt = 9999 )
119 $
'NRHS : The number of right and sides.'
120 WRITE( nout, fmt = 9999 )
121 $
'NB : The size of the square blocks the'//
122 $
' matrices A and B are split into.'
123 WRITE( nout, fmt = 9999 )
124 $
'P : The number of process rows.'
125 WRITE( nout, fmt = 9999 )
126 $
'Q : The number of process columns.'
127 WRITE( nout, fmt = * )
128 WRITE( nout, fmt = 9999 )
129 $
'The following parameter values will be used:'
130 WRITE( nout, fmt = 9998 )
'N ', n
131 WRITE( nout, fmt = 9998 )
'NRHS ', nrhs
132 WRITE( nout, fmt = 9998 )
'NB ', nb
133 WRITE( nout, fmt = 9998 )
'P ', nprow
134 WRITE( nout, fmt = 9998 )
'Q ', npcol
135 WRITE( nout, fmt = * )
142 $
CALL blacs_setup( iam, nprocs )
147 CALL blacs_get( -1, 0, ictxt )
148 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
150 CALL igebr2d( ictxt,
'All',
' ', 5, 1, work, 5, 0, 0 )
159 CALL blacs_gridexit( ictxt )
163 20
WRITE( nout, fmt = 9997 )
165 IF( nout.NE.6 .AND. nout.NE.0 )
167 CALL blacs_abort( ictxt, 1 )
172 9998
FORMAT( 2x, a5,
' : ', i6 )
173 9997
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )