1ZHESVXX(1) LAPACK driver routine (version 3.2)                      ZHESVXX(1)
2
3
4

NAME

6       ZHESVXX  -  ZHESVXX  use the diagonal pivoting factorization to compute
7       the  solution to a complex*16 system of linear equations A  *  X  =  B,
8       where   A  is  an  N-by-N  symmetric  matrix  and X and B are N-by-NRHS
9       matrices
10

SYNOPSIS

12       SUBROUTINE ZHESVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, EQUED,
13                           S, B, LDB, X, LDX, RCOND, RPVGRW, BERR, N_ERR_BNDS,
14                           ERR_BNDS_NORM,  ERR_BNDS_COMP,   NPARAMS,   PARAMS,
15                           WORK, RWORK, INFO )
16
17           IMPLICIT        NONE
18
19           CHARACTER       EQUED, FACT, UPLO
20
21           INTEGER         INFO,  LDA,  LDAF,  LDB,  LDX,  N,  NRHS,  NPARAMS,
22                           N_ERR_BNDS
23
24           DOUBLE          PRECISION RCOND, RPVGRW
25
26           INTEGER         IPIV( * )
27
28           COMPLEX*16      A( LDA, * ), AF( LDAF, * ), B( LDB, * ), WORK( * ),
29                           X( LDX, * )
30
31           DOUBLE          PRECISION  S( * ), PARAMS( * ), BERR( * ), RWORK( *
32                           ), ERR_BNDS_NORM( NRHS, * ), ERR_BNDS_COMP( NRHS, *
33                           )
34

PURPOSE

36          ZHESVXX uses the diagonal pivoting factorization to compute the
37          solution to a complex*16 system of linear equations A * X = B, where
38          A is an N-by-N symmetric matrix and X and B are N-by-NRHS
39          matrices.
40          If requested, both normwise and maximum componentwise error bounds
41          are returned. ZHESVXX will return a solution with a tiny
42          guaranteed error (O(eps) where eps is the working machine
43          precision) unless the matrix is very ill-conditioned, in which
44          case a warning is returned. Relevant condition numbers also are
45          calculated and returned.
46          ZHESVXX accepts user-provided factorizations and equilibration
47          factors; see the definitions of the FACT and EQUED options.
48          Solving with refinement and using a factorization from a previous
49          ZHESVXX call will also produce a solution with either O(eps)
50          errors or warnings, but we cannot make that claim for general
51          user-provided factorizations and equilibration factors if they
52          differ from what ZHESVXX would itself produce.
53

DESCRIPTION

55          The following steps are performed:
56          1.  If  FACT = 'E', double precision scaling factors are computed to
57       equilibrate
58          the system:
59            diag(S)*A*diag(S)     *inv(diag(S))*X = diag(S)*B
60          Whether or not the system will be equilibrated depends on the
61          scaling of the matrix A, but if equilibration is used, A is
62          overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
63          2. If FACT = 'N' or 'E', the LU decomposition is used to factor
64          the matrix A (after equilibration if FACT = 'E') as
65             A = U * D * U**T,  if UPLO = 'U', or
66             A = L * D * L**T,  if UPLO = 'L',
67          where U (or L) is a product of permutation and unit upper (lower)
68          triangular matrices, and D is symmetric and block diagonal with
69          1-by-1 and 2-by-2 diagonal blocks.
70          3. If some D(i,i)=0, so that D is exactly singular, then the
71          routine returns with INFO = i. Otherwise, the factored form of A
72          is used to estimate the condition number of the matrix A (see
73          argument RCOND).  If the reciprocal of the condition number is
74          less than machine precision, the routine still goes on to solve
75          for X and compute error bounds as described below.
76          4. The system of equations is solved for X using the factored form
77          of A.
78          5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
79          the routine will use iterative refinement to try to get a small
80          error and error bounds.  Refinement calculates the residual to at
81          least twice the working precision.
82          6. If equilibration was used, the matrix X is premultiplied by
83          diag(R) so that it solves the original system before
84          equilibration.
85

ARGUMENTS

87       Some optional parameters are bundled in the PARAMS array.   These  set‐
88       tings determine how refinement is performed, but often the defaults are
89       acceptable.  If the defaults are acceptable, users can pass NPARAMS = 0
90       which prevents the source code from accessing the PARAMS argument.
91
92       FACT    (input) CHARACTER*1
93               Specifies  whether  or not the factored form of the matrix A is
94               supplied on entry, and if not, whether the matrix A  should  be
95               equilibrated  before  it is factored.  = 'F':  On entry, AF and
96               IPIV contain the factored form of A.  If EQUED is not 'N',  the
97               matrix A has been equilibrated with scaling factors given by S.
98               A, AF, and IPIV are not modified.  = 'N':  The matrix A will be
99               copied to AF and factored.
100               =  'E':   The  matrix A will be equilibrated if necessary, then
101               copied to AF and factored.
102
103       N       (input) INTEGER
104               The number of linear equations, i.e., the order of  the  matrix
105               A.  N >= 0.
106
107       NRHS    (input) INTEGER
108               The  number of right hand sides, i.e., the number of columns of
109               the matrices B and X.  NRHS >= 0.
110
111       A       (input/output) COMPLEX*16 array, dimension (LDA,N)
112               The symmetric matrix A.  If UPLO  =  'U',  the  leading  N-by-N
113               upper  triangular  part of A contains the upper triangular part
114               of the matrix A, and the strictly lower triangular part of A is
115               not referenced.  If UPLO = 'L', the leading N-by-N lower trian‐
116               gular part of A contains  the  lower  triangular  part  of  the
117               matrix  A,  and  the strictly upper triangular part of A is not
118               referenced.  On exit, if FACT = 'E' and EQUED = 'Y', A is over‐
119               written by diag(S)*A*diag(S).
120
121       LDA     (input) INTEGER
122               The leading dimension of the array A.  LDA >= max(1,N).
123
124       AF      (input or output) COMPLEX*16 array, dimension (LDAF,N)
125               If  FACT  = 'F', then AF is an input argument and on entry con‐
126               tains the block diagonal matrix D and the multipliers  used  to
127               obtain the factor U or L from the factorization A = U*D*U**T or
128               A = L*D*L**T as computed by DSYTRF.  If FACT = 'N', then AF  is
129               an  output  argument  and  on  exit  returns the block diagonal
130               matrix D and the multipliers used to obtain the factor U  or  L
131               from the factorization A = U*D*U**T or A = L*D*L**T.
132
133       LDAF    (input) INTEGER
134               The leading dimension of the array AF.  LDAF >= max(1,N).
135
136       IPIV    (input or output) INTEGER array, dimension (N)
137               If FACT = 'F', then IPIV is an input argument and on entry con‐
138               tains details of the interchanges and the block structure of D,
139               as determined by DSYTRF.  If IPIV(k) > 0, then rows and columns
140               k and IPIV(k) were interchanged and D(k,k) is a 1-by-1 diagonal
141               block.   If  UPLO  = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows
142               and  columns   k-1   and   -IPIV(k)   were   interchanged   and
143               D(k-1:k,k-1:k)  is  a 2-by-2 diagonal block.  If UPLO = 'L' and
144               IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k)
145               were  interchanged  and  D(k:k+1,k:k+1)  is  a  2-by-2 diagonal
146               block.  If FACT = 'N', then IPIV is an output argument  and  on
147               exit  contains details of the interchanges and the block struc‐
148               ture of D, as determined by DSYTRF.
149
150       EQUED   (input or output) CHARACTER*1
151               Specifies the form of equilibration that was done.  = 'N':   No
152               equilibration (always true if FACT = 'N').
153               =  'Y':   Both  row  and column equilibration, i.e., A has been
154               replaced by diag(S) * A * diag(S).  EQUED is an input  argument
155               if FACT = 'F'; otherwise, it is an output argument.
156
157       S       (input or output) DOUBLE PRECISION array, dimension (N)
158               The  scale  factors  for A.  If EQUED = 'Y', A is multiplied on
159               the left and right by diag(S).  S is an input argument if  FACT
160               =  'F';  otherwise, S is an output argument.  If FACT = 'F' and
161               EQUED = 'Y', each element of S must be positive.  If S is  out‐
162               put,  each element of S is a power of the radix. If S is input,
163               each element of S should be a power of the radix  to  ensure  a
164               reliable solution and error estimates. Scaling by powers of the
165               radix does not cause rounding errors unless the  result  under‐
166               flows  or  overflows.   Rounding  errors during scaling lead to
167               refining with a matrix that is  not  equivalent  to  the  input
168               matrix, producing error estimates that may not be reliable.
169
170       B       (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
171               On  entry, the N-by-NRHS right hand side matrix B.  On exit, if
172               EQUED = 'N', B is not modified; if EQUED = 'Y', B is  overwrit‐
173               ten by diag(S)*B;
174
175       LDB     (input) INTEGER
176               The leading dimension of the array B.  LDB >= max(1,N).
177
178       X       (output) COMPLEX*16 array, dimension (LDX,NRHS)
179               If  INFO  =  0, the N-by-NRHS solution matrix X to the original
180               system of equations.  Note that A and B are modified on exit if
181               EQUED  .ne. 'N', and the solution to the equilibrated system is
182               inv(diag(S))*X.
183
184       LDX     (input) INTEGER
185               The leading dimension of the array X.  LDX >= max(1,N).
186
187       RCOND   (output) DOUBLE PRECISION
188               Reciprocal scaled condition number.  This is an estimate of the
189               reciprocal Skeel condition number of the matrix A after equili‐
190               bration (if done).  If this is less than the machine  precision
191               (in particular, if it is zero), the matrix is singular to work‐
192               ing precision.  Note that the error may still be small even  if
193               this  number  is  very small and the matrix appears ill- condi‐
194               tioned.
195
196       RPVGRW  (output) DOUBLE PRECISION
197               Reciprocal pivot growth.  On exit, this contains the reciprocal
198               pivot growth factor norm(A)/norm(U). The "max absolute element"
199               norm is used.  If this is much less than 1, then the  stability
200               of the LU factorization of the (equilibrated) matrix A could be
201               poor.  This also means that the solution X, estimated condition
202               numbers, and error bounds could be unreliable. If factorization
203               fails with 0<INFO<=N, then this contains the  reciprocal  pivot
204               growth factor for the leading INFO columns of A.
205
206       BERR    (output) DOUBLE PRECISION array, dimension (NRHS)
207               Componentwise  relative backward error.  This is the component‐
208               wise relative backward  error  of  each  solution  vector  X(j)
209               (i.e.,  the  smallest  relative change in any element of A or B
210               that makes X(j) an exact solution).  N_ERR_BNDS (input) INTEGER
211               Number  of  error bounds to return for each right hand side and
212               each type (normwise or componentwise).  See  ERR_BNDS_NORM  and
213               ERR_BNDS_COMP below.
214
215       ERR_BNDS_NORM    (output)  DOUBLE  PRECISION  array,  dimension  (NRHS,
216       N_ERR_BNDS)
217                      For each right-hand side, this array  contains  informa‐
218                      tion  about  various  error bounds and condition numbers
219                      corresponding to the normwise relative error,  which  is
220                      defined  as  follows: Normwise relative error in the ith
221                      solution  vector:  max_j  (abs(XTRUE(j,i)   -   X(j,i)))
222                      ------------------------------   max_j  abs(X(j,i))  The
223                      array is indexed by the type  of  error  information  as
224                      described  below. There currently are up to three pieces
225                      of   information   returned.    The   first   index   in
226                      ERR_BNDS_NORM(i,:)  corresponds  to  the  ith right-hand
227                      side.  The second index in ERR_BNDS_NORM(:,err) contains
228                      the  following three fields: err = 1 "Trust/don't trust"
229                      boolean. Trust the answer if  the  reciprocal  condition
230                      number   is   less   than   the   threshold   sqrt(n)  *
231                      dlamch('Epsilon').  err = 2  "Guaranteed"  error  bound:
232                      The  estimated  forward error, almost certainly within a
233                      factor of 10 of the true error so long as the next entry
234                      is    greater    than    the    threshold    sqrt(n)   *
235                      dlamch('Epsilon').  This  error  bound  should  only  be
236                      trusted  if  the  previous  boolean  is  true.   err = 3
237                      Reciprocal condition number: Estimated normwise recipro‐
238                      cal  condition  number.   Compared  with  the  threshold
239                      sqrt(n) * dlamch('Epsilon') to determine  if  the  error
240                      estimate  is  "guaranteed".  These  reciprocal condition
241                      numbers are 1 /  (norm(Z^{-1},inf)  *  norm(Z,inf))  for
242                      some  appropriately scaled matrix Z.  Let Z = S*A, where
243                      S scales each row by a power of the radix so  all  abso‐
244                      lute  row  sums  of  Z  are approximately 1.  See Lapack
245                      Working Note 165 for further details and extra cautions.
246
247       ERR_BNDS_COMP   (output)  DOUBLE  PRECISION  array,  dimension   (NRHS,
248       N_ERR_BNDS)
249                      For  each  right-hand side, this array contains informa‐
250                      tion about various error bounds  and  condition  numbers
251                      corresponding to the componentwise relative error, which
252                      is defined as follows: Componentwise relative  error  in
253                      the  ith solution vector: abs(XTRUE(j,i) - X(j,i)) max_j
254                      ---------------------- abs(X(j,i)) The array is  indexed
255                      by  the  right-hand  side  i (on which the componentwise
256                      relative error depends), and the type of error  informa‐
257                      tion as described below. There currently are up to three
258                      pieces of information returned for each right-hand side.
259                      If  componentwise accuracy is not requested (PARAMS(3) =
260                      0.0), then ERR_BNDS_COMP is not accessed.  If N_ERR_BNDS
261                      .LT.  3,  then  at most the first (:,N_ERR_BNDS) entries
262                      are returned.  The  first  index  in  ERR_BNDS_COMP(i,:)
263                      corresponds  to  the  ith  right-hand  side.  The second
264                      index in  ERR_BNDS_COMP(:,err)  contains  the  following
265                      three fields: err = 1 "Trust/don't trust" boolean. Trust
266                      the answer if the reciprocal condition  number  is  less
267                      than the threshold sqrt(n) * dlamch('Epsilon').  err = 2
268                      "Guaranteed" error bound: The estimated  forward  error,
269                      almost certainly within a factor of 10 of the true error
270                      so long as the next entry is greater than the  threshold
271                      sqrt(n)  *  dlamch('Epsilon').  This  error bound should
272                      only be trusted if the previous boolean is true.  err  =
273                      3   Reciprocal condition number: Estimated componentwise
274                      reciprocal condition number.  Compared with the  thresh‐
275                      old  sqrt(n)  *  dlamch('Epsilon')  to  determine if the
276                      error estimate is "guaranteed". These reciprocal  condi‐
277                      tion  numbers  are  1 / (norm(Z^{-1},inf) * norm(Z,inf))
278                      for  some  appropriately  scaled  matrix  Z.   Let  Z  =
279                      S*(A*diag(x)),  where  x is the solution for the current
280                      right-hand side and S scales each row of A*diag(x) by  a
281                      power  of  the  radix  so all absolute row sums of Z are
282                      approximately 1.  See Lapack Working Note 165  for  fur‐
283                      ther  details and extra cautions.  NPARAMS (input) INTE‐
284                      GER Specifies the number of parameters  set  in  PARAMS.
285                      If  .LE.  0,  the  PARAMS  array is never referenced and
286                      default values are used.
287
288       PARAMS  (input / output) DOUBLE PRECISION array, dimension NPARAMS
289               Specifies algorithm parameters.  If an entry is .LT. 0.0,  then
290               that  entry  will  be  filled  with default value used for that
291               parameter.  Only positions up to NPARAMS are accessed; defaults
292               are       used       for       higher-numbered      parameters.
293               PARAMS(LA_LINRX_ITREF_I = 1) :  Whether  to  perform  iterative
294               refinement or not.  Default: 1.0D+0
295               =  0.0  :  No  refinement is performed, and no error bounds are
296               computed.  = 1.0 : Use the extra-precise refinement  algorithm.
297               (other     values     are     reserved    for    future    use)
298               PARAMS(LA_LINRX_ITHRESH_I = 2) :  Maximum  number  of  residual
299               computations allowed for refinement.  Default: 10
300               Aggressive:  Set to 100 to permit convergence using approximate
301               factorizations or factorizations other than LU. If the  factor‐
302               ization  uses  a technique other than Gaussian elimination, the
303               guarantees in err_bnds_norm and err_bnds_comp may no longer  be
304               trustworthy.   PARAMS(LA_LINRX_CWISE_I  = 3) : Flag determining
305               if the code will attempt to find a solution with  small  compo‐
306               nentwise  relative  error  in  the  double-precision algorithm.
307               Positive is true, 0.0 is false.  Default: 1.0  (attempt  compo‐
308               nentwise convergence)
309
310       WORK    (workspace) COMPLEX*16 array, dimension (2*N)
311
312       RWORK   (workspace) DOUBLE PRECISION array, dimension (3*N)
313
314       INFO    (output) INTEGER
315               = 0:  Successful exit. The solution to every right-hand side is
316               guaranteed.  < 0:  If INFO = -i, the i-th argument had an ille‐
317               gal value
318               > 0 and <= N:  U(INFO,INFO) is exactly zero.  The factorization
319               has been completed, but the factor U is  exactly  singular,  so
320               the  solution and error bounds could not be computed. RCOND = 0
321               is returned.  = N+J: The  solution  corresponding  to  the  Jth
322               right-hand  side is not guaranteed. The solutions corresponding
323               to other right- hand sides K with K > J may not  be  guaranteed
324               as  well,  but only the first such right-hand side is reported.
325               If a small componentwise error is not  requested  (PARAMS(3)  =
326               0.0)  then the Jth right-hand side is the first with a normwise
327               error bound that is not guaranteed (the smallest  J  such  that
328               ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) the Jth
329               right-hand side is the first with either a normwise  or  compo‐
330               nentwise  error  bound  that  is not guaranteed (the smallest J
331               such that either ERR_BNDS_NORM(J,1) = 0.0 or ERR_BNDS_COMP(J,1)
332               =   0.0).   See   the   definition  of  ERR_BNDS_NORM(:,1)  and
333               ERR_BNDS_COMP(:,1). To get information about all of the  right-
334               hand sides check ERR_BNDS_NORM or ERR_BNDS_COMP.
335
336
337
338    LAPACK driver routine (versionNo3v.e2m)ber 2008                      ZHESVXX(1)
Impressum