63 INTEGER totmem, dblesz, nin
64 parameter( totmem = 2000000, dblesz = 8, nin = 11 )
66 parameter( memsiz = totmem / dblesz )
70 CHARACTER*80 summry, usrinfo
71 INTEGER context, iam, info, isieee, maxnodes, nnocheck,
72 $ nout, npassed, nprocs, nskipped
77 DOUBLE PRECISION mem( memsiz )
87 $ igamn2d, pdlachkieee, pdlasnbt,
pdsepreq
93 CALL blacs_pinfo( iam, nprocs )
100 OPEN( unit = nin, file =
'SEP.dat', status =
'OLD' )
101 READ( nin, fmt = * )summry
106 READ( nin, fmt = 9999 )usrinfo
110 READ( nin, fmt = * )summry
111 READ( nin, fmt = * )nout
112 IF( nout.NE.0 .AND. nout.NE.6 )
113 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
114 READ( nin, fmt = * )maxnodes
115 READ( nin, fmt = * )hetero
118 IF( nprocs.LT.1 )
THEN
119 CALL blacs_setup( iam, maxnodes )
123 CALL blacs_get( -1, 0, context )
126 CALL pdlasnbt( isieee )
128 CALL igamn2d( context,
'a',
' ', 1, 1, isieee, 1, 1, 1, -1, -1,
131 IF( ( isieee.NE.0 ) )
THEN
133 WRITE( nout, fmt = 9998 )
134 WRITE( nout, fmt = 9997 )
135 WRITE( nout, fmt = 9996 )
136 WRITE( nout, fmt = 9995 )
137 WRITE( nout, fmt = 9994 )
138 WRITE( nout, fmt = 9993 )
139 WRITE( nout, fmt = 9992 )
140 WRITE( nout, fmt = 9991 )
141 WRITE( nout, fmt = 9990 )
144 CALL pdlachkieee( isieee,
dlamch(
'O' ),
dlamch(
'U' ) )
146 CALL igamn2d( context,
'a',
' ', 1, 1, isieee, 1, 1, 1, -1, -1,
149 IF( isieee.EQ.0 )
THEN
151 WRITE( nout, fmt = 9989 )
152 WRITE( nout, fmt = 9988 )
153 WRITE( nout, fmt = 9987 )
159 WRITE( nout, fmt = 9986 )
165 WRITE( nout, fmt = 9999 )
166 $
'SCALAPACK symmetric Eigendecomposition routines.'
167 WRITE( nout, fmt = 9999 )usrinfo
168 WRITE( nout, fmt = 9999 )'
'
169 WRITE( NOUT, FMT = 9999 )'running tests of
the parallel
' //
170 $ 'symmetric eigenvalue routine:
pdsyevx'//
172 WRITE( NOUT, FMT = 9999 )'the following scaled residual
' //
173 $ 'checks will be computed:
'
174 WRITE( NOUT, FMT = 9999 )' ||aq - ql||
' //
175 $ '/ ((abstol + ||a|| * eps) * n)
'
176 WRITE( NOUT, FMT = 9999 )' ||q^t*q - i||
' // '/ (n * eps)
'
177 WRITE( NOUT, FMT = 9999 )
178 WRITE( NOUT, FMT = 9999 )'an explanation of
the ' //
179 $ 'input/output parameters follows:
'
180 WRITE( NOUT, FMT = 9999 )'result : passed; or
' //
181 $ 'an indication of which eigen request test failed
'
182 WRITE( NOUT, FMT = 9999 )
183 $ 'n :
the number of rows and columns
' //
185 WRITE( NOUT, FMT = 9999 )
186 $ 'p :
the number of process rows.
'
187 WRITE( NOUT, FMT = 9999 )
188 $ 'q :
the number of process columns.
'
189 WRITE( NOUT, FMT = 9999 )
190 $ 'nb :
the size of
the square blocks
' //
192 WRITE( NOUT, FMT = 9999 )
193 $ 'thresh :
If a residual
value is less
' //
194 $ 'than thresh, result is flagged as passed.
'
195 WRITE( NOUT, FMT = 9999 )
196 $ ' :
the qtq
norm is allowed to exceed thresh
' //
197 $ ' for those eigenvectors
'
198 WRITE( NOUT, FMT = 9999 )' : which could not be ' //
199 $
'reorthogonalized for lack of workspace.'
201 'TYP : matrix type (see PDSEPtst.f).'
202 WRITE( nout, fmt = 9999 )
'SUB : Subtests ' //
204 WRITE( nout, fmt = 9999 )
'CHK : ||AQ - QL|| ' //
205 $
'/ ((abstol + ||A|| * eps) * N)'
206 WRITE( nout, fmt = 9999 )
'QTQ : ||Q^T*Q - I||/ (N * eps)'
207 WRITE( nout, fmt = 9999 )
208 $
' : when the adjusted QTQ exceeds THRESH',
209 $
' the adjusted QTQ norm is printed'
210 WRITE( nout, fmt = 9999 )
211 $
' : otherwise the true QTQ norm is printed'
212 WRITE( nout, fmt = 9999 )
213 $
' If NT>1, CHK and QTQ are the max over all ' //
214 'eigen request tests'
215 WRITE( nout, fmt = 9999 )
216 $
'TEST : EVX - testing PDSYEVX, EV - testing PDSYEV, '//
217 $
'EVD - testing PDSYEVD'
218 WRITE( nout, fmt = 9999 )
' '
227 WRITE( nout, fmt = 9979 )
228 WRITE( nout, fmt = 9978 )
238 CALL pdsepreq( hetero, nin, mem, memsiz, nout, iseed, ntests,
239 $ nskipped, nnocheck, npassed, info )
244 WRITE( nout, fmt = 9985 )ntests
245 WRITE( nout, fmt = 9984 )npassed
246 WRITE( nout, fmt = 9983 )nnocheck
247 WRITE( nout, fmt = 9982 )nskipped
248 WRITE( nout, fmt = 9981 )ntests - npassed - nskipped -
250 WRITE( nout, fmt = * )
251 WRITE( nout, fmt = * )
252 WRITE( nout, fmt = 9980 )
264 IF( nout.NE.6 .AND. nout.NE.0 )
275 9998
FORMAT(
' I am about to check to make sure that overflow' )
276 9997
FORMAT(
' is handled in the ieee default manner. If this' )
277 9996
FORMAT(
' is the last output you see, you should assume' )
278 9995
FORMAT(
' that overflow caused a floating point exception.' )
279 9994
FORMAT(
' In that case, we recommend that you add -DNO_IEEE' )
280 9993
FORMAT(
' to the CDEFS line in SLmake.inc.' )
281 9992
FORMAT(
' Alternatively, you could set CDEFS in SLmake.inc ' )
282 9991
FORMAT(
' to enable the default ieee behaviour, However, this' )
283 9990
FORMAT(
' may result in good or very bad performance.' )
284 9989
FORMAT(
' Either signed zeroes or signed infinities ' )
285 9988
FORMAT(
' work incorrectly or your system. Change your' )
286 9987
FORMAT(
' SLmake.inc as suggested above.' )
288 9986
FORMAT(
' Your system appears to handle ieee overflow.' )
290 9985
FORMAT(
'Finished ', i6,
' tests, with the following results:' )
291 9984
FORMAT( i5,
' tests completed and passed residual checks.' )
292 9983
FORMAT( i5,
' tests completed without checking.' )
293 9982
FORMAT( i5,
' tests skipped for lack of memory.' )
294 9981
FORMAT( i5,
' tests completed and failed.' )
295 9980
FORMAT(
'END OF TESTS.' )
296 9979
FORMAT(
' N NB P Q TYP SUB WALL CPU ',
297 $
' CHK QTQ CHECK TEST' )
298 9978
FORMAT(
' ----- --- --- --- --- --- -------- --------',
299 $ ' --------- --------- ----- ----
' )
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
double precision function dlamch(cmach)
DLAMCH
subroutine blacs_gridinit(cntxt, c, nprow, npcol)
subroutine blacs_gridexit(cntxt)
for(i8=*sizetab-1;i8 >=0;i8--)
subroutine pdsepreq(hetero, nin, mem, memsize, nout, iseed, ntests, nskipped, nnocheck, npassed, info)
subroutine pdsyev(jobz, uplo, n, a, ia, ja, desca, w, z, iz, jz, descz, work, lwork, info)
subroutine pdsyevd(jobz, uplo, n, a, ia, ja, desca, w, z, iz, jz, descz, work, lwork, iwork, liwork, info)
subroutine pdsyevx(jobz, range, uplo, n, a, ia, ja, desca, vl, vu, il, iu, abstol, m, nz, w, orfac, z, iz, jz, descz, work, lwork, iwork, liwork, ifail, iclustr, gap, info)
void split(mapping_t *, PORD_INT, PORD_INT, PORD_INT, PORD_INT *, PORD_INT *, FLOAT *, PORD_INT)