45 INTEGER totmem, realsz, nin
46 parameter( totmem = 100000000, realsz = 4, nin = 11 )
48 parameter( memsiz = totmem / realsz )
52 CHARACTER*80 summry, usrinfo
53 INTEGER context, iam, info, isieee, maxnodes, nnocheck,
54 $ nout, npassed, nprocs, nskipped, ntests
69 $ igamn2d, pslachkieee, pslasnbt,
psseprreq
75 CALL blacs_pinfo( iam, nprocs )
82 OPEN( unit = nin, file =
'SEPR.dat', status =
'OLD' )
83 READ( nin, fmt = * )summry
88 READ( nin, fmt = 9999 )usrinfo
92 READ( nin, fmt = * )summry
93 READ( nin, fmt = * )nout
94 IF( nout.NE.0 .AND. nout.NE.6 )
95 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
96 READ( nin, fmt = * )maxnodes
97 READ( nin, fmt = * )hetero
100 IF( nprocs.LT.1 )
THEN
101 CALL blacs_setup( iam, maxnodes )
105 CALL blacs_get( -1, 0, context )
108 CALL pslasnbt( isieee )
110 CALL igamn2d( context,
'a',
' ', 1, 1, isieee, 1, 1, 1, -1, -1,
113 IF( ( isieee.NE.0 ) )
THEN
115 WRITE( nout, fmt = 9997 )
116 WRITE( nout, fmt = 9996 )
117 WRITE( nout, fmt = 9995 )
120 CALL pslachkieee( isieee,
slamch(
'O' ),
slamch(
'U' ) )
122 CALL igamn2d( context,
'a',
' ', 1, 1, isieee, 1, 1, 1, -1, -1,
125 IF( isieee.EQ.0 )
THEN
130 WRITE( nout, fmt = 9986 )
136 WRITE( nout, fmt = 9999 )
137 $
'Test ScaLAPACK symmetric eigendecomposition routine.'
138 WRITE( nout, fmt = 9999 )usrinfo
139 WRITE( nout, fmt = 9999 )
' '
140 WRITE( nout, fmt = 9999 )
'Running tests of the parallel ' //
141 $
'symmetric eigenvalue routine: PSSYEVR.'
142 WRITE( nout, fmt = 9999 )
'The following scaled residual ' //
143 $
'checks will be computed:'
144 WRITE( nout, fmt = 9999 )
' ||AQ - QL|| ' //
145 $
'/ ((abstol + ||A|| * eps) * N)'
146 WRITE( nout, fmt = 9999 )
' ||Q^T*Q - I|| ' //
'/ (N * eps)'
147 WRITE( nout, fmt = 9999 )
148 WRITE( nout, fmt = 9999 )
'An explanation of the ' //
149 $
'input/output parameters follows:'
150 WRITE( nout, fmt = 9999 )
'RESULT : passed; or ' //
151 $ 'an indication of which eigen request test failed
'
152 WRITE( NOUT, FMT = 9999 )
153 $ 'n :
the number of rows and columns
' //
155 WRITE( NOUT, FMT = 9999 )
156 $ 'p :
the number of process rows.
'
157 WRITE( NOUT, FMT = 9999 )
158 $ 'q :
the number of process columns.
'
159 WRITE( NOUT, FMT = 9999 )
160 $ 'nb :
the size of
the square blocks
' //
162 WRITE( NOUT, FMT = 9999 )
163 $ 'thresh :
If a residual
value is less
' //
164 $ 'than thresh, result = passed.
'
165 WRITE( NOUT, FMT = 9999 )
166 $ 'typ : matrix
type (see ).
'
167 WRITE( NOUT, FMT = 9999 )'sub : subtests (y/n).
'
168 WRITE( NOUT, FMT = 9999 )'wall : wallclock time.
'
169 WRITE( NOUT, FMT = 9999 )'cpu : cpu time.
'
170 WRITE( NOUT, FMT = 9999 )'chk : ||aq - ql||
' //
171 $ '/ ((abstol + ||a|| * eps) * n)
'
172 WRITE( NOUT, FMT = 9999 )'qtq : ||q^t*q - i||/ (n * eps)
'
173 WRITE( NOUT, FMT = 9999 )
174 $ ' : when
the adjusted qtq
norm exceeds thresh
',
176 WRITE( NOUT, FMT = 9999 )
177 $ ' otherwise
the true qtq
norm is printed.
'
178 WRITE( NOUT, FMT = 9999 )
179 $ ' :
if more than one test is done, chk and qtq
'
180 WRITE( NOUT, FMT = 9999 )
181 $ ' are
the max over all eigentests performed.
'
182 WRITE( NOUT, FMT = 9999 )
183 $ 'test : evr - testing
pssyevr'
184 WRITE( NOUT, FMT = 9999 )' '
193 WRITE( NOUT, FMT = 9979 )
194 WRITE( NOUT, FMT = 9978 )
204 CALL PSSEPRREQ( HETERO, NIN, MEM, MEMSIZ, NOUT, ISEED, NTESTS,
205 $ NSKIPPED, NNOCHECK, NPASSED, INFO )
210 WRITE( NOUT, FMT = 9985 )NTESTS
211 WRITE( NOUT, FMT = 9984 )NPASSED
212 WRITE( NOUT, FMT = 9983 )NNOCHECK
213 WRITE( NOUT, FMT = 9982 )NSKIPPED
214 WRITE( NOUT, FMT = 9981 )NTESTS - NPASSED - NSKIPPED -
216 WRITE( NOUT, FMT = * )
217 WRITE( NOUT, FMT = * )
218 WRITE( NOUT, FMT = 9980 )
228.NE..AND..NE.
IF( NOUT6 NOUT0 )
232 CALL BLACS_GRIDEXIT( CONTEXT )
238 9997 FORMAT( 'check
if overflow is handled in ieee default manner.
' )
239 9996 FORMAT( 'if this is
the last output you see, you should assume
')
240 9995 FORMAT( 'that overflow caused a floating point exception.
' )
242 9986 FORMAT( 'test ok.
the system appears to handle ieee overflow.
' )
244 9985 FORMAT( 'finished
', I6, ' tests, with
the following results:
' )
245 9984 FORMAT( I5, ' tests completed and passed residual checks.
' )
246 9983 FORMAT( I5, ' tests completed without checking.
' )
247 9982 FORMAT( I5, ' tests skipped
for lack of memory.
' )
248 9981 FORMAT( I5, ' tests completed and failed.
' )
249 9980 FORMAT( 'end of tests.
' )
250 9979 FORMAT( ' n nb p q typ sub wall cpu
',
251 $ ' chk qtq check test
' )
252 9978 FORMAT( ' ----- --- --- --- --- --- -------- --------
',
253 $ ' --------- --------- ----- ----
' )
if(complex_arithmetic) id
end diagonal values have been computed in the(sparse) matrix id.SOL
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB
real function slamch(cmach)
SLAMCH
subroutine blacs_gridinit(cntxt, c, nprow, npcol)
subroutine blacs_gridexit(cntxt)
for(i8=*sizetab-1;i8 >=0;i8--)
void split(mapping_t *, PORD_INT, PORD_INT, PORD_INT, PORD_INT *, PORD_INT *, FLOAT *, PORD_INT)
subroutine psseprreq(hetero, nin, mem, memsize, nout, iseed, ntests, nskipped, nnocheck, npassed, info)
subroutine pssyevr(jobz, range, uplo, n, a, ia, ja, desca, vl, vu, il, iu, m, nz, w, z, iz, jz, descz, work, lwork, iwork, liwork, info)