1 SUBROUTINE pdscaexinfo( SUMMRY, NOUT, N, NRHS, NB, NPROW, NPCOL,
15 CHARACTER*( * ) SUMMRY
16 INTEGER IAM, N, NRHS, NB, NOUT, NPCOL, NPROCS, NPROW
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 )
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.NE..AND..NE.
IF( NOUT6 NOUT0 )
167 CALL BLACS_ABORT( ICTXT, 1 )
172 9998 FORMAT( 2X, A5, ' :
', I6 )
173 9997 FORMAT( ' illegal input in file
',40A,'. aborting run.
' )
subroutine pdscaexinfo(summry, nout, n, nrhs, nb, nprow, npcol, work, iam, nprocs)