|These subroutines reduce a real symmetric or complex Hermitian |positive definite generalized eigenproblem to standard form and solves the |following problem types:
B must have been previously factored by a call to PDPOTRF |or PZPOTRF.
In the formulas above:
If n = 0, no computation is performed and the subroutine returns after doing some parameter checking.
See reference [13].
|
A, B | scale | Subroutine |
Long-precision real | Long-precision real | PDSYGST |
Long-precision complex | Long-precision real | PZHEGST |
Fortran | CALL PDSYGST|PZHEGST (ibtype, uplo, n, a, ia, ja, desc_a, b, ib, jb, desc_b, scale, info) |
C and C++ | pdsygst|pzhegst (ibtype, uplo, n, a, ia, ja, desc_a, b, ib, jb, desc_b, scale, info); |
If ibtype = 1, the problem is Ax = lambdaBx
If ibtype = 2, the problem is ABx = lambdax
If ibtype = 3, the problem is BAx = lambdax
Scope: global
Specified as: a fullword integer; ibtype = 1, 2, or 3.
If uplo = 'U', the upper triangular part is referenced.
If uplo = 'L', the lower triangular part is referenced.
Scope: global
Specified as: a single character; uplo = 'U' or 'L'.
Scope: global
Specified as: a fullword integer; n >= 0.
Scope: local
Specified as: an LLD_A by (at least) LOCq(N_A) array, containing numbers of the data type indicated in Table 105. 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.
Scope: local
Specified as: an LLD_B by (at least) LOCq(N_B) array, containing numbers of the data type indicated in Table 105. Details about the square block-cyclic data distribution of global matrix B are stored in desc_b.
Scope: global
Specified as: a fullword integer; 1 <= ib <= M_B and ib+n-1 <= M_B.
Scope: global
Specified as: a fullword integer; 1 <= jb <= N_B and jb+n-1 <= N_B.
desc_b | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_B | Descriptor type | DTYPE_B=1 | Global |
2 | CTXT_B | BLACS context | Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP | Global |
3 | M_B | Number of rows in the global matrix | If n = 0: M_B >= 0
Otherwise: M_B >= 1 | Global |
4 | N_B | Number of columns in the global matrix | If n = 0: N_B >= 0
Otherwise: N_B >= 1 | Global |
5 | MB_B | Row block size | MB_B >= 1 | Global |
6 | NB_B | Column block size | NB_B >= 1 | Global |
7 | RSRC_B | The process row of the p × q grid over which the first row of the global matrix is distributed | 0 <= RSRC_B < p | Global |
8 | CSRC_B | The process column of the p × q grid over which the first column of the global matrix is distributed | 0 <= CSRC_B < q | Global |
9 | LLD_B | The leading dimension of the local array | LLD_B >= max(1,LOCp(M_B)) | Local |
Specified as: an array of (at least) length 9, containing fullword integers.
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 105. Details about the square block-cyclic data distribution of global matrix A are stored in desc_a.
Scope: global
Returned as: a long-precision real number; scale = 1.0
Scope: global
Returned as: a fullword integer; info = 0.
where:
where:
|These subroutines reduce a real symmetric or complex Hermitian positive definite generalized Eigenproblem to standard form.
|For PDSYGST:
|For PZHEGST:
In the formulas above:
None
None
Stage 5: If n <> 0:
In all cases:
Each of the following global input arguments are checked to determine whether its value differs from the value specified on process P00:
This example shows the reduction of a real symmetric positive definite generalized eigenproblem to standard 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) UPLO N B IB JB DESCB INFO | | | | | | | CALL PDPOTRF( 'L', 4, B, 1, 1, DESCB, INFO ) IBTYPE UPLO N A IA JA DESCA B IB JB DESCB SCALE INFO | | | | | | | | | | | | | CALL PDSYGST( 1, 'L', 4, A, 1, 1, DESCA, B, 1, 1, DESCB, SCALE, INFO )
| DESC_A | DESC_B |
---|---|---|
DTYPE_ | 1 | 1 |
CTXT_ | icontxt(IITOOT3) | icontxt(IITOOT3) |
M_ | 4 | 4 |
N_ | 4 | 4 |
MB_ | 1 | 1 |
NB_ | 1 | 1 |
RSRC_ | 0 | 0 |
CSRC_ | 0 | 0 |
LLD_ | See below(EPSSTL3) | See below(EPSSTL3) |
Notes: |
Global |real symmetric matrix A of order 4, stored in lower storage mode, with block sizes 1 × 1:
B,D 0 1 2 3 * * 0 | -1.0 | . | . | . | | ------|--------|--------|------ | 1 | 1.0 | 1.0 | . | . | | ------|--------|--------|------ | 2 | -1.0 | -1.0 | 1.0 | . | | ------|--------|--------|------ | 3 | 1.0 | 1.0 | -1.0 | 1.0 | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 3 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11 3 | |
Local arrays for A:
p,q | 0 | 1 -----|------------|------------ 0 | -1.0 . | . . | -1.0 1.0 | -1.0 . -----|------------|------------ 1 | 1.0 . | 1.0 . | 1.0 -1.0 | 1.0 1.0
Input to PDPOTRF:
Global |real symmetric positive definite matrix B of order 4, stored in lower storage mode, with block sizes 1 × 1:
B,D 0 1 2 3 * * 0 | 2.0 | . | . | . | | -------|---------|---------|------- | 1 | 1.0 | 2.0 | . | . | | -------|---------|---------|------- | 2 | 0.0 | 1.0 | 2.0 | . | | -------|---------|---------|------- | 3 | 0.0 | 0.0 | 1.0 | 2.0 | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 3 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11 3 | |
Local arrays for B:
p,q | 0 | 1 -----|--------------|-------------- 0 | 2.0 . | . . | 0.0 2.0 | 1.0 . -----|--------------|-------------- 1 | 1.0 . | 2.0 . | 0.0 1.0 | 0.0 2.0
Output from PDPOTRF and input to PDSYGST:
Global |real symmetric positive definite matrix B of order 4, stored in lower storage mode, with block sizes 1 × 1:
B,D 0 1 2 3 * * 0 | 1.4142 | . | . | . | | ---------|-----------|-----------|--------- | 1 | 0.7071 | 1.2247 | . | . | | ---------|-----------|-----------|--------- | 2 | 0.0000 | 0.8165 | 1.1547 | . | | ---------|-----------|-----------|--------- | 3 | 0.0000 | 0.0000 | 0.8660 | 1.1180 | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 3 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11 3 | |
Local arrays for B:
p,q | 0 | 1 -----|-------------------|------------------- 0 | 1.4142 . | . . | 0.0000 1.1547 | 0.8165 . -----|-------------------|------------------- 1 | 0.7071 . | 1.2247 . | 0.0000 0.8660 | 0.0000 1.1180
Output from PDSYGST:
Global |real symmetric matrix A of order 4, stored in lower storage mode, with block sizes 1 × 1:
B,D 0 1 2 3 * * 0 | -0.5000 | . | . | . | | ---------|-----------|-----------|--------- | 1 | 0.8660 | -0.1667 | . | . | | ---------|-----------|-----------|--------- | 2 | -1.2247 | -0.2357 | 1.1667 | . | | ---------|-----------|-----------|--------- | 3 | 1.5811 | 0.5477 | -1.9365 | 3.1000 | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 3 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11 3 | |
Local arrays for A:
p,q | 0 | 1 -----|-------------------|------------------- 0 | -0.5000 . | . . | -1.2247 1.1667 | -0.2357 . -----|-------------------|------------------- 1 | 0.8660 . | -0.1667 . | 1.5811 -1.9365 | 0.5477 3.1000
The value of scale is 1.0 on all processes.
The value of info is 0 on all processes.
|This example shows the reduction of a complex Hermitian positive definite |generalized eigenproblem to standard 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) | | UPLO N B IB JB DESCB INFO | | | | | | | | |CALL PZPOTRF( 'L', 4, B, 1, 1, DESCB, INFO ) | | | IBTYPE UPLO N A IA JA DESCA B IB JB DESCB SCALE INFO | | | | | | | | | | | | | | |CALL PZHEGST( 1, 'L', 4, A, 1, 1, DESCA, B, 1, 1, DESCB, SCALE, INFO )
| DESC_A | DESC_B |
---|---|---|
DTYPE_ | 1 | 1 |
CTXT_ | icontxt(IITOOT4) | icontxt(IITOOT4) |
M_ | 4 | 4 |
N_ | 4 | 4 |
MB_ | 1 | 1 |
NB_ | 1 | 1 |
RSRC_ | 0 | 0 |
CSRC_ | 0 | 0 |
LLD_ | See below(EPSSTL4) | See below(EPSSTL4) |
Notes: |
|Global complex Hermitian matrix A of order 4, stored in lower |storage mode, with block sizes 1 × 1:
|B,D 0 1 2 3 | * * | 0 | (1.0, 0.0) | . | . | . | | | ------------|--------------|--------------|------------ | | 1 | (5.0, -2.0) | (10.0, 0.0) | . | . | | | ------------|--------------|--------------|------------ | | 2 | (7.0, 4.0) | (15.0, 6.0) | (20.0, 0.0) | . | | | ------------|--------------|--------------|------------ | | 3 | (9.0, -6.0) | (20.0, -4.0) | (25.0, -9.0) | (30.0, 0.0) | | * *
|The following is the 2 × 2 process grid:
|B,D | 0 2 | 1 3 |-----| ------- |----- |0 | P00 | P01 |2 | | |-----| ------- |----- |1 | P10 | P11 |3 | |
|Local arrays for A:
|p,q | 0 | 1 |-----|--------------------------|----------------------- | 0 | ( 1.0, . ) . | . . | | ( 7.0, 4.0) (20.0, . )| (15.0, 6.0) . |-----|--------------------------|----------------------- | 1 | ( 5.0, -2.0) . | (10.0, . ) . | | ( 9.0, -6.0) (25.0, -9.0)| (20.0,-4.0) (30.0, . )
|Input to PZPOTRF:
|Global complex Hermitian positive definite matrix B of order 4, |stored in lower storage mode, with block sizes 1 × 1:
|B,D 0 1 2 3 | * * | 0 | (9.0, 0.0) | . | . | . | | | ------------|--------------|--------------|------------ | | 1 | (3.0, -3.0) | (18.0, 0.0) | . | . | | | ------------|--------------|--------------|------------ | | 2 | (3.0, 3.0) | ( 8.0, 6.0) | (27.0, 0.0) | . | | | ------------|--------------|--------------|------------ | | 3 | (3.0, -3.0) | ( 8.0, -6.0) | (12.0, -9.0) | (61.0, 0.0) | | * *
|The following is the 2 × 2 process grid:
|B,D | 0 2 | 1 3 |-----| ------- |----- |0 | P00 | P01 |2 | | |-----| ------- |----- |1 | P10 | P11 |3 | |
|Local arrays for B:
|p,q | 0 | 1 |-----|-------------------------|----------------------- | 0 | (9.0, . ) . | . . | | (3.0, 3.0) (27.0, .) | ( 8.0, 6.0) . |-----|-------------------------|----------------------- | 1 | (3.0, -3.0) . | (18.0, . ) . | | (3.0, -3.0) (12.0, -9.0)| ( 8.0,-6.0) (61.0, . ) |
|Output from PZPOTRF and input to PZHEGST:
|Global complex Hermitian positive definite matrix B of order 4, |stored in lower storage mode, with block sizes 1 × 1:
|B,D 0 1 2 3 | * * | 0 | (3.0, 0.0) | . | . | . | | | ------------|-------------|-------------------|-------------- | | 1 | (1.0, -1.0) | (4.0, 0.0) | . | . | | | ------------|-------------|-------------------|-------------- | | 2 | (1.0, 1.0) | (2.0, 0.0) | (4.4721, 0.0) | . | | | ------------|-------------|-------------------|-------------- | | 3 | (1.0, -1.0) | (1.5, -1.5) | (2.3479, -.5590) | (6.9767, 0.0) | | * *
|The following is the 2 × 2 process grid:
|B,D | 0 2 | 1 3 |-----| ------- |----- |0 | P00 | P01 |2 | | |-----| ------- |----- |1 | P10 | P11 |3 | |
|Local arrays for B:
|p,q | 0 | 1 |-----|-----------------------------|-------------------------- | 0 | (3.0, 0.0) . | . . | | (1.0, 1.0) (4.4721, 0.0) | (2.0, 1.0) . |-----|-----------------------------|-------------------------- | 1 | (1.0, -1.0) . | (4.0, 0.0) . | | (1.0, -1.0) (2.3479, -.5590)| (1.5,-1.5) (6.9767, 0.0 ) |
|Output from PZHEGST:
|Global complex Hermitian matrix A of order 4, stored in lower |storage mode, with block sizes 1 × 1:
|B,D 0 1 2 3 | * * | 0 | (.1111, 0.0 ) | . | . | . | | | ----------------|-----------------|-----------------|-------------- | | 1 | (.3889, -.1389) | (.3472, 0.0 ) | . | . | | | ----------------|-----------------|-----------------|-------------- | | 2 | (.2919, .2485) | (.5714, -.0652) | (.0757, 0.0) | . | | | ----------------|-----------------|-----------------|-------------- | | 3 | (.2422, -.2175) | (.2001, -.0009) | (.4003, .2645) | (-.0488, 0.0) | | * *
|The following is the 2 × 2 process grid:
|B,D | 0 2 | 1 3 |-----| ------- |----- |0 | P00 | P01 |2 | | |-----| ------- |----- |1 | P10 | P11 |3 | |
|Local arrays for A:
|p,q | 0 | 1 |-----|--------------------------------|------------------------------- | 0 | (.1111, 0.0 ) . | . . | | (.2919, .2485) (.0757, 0.0) | (.5714, -.0652) . |-----|--------------------------------|------------------------------- | 1 | (.3889, -.1389) . | (.3472, 0.0 ) . | | (.2442, -.2175) (.4003, .2645) | (.2001, -.0009) (-.0488, 0.0 ) |
|The value of scale is 1.0 on all processes.
|The value of info is 0 on all processes.