SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
pcsepdriver.f
Go to the documentation of this file.
1*
2*
3 PROGRAM pcsepdriver
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 COMPLEX Hermitian 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* to discover what the maximum value you can set MEMSIZ to may be
15* required.
16* All arrays used by factorization and solve are allocated out of
17* big array called MEM.
18*
19* The full tester requires approximately (5 n + 5 n^2/p + slop)
20* COMPLEX words and 6*n integer words.
21* So, TOTMEM should be set to at least 1.1 * 8 * (5n + 5n^2/p)
22*
23* WHAT WE TEST
24* ============
25*
26* This routine tests PCHEEVX, the expert driver for the parallel
27* Hermitian eigenvalue problem. We would like to cover all
28* possible combinations of: matrix size, process configuration
29* (nprow and npcol), block size (nb), matrix type (??), range
30* of eigenvalue (all, by value, by position), sorting options,
31* and upper vs. lower storage.
32*
33* We intend to provide two types of test input files, an
34* installation test and a thorough test.
35*
36* We also intend that the reports be meaningful. Our input file
37* will allow multiple requests where each request is a cross product
38* of the following sets:
39* matrix sizes: n
40* process configuration triples: nprow, npcol, nb
41* matrix types:
42* eigenvalue requests: all, by value, by position
43* storage (upper vs. lower): uplo
44*
45* TERMS:
46* Request - means a set of tests, which is the cross product of
47* a set of specifications from the input file.
48* Test - one element in the cross product, i.e. a specific input
49* size and type, process configuration, etc.
50*
51* .. Parameters ..
52*
53 INTEGER totmem, cplxsz, nin
54 parameter( totmem = 2000000, cplxsz = 8, nin = 11 )
55 INTEGER memsiz
56 parameter( memsiz = totmem / cplxsz )
57* ..
58* .. Local Scalars ..
59 CHARACTER hetero
60 CHARACTER*80 summry, usrinfo
61 INTEGER context, iam, info, isieee, maxnodes, nnocheck,
62 $ nout, npassed, nprocs, nskipped, ntests
63* ..
64* .. Local Arrays ..
65*
66 INTEGER iseed( 4 )
67 COMPLEX mem( memsiz )
68* ..
69* .. External Functions ..
70 REAL slamch
71 EXTERNAL slamch
72* ..
73* .. External Subroutines ..
74*
75 EXTERNAL blacs_exit, blacs_get, blacs_gridexit,
76 $ blacs_gridinit, blacs_pinfo, blacs_setup,
77 $ igamn2d, pcsepreq, pslachkieee, pslasnbt
78* ..
79* .. Executable Statements ..
80*
81* Get starting information
82*
83 CALL blacs_pinfo( iam, nprocs )
84*
85*
86 IF( iam.EQ.0 ) THEN
87*
88* Open file and skip data file header
89*
90 OPEN( unit = nin, file = 'SEP.dat', status = 'OLD' )
91 READ( nin, fmt = * )summry
92 summry = ' '
93*
94* Read in user-supplied info about machine type, compiler, etc.
95*
96 READ( nin, fmt = 9999 )usrinfo
97*
98* Read name and unit number for summary output file
99*
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
106 END IF
107*
108 IF( nprocs.LT.1 ) THEN
109 CALL blacs_setup( iam, maxnodes )
110 nprocs = maxnodes
111 END IF
112*
113 CALL blacs_get( -1, 0, context )
114 CALL blacs_gridinit( context, 'R', 1, nprocs )
115*
116 CALL pslasnbt( isieee )
117*
118 CALL igamn2d( context, 'a', ' ', 1, 1, isieee, 1, 1, 1, -1, -1,
119 $ 0 )
120*
121 IF( ( isieee.NE.0 ) ) THEN
122 IF( iam.EQ.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 )
132 END IF
133*
134 CALL pslachkieee( isieee, slamch( 'O' ), slamch( 'U' ) )
135*
136 CALL igamn2d( context, 'a', ' ', 1, 1, isieee, 1, 1, 1, -1, -1,
137 $ 0 )
138*
139 IF( isieee.EQ.0 ) THEN
140 IF( iam.EQ.0 ) THEN
141 WRITE( nout, fmt = 9989 )
142 WRITE( nout, fmt = 9988 )
143 WRITE( nout, fmt = 9987 )
144 END IF
145 GO TO 20
146 END IF
147*
148 IF( iam.EQ.0 ) THEN
149 WRITE( nout, fmt = 9986 )
150 END IF
151*
152 END IF
153 IF( iam.EQ.0 ) THEN
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 ' //
172 $ 'of the matrix A.'
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 ' //
191 $ '(see pCSEPtst).f'
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 )' '
204 END IF
205*
206 ntests = 0
207 npassed = 0
208 nskipped = 0
209 nnocheck = 0
210*
211 IF( iam.EQ.0 ) THEN
212 WRITE( nout, fmt = 9979 )
213 WRITE( nout, fmt = 9978 )
214 END IF
215*
216 10 CONTINUE
217*
218 iseed( 1 ) = 139
219 iseed( 2 ) = 1139
220 iseed( 3 ) = 2139
221 iseed( 4 ) = 3139
222*
223 CALL pcsepreq( nin, mem, memsiz, nout, iseed, ntests, nskipped,
224 $ nnocheck, npassed, info )
225 IF( info.EQ.0 )
226 $ GO TO 10
227*
228 IF( iam.EQ.0 ) THEN
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 -
234 $ nnocheck
235 WRITE( nout, fmt = * )
236 WRITE( nout, fmt = * )
237 WRITE( nout, fmt = 9980 )
238 END IF
239*
240* Uncomment this line on SUN systems to avoid the useless print out
241*
242* CALL IEEE_FLAGS( 'clear', 'exception', 'underflow', '')
243*
244*
245*
246 20 CONTINUE
247 IF( iam.EQ.0 ) THEN
248 CLOSE ( nin )
249 IF( nout.NE.6 .AND. nout.NE.0 )
250 $ CLOSE ( nout )
251 END IF
252*
253 CALL blacs_gridexit( context )
254*
255 CALL blacs_exit( 0 )
256 stop
257*
258*
259 9999 FORMAT( a )
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.' )
272*
273 9986 FORMAT( ' Your system appears to handle ieee overflow.' )
274*
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 ',
282 $ ' CHK QTQ CHECK' )
283 9978 FORMAT( ' ----- --- --- --- --- --- -------- --------',
284 $ ' --------- --------- -----' )
285*
286* End of PCSEPDRIVER
287*
288 END
program pcsepdriver
Definition pcsepdriver.f:3
subroutine pcsepreq(nin, mem, memsize, nout, iseed, ntests, nskipped, nnocheck, npassed, info)
Definition pcsepreq.f:5
real function slamch(cmach)
Definition tools.f:867