SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
pssepdriver.f
Go to the documentation of this file.
1*
2*
3 PROGRAM pssepdriver
4*
5* -- ScaLAPACK routine (version 1.7) --
6* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
7* and University of California, Berkeley.
8* May 1, 1997
9*
10* Parallel REAL symmetric eigenproblem test driver
11*
12* The user should modify TOTMEM to indicate the maximum amount of
13* memory in bytes her system has. Remember to leave room in memory
14* for operating system, the BLACS buffer, etc. INTSIZ and REALIZ
15* indicate the length in bytes on the given platform for an integer
16* and a double precision real.
17* For example, on our system with 8 MB of memory, TOTMEM=6500000
18* (leaves 1.5 MB for OS, code, BLACS buffer, etc), the length of a
19* REAL is 8, and an integer takes up 4 bytes. Some playing around
20* to discover what the maximum value you can set MEMSIZ to may be
21* required.
22* All arrays used by factorization and solve are allocated out of
23* big array called MEM.
24*
25* The full tester requires approximately (5 n + 5 n^2/p + slop)
26* REAL words and 6*n integer words.
27* So, TOTMEM should be set to at least 1.1 * 8 * (5n + 5n^2/p)
28*
29* WHAT WE TEST
30* ============
31*
32* This routine tests PSSYEVX, the expert driver for the parallel
33* symmetric eigenvalue problem, and PSSYEV. We would like to cover
34* all possible combinations of: matrix size, process configuration
35* (nprow and npcol), block size (nb), matrix type (??), range
36* of eigenvalue (all, by value, by position), sorting options,
37* and upper vs. lower storage.
38*
39* As PSSYEV returns an error message when heterogeneity is detected,
40* the PSSYEV tests can be suppressed by changing the appropiate
41* entry in the input file.
42*
43* We intend to provide two types of test input files, an
44* installation test and a thorough test.
45*
46* We also intend that the reports be meaningful. Our input file
47* will allow multiple requests where each request is a cross product
48* of the following sets:
49* matrix sizes: n
50* process configuration triples: nprow, npcol, nb
51* matrix types:
52* eigenvalue requests: all, by value, by position
53* storage (upper vs. lower): uplo
54*
55* TERMS:
56* Request - means a set of tests, which is the cross product of
57* a set of specifications from the input file.
58* Test - one element in the cross product, i.e. a specific input
59* size and type, process configuration, etc.
60*
61* .. Parameters ..
62*
63 INTEGER totmem, realsz, nin
64 parameter( totmem = 2000000, realsz = 8, nin = 11 )
65 INTEGER memsiz
66 parameter( memsiz = totmem / realsz )
67* ..
68* .. Local Scalars ..
69 CHARACTER hetero
70 CHARACTER*80 summry, usrinfo
71 INTEGER context, iam, info, isieee, maxnodes, nnocheck,
72 $ nout, npassed, nprocs, nskipped, ntests
73* ..
74* .. Local Arrays ..
75*
76 INTEGER iseed( 4 )
77 REAL mem( memsiz )
78* ..
79* .. External Functions ..
80 REAL slamch
81 EXTERNAL slamch
82* ..
83* .. External Subroutines ..
84*
85 EXTERNAL blacs_exit, blacs_get, blacs_gridexit,
86 $ blacs_gridinit, blacs_pinfo, blacs_setup,
87 $ igamn2d, pslachkieee, pslasnbt, pssepreq
88* ..
89* .. Executable Statements ..
90*
91* Get starting information
92*
93 CALL blacs_pinfo( iam, nprocs )
94*
95*
96 IF( iam.EQ.0 ) THEN
97*
98* Open file and skip data file header
99*
100 OPEN( unit = nin, file = 'SEP.dat', status = 'OLD' )
101 READ( nin, fmt = * )summry
102 summry = ' '
103*
104* Read in user-supplied info about machine type, compiler, etc.
105*
106 READ( nin, fmt = 9999 )usrinfo
107*
108* Read name and unit number for summary output file
109*
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
116 END IF
117*
118 IF( nprocs.LT.1 ) THEN
119 CALL blacs_setup( iam, maxnodes )
120 nprocs = maxnodes
121 END IF
122*
123 CALL blacs_get( -1, 0, context )
124 CALL blacs_gridinit( context, 'R', 1, nprocs )
125*
126 CALL pslasnbt( isieee )
127*
128 CALL igamn2d( context, 'a', ' ', 1, 1, isieee, 1, 1, 1, -1, -1,
129 $ 0 )
130*
131 IF( ( isieee.NE.0 ) ) THEN
132 IF( iam.EQ.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 )
142 END IF
143*
144 CALL pslachkieee( isieee, slamch( 'O' ), slamch( 'U' ) )
145*
146 CALL igamn2d( context, 'a', ' ', 1, 1, isieee, 1, 1, 1, -1, -1,
147 $ 0 )
148*
149 IF( isieee.EQ.0 ) THEN
150 IF( iam.EQ.0 ) THEN
151 WRITE( nout, fmt = 9989 )
152 WRITE( nout, fmt = 9988 )
153 WRITE( nout, fmt = 9987 )
154 END IF
155 GO TO 20
156 END IF
157*
158 IF( iam.EQ.0 ) THEN
159 WRITE( nout, fmt = 9986 )
160 END IF
161*
162 END IF
163*
164 IF( iam.EQ.0 ) THEN
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: PSSYEVX & PSSYEV & ' //
171 $ ' PSSYEVD.'
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 ' //
184 $ 'of the matrix A.'
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' //
191 $ ' the matrix A is split into.'
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.'
200 WRITE( nout, fmt = 9999 )
201 $ 'TYP : matrix type (see PSSEPtst.f).'
202 WRITE( nout, fmt = 9999 )'SUB : Subtests ' //
203 $ '(see PSSEPtst).f'
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 PSSYEVX, EV - testing PSSYEV'
217 WRITE( nout, fmt = 9999 )' '
218 END IF
219*
220 ntests = 0
221 npassed = 0
222 nskipped = 0
223 nnocheck = 0
224*
225 IF( iam.EQ.0 ) THEN
226 WRITE( nout, fmt = 9979 )
227 WRITE( nout, fmt = 9978 )
228 END IF
229*
230 10 CONTINUE
231*
232 iseed( 1 ) = 1454
233 iseed( 2 ) = 3834
234 iseed( 3 ) = 2203
235 iseed( 4 ) = 583
236*
237 CALL pssepreq( hetero, nin, mem, memsiz, nout, iseed, ntests,
238 $ nskipped, nnocheck, npassed, info )
239 IF( info.EQ.0 )
240 $ GO TO 10
241*
242 IF( iam.EQ.0 ) THEN
243 WRITE( nout, fmt = 9985 )ntests
244 WRITE( nout, fmt = 9984 )npassed
245 WRITE( nout, fmt = 9983 )nnocheck
246 WRITE( nout, fmt = 9982 )nskipped
247 WRITE( nout, fmt = 9981 )ntests - npassed - nskipped -
248 $ nnocheck
249 WRITE( nout, fmt = * )
250 WRITE( nout, fmt = * )
251 WRITE( nout, fmt = 9980 )
252 END IF
253*
254* Uncomment this line on SUN systems to avoid the useless print out
255*
256* CALL IEEE_FLAGS( 'clear', 'exception', 'underflow', '')
257*
258*
259*
260 20 CONTINUE
261 IF( iam.EQ.0 ) THEN
262 CLOSE ( nin )
263 IF( nout.NE.6 .AND. nout.NE.0 )
264 $ CLOSE ( nout )
265 END IF
266*
267 CALL blacs_gridexit( context )
268*
269 CALL blacs_exit( 0 )
270 stop
271*
272*
273 9999 FORMAT( a )
274 9998 FORMAT( ' I am about to check to make sure that overflow' )
275 9997 FORMAT( ' is handled in the ieee default manner. If this' )
276 9996 FORMAT( ' is the last output you see, you should assume' )
277 9995 FORMAT( ' that overflow caused a floating point exception.' )
278 9994 FORMAT( ' In that case, we recommend that you add -DNO_IEEE' )
279 9993 FORMAT( ' to the CDEFS line in SLmake.inc.' )
280 9992 FORMAT( ' Alternatively, you could set CDEFS in SLmake.inc ' )
281 9991 FORMAT( ' to enable the default ieee behaviour, However, this' )
282 9990 FORMAT( ' may result in good or very bad performance.' )
283 9989 FORMAT( ' Either signed zeroes or signed infinities ' )
284 9988 FORMAT( ' work incorrectly or your system. Change your' )
285 9987 FORMAT( ' SLmake.inc as suggested above.' )
286*
287 9986 FORMAT( ' Your system appears to handle ieee overflow.' )
288*
289 9985 FORMAT( 'Finished ', i6, ' tests, with the following results:' )
290 9984 FORMAT( i5, ' tests completed and passed residual checks.' )
291 9983 FORMAT( i5, ' tests completed without checking.' )
292 9982 FORMAT( i5, ' tests skipped for lack of memory.' )
293 9981 FORMAT( i5, ' tests completed and failed.' )
294 9980 FORMAT( 'END OF TESTS.' )
295 9979 FORMAT( ' N NB P Q TYP SUB WALL CPU ',
296 $ ' CHK QTQ CHECK TEST' )
297 9978 FORMAT( ' ----- --- --- --- --- --- -------- --------',
298 $ ' --------- --------- ----- ----' )
299*
300* End of PSSEPDRIVER
301*
302 END
program pssepdriver
Definition pssepdriver.f:3
subroutine pssepreq(hetero, nin, mem, memsize, nout, iseed, ntests, nskipped, nnocheck, npassed, info)
Definition pssepreq.f:5
real function slamch(cmach)
Definition tools.f:867