53 INTEGER totmem, cplxsz, nin
54 parameter( totmem = 2000000, cplxsz = 8, nin = 11 )
56 parameter( memsiz = totmem / cplxsz )
60 CHARACTER*80 summry, usrinfo
61 INTEGER context, iam, info, isieee, maxnodes, ,
62 $ nout, npassed, nprocs, nskipped, ntests
77 $ igamn2d,
pcsepreq, pslachkieee, pslasnbt
83 CALL blacs_pinfo( iam, nprocs )
90 OPEN( unit = nin, file =
'SEP.dat', status =
'OLD' )
91 READ( nin, fmt = * )summry
96 READ( nin, fmt = 9999 )usrinfo
100 READ( nin, fmt = * )summry
101 READ( nin, fmt = * )nout
102 IF( nout.NE.0 .AND. nout.NE.6 )
103 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
104 READ( nin, fmt = * )maxnodes
105 READ( nin, fmt = * )hetero
108 IF( nprocs.LT.1 )
THEN
109 CALL blacs_setup( iam, maxnodes )
113 CALL blacs_get( -1, 0, context )
116 CALL pslasnbt( isieee )
118 CALL igamn2d( context,
'a',
' ', 1, 1, isieee, 1, 1, 1, -1, -1,
121 IF( ( isieee.NE.0 ) )
THEN
123 WRITE( nout, fmt = 9998 )
124 WRITE( nout, fmt = 9997 )
125 WRITE( nout, fmt = 9996 )
126 WRITE( nout, fmt = 9995 )
127 WRITE( nout, fmt = 9994 )
128 WRITE( nout, fmt = 9993 )
129 WRITE( nout, fmt = 9992 )
130 WRITE( nout, fmt = 9991 )
131 WRITE( nout, fmt = 9990 )
134 CALL pslachkieee( isieee,
slamch(
'O' ),
slamch(
'U' ) )
136 CALL igamn2d( context,
'a',
' ', 1, 1, isieee, 1, 1, 1, -1, -1,
139 IF( isieee.EQ.0 )
THEN
141 WRITE( nout, fmt = 9989 )
142 WRITE( nout, fmt = 9988 )
143 WRITE( nout, fmt = 9987 )
149 WRITE( nout, fmt = 9986 )
154 WRITE( nout, fmt = 9999 )
155 $
'SCALAPACK Hermitian Eigendecomposition routines.'
156 WRITE( nout, fmt = 9999 )usrinfo
157 WRITE( nout, fmt = 9999 )
' '
158 WRITE( nout, fmt = 9999 )
'Running tests of the parallel ' //
159 $
'Hermitian eigenvalue routine: PCHEEVX.'
160 WRITE( nout, fmt = 9999 )'
the following scaled residual
' //
161 $ 'checks will be computed:
'
162 WRITE( NOUT, FMT = 9999 )' ||aq - ql||
' //
163 $ '/ ((abstol + ||a|| * eps) * n)
'
164 WRITE( NOUT, FMT = 9999 )' ||q^t*q - i||
' // '/ (n * eps)
'
165 WRITE( NOUT, FMT = 9999 )
166 WRITE( NOUT, FMT = 9999 )'an explanation of
the ' //
167 $ 'input/output parameters follows:
'
168 WRITE( NOUT, FMT = 9999 )'result : passed; or
' //
169 $ 'an indication of which eigen request test failed
'
170 WRITE( NOUT, FMT = 9999 )
171 $ 'n :
the number of rows and columns
' //
173 WRITE( NOUT, FMT = 9999 )
174 $ 'p :
the number of process rows.
'
175 WRITE( NOUT, FMT = 9999 )
177 WRITE( NOUT, FMT = 9999 )
178 $ 'nb :
the size of
the square blocks
' //
180 WRITE( NOUT, FMT = 9999 )
181 $ 'thresh :
If a residual
value is less
' //
182 $ 'than thresh, result is flagged as passed.
'
183 WRITE( NOUT, FMT = 9999 )
184 $ ' :
the qtq
norm is allowed to exceed thresh
' //
185 $ ' for those eigenvectors
'
186 WRITE( NOUT, FMT = 9999 )' : which could not be
' //
187 $ 'reorthogonalized
for lack of workspace.
'
188 WRITE( NOUT, FMT = 9999 )
189 $ 'typ : matrix
type (see
pcseptst.f).'
190 WRITE( nout, fmt = 9999 )
'SUB : Subtests ' //
192 WRITE( nout, fmt = 9999 )
'CHK : ||AQ - QL|| ' //
193 $
'/ ((abstol + ||A|| * eps) * N)'
194 WRITE( nout
'QTQ : ||Q^T*Q - I||/ (N * eps)'
195 WRITE( nout, fmt = 9999 )
196 $
' : when the adjusted QTQ exceeds THRESH',
197 $
' the adjusted QTQ norm is printed'
198 WRITE( nout, fmt = 9999 )
199 $
' : otherwise the true QTQ norm is printed'
200 WRITE( nout, fmt = 9999 )
201 $
'If NT>1, CHK and QTQ are the max over all ' //
202 $
'eigen request tests'
203 WRITE( nout, fmt = 9999 )
' '
212 WRITE( nout, fmt = 9979 )
213 WRITE( nout, fmt = 9978 )
223 CALL pcsepreq( nin, mem, memsiz, nout, iseed, ntests, nskipped,
224 $ nnocheck, npassed, info )
229 WRITE( nout, fmt = 9985 )ntests
230 WRITE( nout, fmt = 9984 )npassed
231 WRITE( nout, fmt = 9983 )nnocheck
232 WRITE( nout, fmt = 9982 )nskipped
233 WRITE( nout, fmt = 9981 )ntests - npassed - nskipped -
235 WRITE( nout, fmt = * )
236 WRITE( nout, fmt = * )
237 WRITE( nout, fmt = 9980 )
249 IF( nout.NE.6 .AND. nout.NE.0 )
260 9998
FORMAT(
' I am about to check to make sure that overflow' )
261 9997
FORMAT(
' is handled in the ieee default manner. If this' )
262 9996
FORMAT(
' is the last output you see, you should assume' )
263 9995
FORMAT(
' that overflow caused a floating point exception.' )
264 9994
FORMAT(
' In that case, we recommend that you add -DNO_IEEE' )
265 9993
FORMAT(
' to the CDEFS line in SLmake.inc.' )
266 9992
FORMAT(
' Alternatively, you could set CDEFS in SLmake.inc ' )
267 9991
FORMAT(
' to enable the default ieee behaviour, However, this' )
268 9990
FORMAT(
' may result in good or very bad performance.' )
269 9989
FORMAT(
' Either signed zeroes or signed infinities ' )
270 9988
FORMAT(
' work incorrectly or your system. Change your' )
271 9987
FORMAT(
' SLmake.inc as suggested above.' )
273 9986
FORMAT(
' Your system appears to handle ieee overflow.' )
275 9985
FORMAT(
'Finished ', i6,
' tests, with the following results:' )
276 9984
FORMAT( i5,
' tests completed and passed residual checks.' )
277 9983
FORMAT( i5,
' tests completed without checking.' )
278 9982
FORMAT( i5,
' tests skipped for lack of memory.' )
279 9981
FORMAT( i5,
' tests completed and failed.' )
280 9980
FORMAT(
'END OF TESTS.' )
281 9979
FORMAT(
' N NB P Q TYP SUB WALL CPU ',
283 9978
FORMAT(
' ----- --- --- --- --- --- -------- --------',
284 $
' --------- --------- -----' )
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--)
subroutine pcsepreq(nin, mem, memsize, nout, iseed, ntests, nskipped, nnocheck, npassed, info)
subroutine pcseptst(desca, uplo, n, mattype, subtests, thresh, order, abstol, iseed, a, copya, z, lda, win, wnew, ifail, iclustr, gap, iprepad, ipostpad, work, lwork, rwork, lrwork, iwork, liwork, nout, info)
void split(mapping_t *, PORD_INT, PORD_INT, PORD_INT, PORD_INT *, PORD_INT *, FLOAT *, PORD_INT)