PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
aladhd.f
Go to the documentation of this file.
1  SUBROUTINE aladhd( IOUNIT, PATH )
2 *
3 * -- LAPACK test routine (version 3.1) --
4 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
5 * November 2006
6 *
7 * .. Scalar Arguments ..
8  CHARACTER*3 path
9  INTEGER iounit
10 * ..
11 *
12 * Purpose
13 * =======
14 *
15 * ALADHD prints header information for the driver routines test paths.
16 *
17 * Arguments
18 * =========
19 *
20 * IOUNIT (input) INTEGER
21 * The unit number to which the header information should be
22 * printed.
23 *
24 * PATH (input) CHARACTER*3
25 * The name of the path for which the header information is to
26 * be printed. Current paths are
27 * _GE: General matrices
28 * _GB: General band
29 * _GT: General Tridiagonal
30 * _PO: Symmetric or Hermitian positive definite
31 * _PS: Symmetric or Hermitian positive semi-definite
32 * _PP: Symmetric or Hermitian positive definite packed
33 * _PB: Symmetric or Hermitian positive definite band
34 * _PT: Symmetric or Hermitian positive definite tridiagonal
35 * _SY: Symmetric indefinite
36 * _SP: Symmetric indefinite packed
37 * _HE: (complex) Hermitian indefinite
38 * _HP: (complex) Hermitian indefinite packed
39 * The first character must be one of S, D, C, or Z (C or Z only
40 * if complex).
41 *
42 * .. Local Scalars ..
43  LOGICAL corz, sord
44  CHARACTER c1, c3
45  CHARACTER*2 p2
46  CHARACTER*9 sym
47 * ..
48 * .. External Functions ..
49  LOGICAL lsame, lsamen
50  EXTERNAL lsame, lsamen
51 * ..
52 * .. Executable Statements ..
53 *
54  IF( iounit.LE.0 )
55  $ return
56  c1 = path( 1: 1 )
57  c3 = path( 3: 3 )
58  p2 = path( 2: 3 )
59  sord = lsame( c1, 'S' ) .OR. lsame( c1, 'D' )
60  corz = lsame( c1, 'C' ) .OR. lsame( c1, 'Z' )
61  IF( .NOT.( sord .OR. corz ) )
62  $ return
63 *
64  IF( lsamen( 2, p2, 'GE' ) ) THEN
65 *
66 * GE: General dense
67 *
68  WRITE( iounit, fmt = 9999 )path
69  WRITE( iounit, fmt = '( '' Matrix types:'' )' )
70  WRITE( iounit, fmt = 9989 )
71  WRITE( iounit, fmt = '( '' Test ratios:'' )' )
72  WRITE( iounit, fmt = 9981 )1
73  WRITE( iounit, fmt = 9980 )2
74  WRITE( iounit, fmt = 9979 )3
75  WRITE( iounit, fmt = 9978 )4
76  WRITE( iounit, fmt = 9977 )5
77  WRITE( iounit, fmt = 9976 )6
78  WRITE( iounit, fmt = 9972 )7
79  WRITE( iounit, fmt = '( '' Messages:'' )' )
80 *
81  ELSE IF( lsamen( 2, p2, 'GB' ) ) THEN
82 *
83 * GB: General band
84 *
85  WRITE( iounit, fmt = 9998 )path
86  WRITE( iounit, fmt = '( '' Matrix types:'' )' )
87  WRITE( iounit, fmt = 9988 )
88  WRITE( iounit, fmt = '( '' Test ratios:'' )' )
89  WRITE( iounit, fmt = 9981 )1
90  WRITE( iounit, fmt = 9980 )2
91  WRITE( iounit, fmt = 9979 )3
92  WRITE( iounit, fmt = 9978 )4
93  WRITE( iounit, fmt = 9977 )5
94  WRITE( iounit, fmt = 9976 )6
95  WRITE( iounit, fmt = 9972 )7
96  WRITE( iounit, fmt = '( '' Messages:'' )' )
97 *
98  ELSE IF( lsamen( 2, p2, 'GT' ) ) THEN
99 *
100 * GT: General tridiagonal
101 *
102  WRITE( iounit, fmt = 9997 )path
103  WRITE( iounit, fmt = 9987 )
104  WRITE( iounit, fmt = '( '' Test ratios:'' )' )
105  WRITE( iounit, fmt = 9981 )1
106  WRITE( iounit, fmt = 9980 )2
107  WRITE( iounit, fmt = 9979 )3
108  WRITE( iounit, fmt = 9978 )4
109  WRITE( iounit, fmt = 9977 )5
110  WRITE( iounit, fmt = 9976 )6
111  WRITE( iounit, fmt = '( '' Messages:'' )' )
112 *
113  ELSE IF( lsamen( 2, p2, 'PO' ) .OR. lsamen( 2, p2, 'PP' )
114  $ .OR. lsamen( 2, p2, 'PS' ) ) THEN
115 *
116 * PO: Positive definite full
117 * PS: Positive definite full
118 * PP: Positive definite packed
119 *
120  IF( sord ) THEN
121  sym = 'Symmetric'
122  ELSE
123  sym = 'Hermitian'
124  END IF
125  IF( lsame( c3, 'O' ) ) THEN
126  WRITE( iounit, fmt = 9996 )path, sym
127  ELSE
128  WRITE( iounit, fmt = 9995 )path, sym
129  END IF
130  WRITE( iounit, fmt = '( '' Matrix types:'' )' )
131  WRITE( iounit, fmt = 9985 )path
132  WRITE( iounit, fmt = '( '' Test ratios:'' )' )
133  WRITE( iounit, fmt = 9975 )1
134  WRITE( iounit, fmt = 9980 )2
135  WRITE( iounit, fmt = 9979 )3
136  WRITE( iounit, fmt = 9978 )4
137  WRITE( iounit, fmt = 9977 )5
138  WRITE( iounit, fmt = 9976 )6
139  WRITE( iounit, fmt = '( '' Messages:'' )' )
140 *
141  ELSE IF( lsamen( 2, p2, 'PB' ) ) THEN
142 *
143 * PB: Positive definite band
144 *
145  IF( sord ) THEN
146  WRITE( iounit, fmt = 9994 )path, 'Symmetric'
147  ELSE
148  WRITE( iounit, fmt = 9994 )path, 'Hermitian'
149  END IF
150  WRITE( iounit, fmt = '( '' Matrix types:'' )' )
151  WRITE( iounit, fmt = 9984 )path
152  WRITE( iounit, fmt = '( '' Test ratios:'' )' )
153  WRITE( iounit, fmt = 9975 )1
154  WRITE( iounit, fmt = 9980 )2
155  WRITE( iounit, fmt = 9979 )3
156  WRITE( iounit, fmt = 9978 )4
157  WRITE( iounit, fmt = 9977 )5
158  WRITE( iounit, fmt = 9976 )6
159  WRITE( iounit, fmt = '( '' Messages:'' )' )
160 *
161  ELSE IF( lsamen( 2, p2, 'PT' ) ) THEN
162 *
163 * PT: Positive definite tridiagonal
164 *
165  IF( sord ) THEN
166  WRITE( iounit, fmt = 9993 )path, 'Symmetric'
167  ELSE
168  WRITE( iounit, fmt = 9993 )path, 'Hermitian'
169  END IF
170  WRITE( iounit, fmt = 9986 )
171  WRITE( iounit, fmt = '( '' Test ratios:'' )' )
172  WRITE( iounit, fmt = 9973 )1
173  WRITE( iounit, fmt = 9980 )2
174  WRITE( iounit, fmt = 9979 )3
175  WRITE( iounit, fmt = 9978 )4
176  WRITE( iounit, fmt = 9977 )5
177  WRITE( iounit, fmt = 9976 )6
178  WRITE( iounit, fmt = '( '' Messages:'' )' )
179 *
180  ELSE IF( lsamen( 2, p2, 'SY' ) .OR. lsamen( 2, p2, 'SP' ) ) THEN
181 *
182 * SY: Symmetric indefinite full
183 * SP: Symmetric indefinite packed
184 *
185  IF( lsame( c3, 'Y' ) ) THEN
186  WRITE( iounit, fmt = 9992 )path, 'Symmetric'
187  ELSE
188  WRITE( iounit, fmt = 9991 )path, 'Symmetric'
189  END IF
190  WRITE( iounit, fmt = '( '' Matrix types:'' )' )
191  IF( sord ) THEN
192  WRITE( iounit, fmt = 9983 )
193  ELSE
194  WRITE( iounit, fmt = 9982 )
195  END IF
196  WRITE( iounit, fmt = '( '' Test ratios:'' )' )
197  WRITE( iounit, fmt = 9974 )1
198  WRITE( iounit, fmt = 9980 )2
199  WRITE( iounit, fmt = 9979 )3
200  WRITE( iounit, fmt = 9977 )4
201  WRITE( iounit, fmt = 9978 )5
202  WRITE( iounit, fmt = 9976 )6
203  WRITE( iounit, fmt = '( '' Messages:'' )' )
204 *
205  ELSE IF( lsamen( 2, p2, 'HE' ) .OR. lsamen( 2, p2, 'HP' ) ) THEN
206 *
207 * HE: Hermitian indefinite full
208 * HP: Hermitian indefinite packed
209 *
210  IF( lsame( c3, 'E' ) ) THEN
211  WRITE( iounit, fmt = 9992 )path, 'Hermitian'
212  ELSE
213  WRITE( iounit, fmt = 9991 )path, 'Hermitian'
214  END IF
215  WRITE( iounit, fmt = '( '' Matrix types:'' )' )
216  WRITE( iounit, fmt = 9983 )
217  WRITE( iounit, fmt = '( '' Test ratios:'' )' )
218  WRITE( iounit, fmt = 9974 )1
219  WRITE( iounit, fmt = 9980 )2
220  WRITE( iounit, fmt = 9979 )3
221  WRITE( iounit, fmt = 9977 )4
222  WRITE( iounit, fmt = 9978 )5
223  WRITE( iounit, fmt = 9976 )6
224  WRITE( iounit, fmt = '( '' Messages:'' )' )
225 *
226  ELSE
227 *
228 * Print error message if no header is available.
229 *
230  WRITE( iounit, fmt = 9990 )path
231  END IF
232 *
233 * First line of header
234 *
235  9999 format( / 1x, a3, ' drivers: General dense matrices' )
236  9998 format( / 1x, a3, ' drivers: General band matrices' )
237  9997 format( / 1x, a3, ' drivers: General tridiagonal' )
238  9996 format( / 1x, a3, ' drivers: ', a9,
239  $ ' positive definite matrices' )
240  9995 format( / 1x, a3, ' drivers: ', a9,
241  $ ' positive definite packed matrices' )
242  9994 format( / 1x, a3, ' drivers: ', a9,
243  $ ' positive definite band matrices' )
244  9993 format( / 1x, a3, ' drivers: ', a9,
245  $ ' positive definite tridiagonal' )
246  9992 format( / 1x, a3, ' drivers: ', a9, ' indefinite matrices' )
247  9991 format( / 1x, a3, ' drivers: ', a9,
248  $ ' indefinite packed matrices' )
249  9990 format( / 1x, a3, ': No header available' )
250 *
251 * GE matrix types
252 *
253  9989 format( 4x, '1. Diagonal', 24x, '7. Last n/2 columns zero', / 4x,
254  $ '2. Upper triangular', 16x,
255  $ '8. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
256  $ '3. Lower triangular', 16x, '9. Random, CNDNUM = 0.1/EPS',
257  $ / 4x, '4. Random, CNDNUM = 2', 13x,
258  $ '10. Scaled near underflow', / 4x, '5. First column zero',
259  $ 14x, '11. Scaled near overflow', / 4x,
260  $ '6. Last column zero' )
261 *
262 * GB matrix types
263 *
264  9988 format( 4x, '1. Random, CNDNUM = 2', 14x,
265  $ '5. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
266  $ '2. First column zero', 15x, '6. Random, CNDNUM = 0.1/EPS',
267  $ / 4x, '3. Last column zero', 16x,
268  $ '7. Scaled near underflow', / 4x,
269  $ '4. Last n/2 columns zero', 11x, '8. Scaled near overflow' )
270 *
271 * GT matrix types
272 *
273  9987 format( ' Matrix types (1-6 have specified condition numbers):',
274  $ / 4x, '1. Diagonal', 24x, '7. Random, unspecified CNDNUM',
275  $ / 4x, '2. Random, CNDNUM = 2', 14x, '8. First column zero',
276  $ / 4x, '3. Random, CNDNUM = sqrt(0.1/EPS)', 2x,
277  $ '9. Last column zero', / 4x, '4. Random, CNDNUM = 0.1/EPS',
278  $ 7x, '10. Last n/2 columns zero', / 4x,
279  $ '5. Scaled near underflow', 10x,
280  $ '11. Scaled near underflow', / 4x,
281  $ '6. Scaled near overflow', 11x, '12. Scaled near overflow' )
282 *
283 * PT matrix types
284 *
285  9986 format( ' Matrix types (1-6 have specified condition numbers):',
286  $ / 4x, '1. Diagonal', 24x, '7. Random, unspecified CNDNUM',
287  $ / 4x, '2. Random, CNDNUM = 2', 14x,
288  $ '8. First row and column zero', / 4x,
289  $ '3. Random, CNDNUM = sqrt(0.1/EPS)', 2x,
290  $ '9. Last row and column zero', / 4x,
291  $ '4. Random, CNDNUM = 0.1/EPS', 7x,
292  $ '10. Middle row and column zero', / 4x,
293  $ '5. Scaled near underflow', 10x,
294  $ '11. Scaled near underflow', / 4x,
295  $ '6. Scaled near overflow', 11x, '12. Scaled near overflow' )
296 *
297 * PO, PP matrix types
298 *
299  9985 format( 4x, '1. Diagonal', 24x,
300  $ '6. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
301  $ '2. Random, CNDNUM = 2', 14x, '7. Random, CNDNUM = 0.1/EPS',
302  $ / 3x, '*3. First row and column zero', 7x,
303  $ '8. Scaled near underflow', / 3x,
304  $ '*4. Last row and column zero', 8x,
305  $ '9. Scaled near overflow', / 3x,
306  $ '*5. Middle row and column zero', / 3x,
307  $ '(* - tests error exits from ', a3,
308  $ 'TRF, no test ratios are computed)' )
309 *
310 * PB matrix types
311 *
312  9984 format( 4x, '1. Random, CNDNUM = 2', 14x,
313  $ '5. Random, CNDNUM = sqrt(0.1/EPS)', / 3x,
314  $ '*2. First row and column zero', 7x,
315  $ '6. Random, CNDNUM = 0.1/EPS', / 3x,
316  $ '*3. Last row and column zero', 8x,
317  $ '7. Scaled near underflow', / 3x,
318  $ '*4. Middle row and column zero', 6x,
319  $ '8. Scaled near overflow', / 3x,
320  $ '(* - tests error exits from ', a3,
321  $ 'TRF, no test ratios are computed)' )
322 *
323 * SSY, SSP, CHE, CHP matrix types
324 *
325  9983 format( 4x, '1. Diagonal', 24x,
326  $ '6. Last n/2 rows and columns zero', / 4x,
327  $ '2. Random, CNDNUM = 2', 14x,
328  $ '7. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
329  $ '3. First row and column zero', 7x,
330  $ '8. Random, CNDNUM = 0.1/EPS', / 4x,
331  $ '4. Last row and column zero', 8x,
332  $ '9. Scaled near underflow', / 4x,
333  $ '5. Middle row and column zero', 5x,
334  $ '10. Scaled near overflow' )
335 *
336 * CSY, CSP matrix types
337 *
338  9982 format( 4x, '1. Diagonal', 24x,
339  $ '7. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
340  $ '2. Random, CNDNUM = 2', 14x, '8. Random, CNDNUM = 0.1/EPS',
341  $ / 4x, '3. First row and column zero', 7x,
342  $ '9. Scaled near underflow', / 4x,
343  $ '4. Last row and column zero', 7x,
344  $ '10. Scaled near overflow', / 4x,
345  $ '5. Middle row and column zero', 5x,
346  $ '11. Block diagonal matrix', / 4x,
347  $ '6. Last n/2 rows and columns zero' )
348 *
349 * Test ratios
350 *
351  9981 format( 3x, i2, ': norm( L * U - A ) / ( N * norm(A) * EPS )' )
352  9980 format( 3x, i2, ': norm( B - A * X ) / ',
353  $ '( norm(A) * norm(X) * EPS )' )
354  9979 format( 3x, i2, ': norm( X - XACT ) / ',
355  $ '( norm(XACT) * CNDNUM * EPS )' )
356  9978 format( 3x, i2, ': norm( X - XACT ) / ',
357  $ '( norm(XACT) * (error bound) )' )
358  9977 format( 3x, i2, ': (backward error) / EPS' )
359  9976 format( 3x, i2, ': RCOND * CNDNUM - 1.0' )
360  9975 format( 3x, i2, ': norm( U'' * U - A ) / ( N * norm(A) * EPS )',
361  $ ', or', / 7x, 'norm( L * L'' - A ) / ( N * norm(A) * EPS )'
362  $ )
363  9974 format( 3x, i2, ': norm( U*D*U'' - A ) / ( N * norm(A) * EPS )',
364  $ ', or', / 7x, 'norm( L*D*L'' - A ) / ( N * norm(A) * EPS )'
365  $ )
366  9973 format( 3x, i2, ': norm( U''*D*U - A ) / ( N * norm(A) * EPS )',
367  $ ', or', / 7x, 'norm( L*D*L'' - A ) / ( N * norm(A) * EPS )'
368  $ )
369  9972 format( 3x, i2, ': abs( WORK(1) - RPVGRW ) /',
370  $ ' ( max( WORK(1), RPVGRW ) * EPS )' )
371 *
372  return
373 *
374 * End of ALADHD
375 *
376  END