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, nnocheck,
62 $ nout, npassed, nprocs, nskipped, ntests
75 EXTERNAL blacs_exit, blacs_get, blacs_gridexit,
76 $ blacs_gridinit, blacs_pinfo, blacs_setup,
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 )
114 CALL blacs_gridinit( context,
'R', 1, nprocs )
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 )
176 $
'Q : The number of process columns.'
177 WRITE( nout, fmt = 9999 )
178 $
'NB : The size of the square blocks' //
179 $
' the matrix A is split into.'
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, fmt = 9999 )
'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 )
253 CALL blacs_gridexit( context )
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 $
' --------- --------- -----' )