This subroutine solves the tridiagonal systems of linear equations, AX = B, where the positive definite symmetric tridiagonal matrix A is stored in parallel-symmetric-tridiagonal storage mode. In this description:
If n = 0, no computation is performed and the subroutine
returns after doing some parameter checking. See reference [51].
d, e, B, work | Subroutine |
Long-precision real | PDPTSV |
Fortran | CALL PDPTSV (n, nrhs, d, e, ia, desc_a, b, ib, desc_b, work, lwork, info) |
C and C++ | pdptsv (n, nrhs, d, e, ia, desc_a, b, ib, desc_b, work, lwork, info); |
Scope: global
Specified as: a fullword integer, where:
where p is the number of processes in a process grid.
Scope: global
Specified as: a fullword integer; nrhs >= 0.
The global vector d contains the main diagonal of the global positive definite symmetric tridiagonal submatrix A in elements ia through ia+n-1.
Scope: local
Specified as: a one-dimensional array of (at least) length LOCp(ia+n-1) containing numbers of the data type indicated in Table 86. Details about block-cyclic data distribution of global matrix A are stored in desc_a.
On output, D is overwritten; that is, the original input is not preserved.
The global vector e contains the off-diagonal of the global positive definite symmetric tridiagonal submatrix A in elements ia through ia+n-2.
Scope: local
Specified as: a one-dimensional array of (at least) length LOCp(ia+n-1), containing numbers of the data type indicated in Table 86. Details about block-cyclic data distribution of global matrix A are stored in desc_a.
On output, E is overwritten; that is, the original input is not preserved.
Scope: global
Specified as: a fullword integer, where:
Table 87. Type-502 Array Descriptor
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor Type | DTYPE_A=502 for p × 1 or
1 × p
where p is the number of processes in a process grid. | 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 | MB_A | Row block size | MB_A >= 1 and 0 <= n <= (MB_A)(p)-mod(ia-1,MB_A) | Global |
5 | RSRC_A | The process row over which the first row of the global matrix is distributed | 0 <= RSRC_A < p | Global |
6 | -- | Not used by this subroutine. | -- | -- |
7 | -- | Reserved | -- | -- |
Specified as: an array of (at least) length 7, containing fullword
integers.
Table 88. Type-1 Array Descriptor (p × 1 Process Grid)
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor Type | DTYPE_A = 1 for p × 1
where p is the number of processes in a process grid. | 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 | N_A = 1 | Global |
5 | MB_A | Row block size | MB_A >= 1 and 0 <= n <= (MB_A)(p)-mod(ia-1,MB_A) | Global |
6 | NB_A | Column block size | NB_A >= 1 | Global |
7 | RSRC_A | The process row over which the first row of the global matrix is distributed | 0 <= RSRC_A < p | Global |
8 | CSRC_A | The process column over which the first column of the global matrix is distributed | CSRC_A = 0 | Global |
9 | -- | Not used by this subroutine. | -- | -- |
Specified as: an array of (at least) length 9, containing fullword
integers.
Table 89. Type-501 Array Descriptor
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor Type | DTYPE_A=501 for 1 × p or
p × 1
where p is the number of processes in a process grid. | Global |
2 | CTXT_A | BLACS context | Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP | Global |
3 | N_A | Number of columns in the global matrix |
If n = 0: N_A >= 0 Otherwise: N_A >= 1 | Global |
4 | NB_A | Column block size | NB_A >= 1 and 0 <= n <= (NB_A)(p)-mod(ia-1,NB_A) | Global |
5 | CSRC_A | The process column over which the first column of the global matrix is distributed | 0 <= CSRC_A < p | Global |
6 | -- | Not used by this subroutine. | -- | -- |
7 | -- | Reserved | -- | -- |
Specified as: an array of (at least) length 7, containing fullword
integers.
Table 90. Type-1 Array Descriptor (1 × p Process Grid)
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor type | DTYPE_A = 1 for 1 × p
where p is the number of processes in a process grid. | 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 | 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 and 0 <= n <= (NB_A)(p)-mod(ia-1,NB_A) | Global |
7 | RSRC_A | The process row over which the first row of the global matrix is distributed | RSRC_A=0 | Global |
8 | CSRC_A | The process column over which the first column of the global matrix is distributed | 0 <= CSRC_A < p | Global |
9 | -- | Not used by this subroutine. | -- | -- |
Specified as: an array of (at least) length 9, containing fullword integers.
Scope: local
Specified as: an LLD_B by (at least) nrhs array, containing numbers of the data type indicated in Table 86. Details about the 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.
desc_b | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_B | Descriptor type | DTYPE_B = 502 for p × 1 or
1 × p
where p is the number of processes in a process grid. | 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 | MB_B | Row block size | MB_B >= 1 and 0 <= n <= (MB_B)(p)-mod(ia-1,MB_B) | Global |
5 | RSRC_B | The process row over which the first row of the global matrix is distributed | 0 <= RSRC_B < p | Global |
6 | LLD_B | Leading dimension | LLD_B >= max(1, LOCp(MB_B)) | Local |
7 | -- | Reserved | -- | -- |
Specified as: an array of (at least) length 7, containing fullword
integers.
desc_b | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_B | Descriptor type | DTYPE_B = 1 for p × 1
where p is the number of processes in a process grid. | 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 | N_B >= nrhs | Global |
5 | MB_B | Row block size | MB_B >= 1 and 0 <= n <= (MB_B)(p)-mod(ib-1,MB_B) | Global |
6 | NB_B | Column block size | NB_B >= 1 | Global |
7 | RSRC_B | The process row over which the first row of the global matrix is distributed | 0 <= RSRC_B < p | Global |
8 | CSRC_B | The process column over which the first column of the global matrix is distributed | CSRC_B = 0 | Global |
9 | LLD_B | Leading dimension | LLD_B >= max(1,LOCp(MB_B)) | 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 86.
Scope:
Specified as: a fullword integer; where:
where, in the above formulas, P is the actual number of processes containing data.
If (the process grid is 1 × p and DTYPE_A = 1) or DTYPE_A = 501, you would substitute NB_A in place of MB_A in the formulas above.
Scope: local
Returned as: an LLD_B by (at least) nrhs array, containing numbers of the data type indicated in Table 86.
If lwork <> 0 and lwork <> -1, the size of work is (at least) of length lwork.
If lwork = -1, the size of work is (at least) of length 1.
Scope: local
Returned as: an area of storage, containing numbers of the data type indicated in Table 86, where:
Except for work1, the contents of work are overwritten on return.
If info = 0, global submatrix A is positive definite, and the factorization completed successfully or the work area query completed successfully.
If 1 <= info <= p, the portion of global submatrix A stored on process info-1 and factored locally, is not positive definite. A pivot element whose value is less than or equal to a small positive number was detected.
If info > p, the portion of global submatrix A stored on process info-p-1 representing interactions with other processes, is not positive definite. A pivot element whose value is less than or equal to a small positive number was detected.
If info > 0, the results of the computation are unpredictable.
Scope: global
Returned as: a fullword integer; info >= 0.
DTYPE_A | DTYPE_B | Process Grid |
---|---|---|
501 | 502 | p × 1 or 1 × p |
502 | 502 | p × 1 or 1 × p |
501 | 1 | p × 1 |
502 | 1 | p × 1 |
1 | 502 | p × 1 or 1 × p |
1 | 1 | p × 1 |
For more information on using block-cyclic data distribution, see Specifying Block-Cyclically-Distributed Matrices for the Banded Linear Algebraic Equations.
Matrix A is not positive definite. For details, see the description of the info argument.
Unable to allocate workspace
If (the process grid is 1 × p and DTYPE_A = 1) or DTYPE_A = 501:
If the process grid is 1 × p and DTYPE_A = 1:
If (the process grid is p × 1 and DTYPE_A = 1) or DTYPE_A = 502:
If the process grid is p × 1 and DTYPE_A = 1:
In all cases:
If DTYPE_B = 1:
In all cases:
Each of the following global input arguments are checked to determine whether its value is the same on all processes in the process grid:
If DTYPE_A = 1 on all processes:
If DTYPE_A = 501 on all processes:
If DTYPE_A = 502 on all processes:
In all cases:
If DTYPE_B = 1 on all processes:
If DTYPE_B = 502 on all processes:
Also:
This example shows a factorization of the positive definite symmetric tridiagonal matrix A of order 12:
* * | 4.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 2.0 5.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 2.0 5.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 2.0 5.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 2.0 5.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 2.0 5.0 2.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 2.0 5.0 2.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 2.0 5.0 2.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 5.0 2.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 5.0 2.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 5.0 2.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 5.0 | * *
Matrix A is stored in parallel-symmetric-tridiagonal storage mode and is distributed over a 1 × 3 process grid using block-cyclic distribution.
Notes:
ORDER = 'R' NPROW = 1 NPCOL = 3 CALL BLACS_GET (0, 0, ICONTXT) CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL) CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL) N NRHS D E IA DESC_A B IB DESC_B WORK LWORK INFO | | | | | | | | | | | | CALL PDPTSV( 12 , 3 , D , E , 1 , DESC_A , B , 1 , DESC_B , WORK , 0 , INFO)
| Desc_A |
---|---|
DTYPE_ | 501 |
CTXT_ | icontxt(CGBTO13) |
N_ | 12 |
NB_ | 4 |
CSRC_ | 0 |
Not used | -- |
Reserved | -- |
Notes: |
| Desc_B |
---|---|
DTYPE_ | 502 |
CTXT_ | icontxt(CGBTO14) |
M_ | 12 |
MB_ | 4 |
RSRC_ | 0 |
LLD_B | 4 |
Reserved | -- |
Notes: |
Global vector d with block size of 4:
B,D 0 1 2 * * 0 | 4.0 5.0 5.0 5.0 | 5.0 5.0 5.0 5.0 | 5.0 5.0 5.0 5.0 | * *
Global vector e with block size of 4:
B,D 0 1 2 * * 0 | 2.0 2.0 2.0 2.0 | 2.0 2.0 2.0 2.0 | 2.0 2.0 2.0 . | * *
The following is the 1 × 3 process grid:
B,D | 0 | 1 | 2 -----| ------- | ------- |------- 0 | P00 | P01 | P02
Local array D with block size of 4:
p,q | 0 | 1 | 2 -----|----------------------|-----------------------|---------------------- 0 | 4.0 5.0 5.0 5.0 | 5.0 5.0 5.0 5.0 | 5.0 5.0 5.0 5.0
Local array E with block size of 4:
p,q | 0 | 1 | 2 -----|----------------------|-----------------------|--------------------- 0 | 2.0 2.0 2.0 2.0 | 2.0 2.0 2.0 2.0 | 2.0 2.0 2.0 .
Global matrix B with a block size of 4:
p,q | 0 -----|---------------- | 70.0 8.0 6.0 | 99.0 18.0 9.0 0 | 90.0 27.0 9.0 | 81.0 36.0 9.0 -----|---------------- | 72.0 45.0 9.0 | 63.0 54.0 9.0 1 | 54.0 63.0 9.0 | 45.0 72.0 9.0 -----|---------------- | 36.0 81.0 9.0 | 27.0 90.0 9.0 2 | 18.0 99.0 9.0 | 9.0 82.0 7.0
The following is the 1 × 3 process grid:
B,D | 0 | 1 | 2 -----| ------- | ------- |------- 0 | P00 | P01 | P02
Local matrix B with a block size of 4:
p,q | 0 | 1 | 2 -----|-----------------|------------------|----------------- | 70.0 8.0 6.0 | 72.0 45.0 9.0 | 36.0 81.0 9.0 | 99.0 18.0 9.0 | 63.0 54.0 9.0 | 27.0 90.0 9.0 0 | 90.0 27.0 9.0 | 54.0 63.0 9.0 | 18.0 99.0 9.0 | 81.0 36.0 9.0 | 45.0 72.0 9.0 | 9.0 82.0 7.0
Output:
Global matrix B with a block size of 4:
p,q | 0 -----|---------------- | 12.0 1.0 1.0 | 11.0 2.0 1.0 0 | 10.0 3.0 1.0 | 9.0 4.0 1.0 -----|---------------- | 8.0 5.0 1.0 | 7.0 6.0 1.0 1 | 6.0 7.0 1.0 | 5.0 8.0 1.0 -----|---------------- | 4.0 9.0 1.0 | 3.0 10.0 1.0 2 | 2.0 11.0 1.0 | 1.0 12.0 1.0
The following is the 1 × 3 process grid:
B,D | 0 | 1 | 2 -----| ------- | ------- |----- 0 | P00 | P01 | P02
Local matrix B with a block size of 4:
p,q | 0 | 1 | 2 -----|-----------------|------------------|----------------- | 12.0 1.0 1.0 | 8.0 5.0 1.0 | 4.0 9.0 1.0 | 11.0 2.0 1.0 | 7.0 6.0 1.0 | 3.0 10.0 1.0 0 | 10.0 3.0 1.0 | 6.0 7.0 1.0 | 2.0 11.0 1.0 | 9.0 4.0 1.0 | 5.0 8.0 1.0 | 1.0 12.0 1.0
The value of info is 0 on all processes.