This subroutine reduces a real general matrix A to upper Hessenberg form H by an orthogonal similarity transformation:
where A represents the global general submatrix Aia+ilo-1: ia+ihi-1, ja+ilo-1: ja+ihi-1.
If n = 0, no computation is performed, and the subroutine returns after doing some parameter checking. Then, if ihi = ilo, the subroutine returns after doing some parameter checking and setting tauja:ja+ilo-2 and tauja+ihi-1:ja+n-2 to zero.
A, tau, work | Subroutine |
Long-precision real | PDGEHRD |
Fortran | CALL PDGEHRD (n, ilo, ihi, a, ia, ja, desc_a, tau, work, lwork, info) |
C and C++ | pdgehrd (n, ilo, ihi, a, ia, ja, desc_a, tau, work, lwork, info); |
Scope: global
Specified as: a fullword integer; n >= 0.
Scope: global
Specified as: a fullword integer; 1 <= ilo <= max(1, n).
Scope: global
Specified as: a fullword integer; min(ilo, n) <= ihi <= n.
Scope: local
Specified as: an LLD_A by (at least) LOCq(N_A) array, containing numbers of the data type indicated in Table 106. Details about the square block-cyclic data distribution of global matrix A are stored in desc_a.
Scope: global
Specified as: a fullword integer; 1 <= ia <= M_A and ia+n-1 <= M_A.
Scope: global
Specified as: a fullword integer; 1 <= ja <= N_A and ja+n-1 <= N_A.
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor type | DTYPE_A=1 | Global |
2 | CTXT_A | BLACS context | Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP | Global |
3 | M_A | Number of rows in the global matrix | If n = 0: M_A >= 0
Otherwise: M_A >= 1 | Global |
4 | N_A | Number of columns in the global matrix | If n = 0: N_A >= 0
Otherwise: N_A >= 1 | Global |
5 | MB_A | Row block size | MB_A >= 1 | Global |
6 | NB_A | Column block size | NB_A >= 1 | Global |
7 | RSRC_A | The process row of the p × q grid over which the first row of the global matrix is distributed | 0 <= RSRC_A < p | Global |
8 | CSRC_A | The process column of the p × q grid over which the first column of the global matrix is distributed | 0 <= CSRC_A < q | Global |
9 | LLD_A | The leading dimension of the local array | LLD_A >= max(1,LOCp(M_A)) | Local |
Specified as: an array of (at least) length 9, containing fullword integers.
If lwork = 0, work is ignored.
If lwork <> 0, work is the work area used by this subroutine, where:
Scope: local
Specified as: an area of storage containing numbers of data type indicated in Table 106.
Scope:
Specified as: a fullword integer; where:
lwork >= (nb × nb)+nb × max(ihip+1, ihlp+inlq)
where:
The upper triangle and the first subdiagonal of Aia:ia+n-1, ja:ja+n-1 are overwritten by the corresponding elements of the upper Hessenberg matrix H. The elements below the first subdiagonal are overwritten with vi+2:ihi. These elements with tau represent the orthogonal matrix Q as a product of elementary reflectors.
See Function, for more information.
Scope: local
Returned as: an LLD_A by (at least) LOCq(N_A) array, containing numbers of the data type indicated in Table 106. Details about the square block-cyclic data distribution of global matrix A are stored in desc_a.
This identifies the first element of the local array tau. This subroutine computes the location of the first element of the local subarray used, based on ja, desc_a, p, q, myrow, and mycol; therefore, the leading 1 by LOCq(ja+n-2) part of the local array tau must contain the local pieces of the leading 1 by ja+n-2 part of the global matrix tau.
A copy of the vector tau, with a block size of NB_A and global index ja, is returned to each row of the process grid. The process column over which the first column of tau is distributed is CSRC_A.
Scope: local
Returned as: a 1 by (at least) LOCq(N_A-1) array, containing numbers of the data type indicated in Table 106.
If lwork <> 0 and lwork <> -1, its size is (at least) of length lwork.
If lwork = -1, its size is (at least) of length 1.
Scope: local
Returned as: an area of storage, where:
If lwork >= 1 or lwork = -1, then work1 is set to the minimum lwork value and contains numbers of the data type indicated in Table 106. Except for work1, the contents of work are overwritten on return.
Scope: global
Returned as: a fullword integer; info = 0.
If n = 0, you should set ilo = 1 and ihi = 0. If n > 0, you should set 1 <= ilo <= ihi <= n.
This subroutine reduces a real general matrix A to upper Hessenberg form H by an orthogonal similarity transformation:
where:
where:
The following example shows the contents of the general submatrix A on entry with n = 7, ia = ja = 1, ilo = 2, and ihi = 6:
Following is the general submatrix A on return:
where:
None
If n <> 0:
In all cases:
where:
Each of the following global input arguments are checked to determine whether its value differs from the value specified on process P00:
Also:
This example shows the reduction of a general matrix of order 3 to upper Hessenberg form using a 2 × 2 process grid.
ORDER = 'R' NPROW = 2 NPCOL = 2 CALL BLACS_GET(0, 0, ICONTXT) CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL) CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL) N ILO IHI A IA JA DESC_A TAU WORK LWORK INFO | | | | | | | | | | | CALL PDGEHRD( 3 , 1 , 3 , A , 1 , 1 , DESC_A , TAU , WORK , 0 , INFO)
| DESC_A |
---|---|
DTYPE_ | 1 |
CTXT_ | icontxt(IITOOT5) |
M_ | 3 |
N_ | 3 |
MB_ | 1 |
NB_ | 1 |
RSRC_ | 0 |
CSRC_ | 0 |
LLD_ | See below(EPSSTL5) |
Notes: |
Global general matrix A of order 3 with block sizes 1 × 1:
B,D 0 1 2 * * 0 | 33.0 | 16.0 | 72.0 | | -------|---------|------- | 1 | -24.0 | -10.0 | -57.0 | | -------|---------|------- | 2 | -8.0 | -4.0 | -17.0 | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11
Local arrays for A:
p,q | 0 | 1 -----|--------------|-------- 0 | 33.0 72.0 | 16.0 | -8.0 -17.0 | -4.0 -----|--------------|-------- 1 | -24.0 -57.0 | -10.0
Output:
Global general matrix A of order 3 with block sizes 1 × 1:
B,D 0 1 2 * * 0 | 33.00 | -37.95 | 63.25 | | --------|----------|-------- | 1 | 25.30 | -29.00 | 53.00 | | --------|----------|-------- | 2 | 0.16 | 0.00 | 2.00 | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11
Local arrays for A:
p,q | 0 | 1 -----|----------------|--------- 0 | 33.0 63.25 | -37.95 | 0.16 2.00 | 0.00 -----|----------------|--------- 1 | 25.30 53.00 | -29.00
Global row vector tau of length 2 with block sizes of 1:
B,D 0 1 * * 0 | 1.95 | 0.00 | * *
The following is the 2 × 2 process grid:
B,D | 0 | 1 -----| ------- |----- | P00 | P01 -----| ------- |----- | P10 | P11
Local arrays for tau:
p,q | 0 | 1 -----|--------|-------- 0 | 1.95 | 0.00 -----|--------|-------- 1 | 1.95 | 0.00
The value of info is 0 on all processes.