This subroutine factors the positive definite symmetric tridiagonal matrix A, stored in parallel-symmetric-tridiagonal storage mode, where, in this description, A represents the global positive definite symmetric tridiagonal submatrix
Aia:ia+n-1, ia:ia+n-1.
To solve a tridiagonal system of linear equations with multiple right-hand sides, follow the call to PDPTTRF with one or more calls to PDPTTRS. The output from this factorization subroutine should be used only as input to the solve subroutine PDPTTRS.
If n = 0, no computation is performed and the subroutine
returns after doing some parameter checking. See reference [51].
d, e, af, work | Subroutine |
Long-precision real | PDPTTRF |
Fortran | CALL PDPTTRF (n, d, e, ia, desc_a, af, laf, work, lwork, info) |
C and C++ | pdpttrf (n, d, e, ia, desc_a, af, laf, work, lwork, info); |
Scope: global
Specified as: a fullword integer, where:
where p is the number of processes in a process grid.
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 91. 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 91. 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 92. 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 93. 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 |
|
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 94. 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 95. 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: a fullword integer, where:
where, in the formulas above, P is the actual number of processes containing data.
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 91.
Scope:
Specified as: a fullword integer; where:
Scope: local
Returned as: a one-dimensional array of (at least) length LOCp(ia+n-1), containing numbers of the data type indicated in Table 91.
On output, D is overwritten; that is, the original input is not preserved.
Scope: local
Returned as: a one-dimensional array of (at least) length LOCp(ia+n-1), containing numbers of the data type indicated in Table 91.
On output, E is overwritten; that is, the original input is not preserved.
Scope: local
Returned as: a one-dimensional array of (at least) length laf, containing numbers of the data type indicated in Table 91.
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 data type indicated in Table 91, 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 factorization is completed; however, if you call PDPTTRS with these factors, the results of the computation are unpredictable.
Scope: global
Returned as: a fullword integer; info >= 0.
The factored matrix A is stored in an internal format that depends on the number of processes.
The scalar data specified for input argument n must be the same for both PDPTTRF and PDPTTRS.
The global vectors for d, e, and af input to PDPTTRS must be the same as the corresponding output arguments for PDPTTRF; and thus, the scalar data specified for ia, desc_a, and laf must also be the same.
DTYPE_A | Process Grid |
---|---|
501 | p × 1 or 1 × p |
502 | p × 1 or 1 × p |
1 | p × 1 or 1 × p |
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:
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:
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 3 × 1 process grid using block-cyclic distribution.
Notes:
ORDER = 'R' NPROW = 3 NPCOL = 1 CALL BLACS_GET (0, 0, ICONTXT) CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL) CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL) N D E IA DESC_A AF LAF WORK LWORK INFO | | | | | | | | | | CALL PDPTTRF( 12 , D , E , 1 , DESC_A , AF , 48 , WORK , 0 , INFO )
| Desc_A |
---|---|
DTYPE_ | 502 |
CTXT_ | icontxt(CGBTOO4) |
M_ | 12 |
MB_ | 4 |
RSRC_ | 0 |
Not used | -- |
Reserved | -- |
Notes: |
Global vector d with block size of 4:
B,D 0 * * | 4.0 | | 5.0 | 0 | 5.0 | | 5.0 | | --- | | 5.0 | | 5.0 | 1 | 5.0 | | 5.0 | | --- | | 5.0 | | 5.0 | 2 | 5.0 | | 5.0 | * *
Global vector e with block size of 4:
B,D 0 * * | 2.0 | | 2.0 | 0 | 2.0 | | 2.0 | | --- | | 2.0 | | 2.0 | 1 | 2.0 | | 2.0 | | --- | | 2.0 | | 2.0 | 2 | 2.0 | | . | * *
The following is the 3 × 1 process grid:
B,D | 0 -----| ------- 0 | P00 -----| ------- 1 | P10 -----| ------- 2 | P20
Local array D with block size of 4:
p,q | 0 -----|----- | 4.0 | 5.0 0 | 5.0 | 5.0 -----|----- | 5.0 | 5.0 1 | 5.0 | 5.0 -----|----- | 5.0 | 5.0 2 | 5.0 | 5.0
Local array E with block size of 4:
p,q | 0 -----|----- | 2.0 | 2.0 0 | 2.0 | 2.0 -----|----- | 2.0 | 2.0 1 | 2.0 | 2.0 -----|----- | 2.0 | 2.0 2 | 2.0 | .
Output:
Global vector d with block size of 4:
B,D 0 * * | .25 | | .25 | 0 | .25 | | 4.0 | | ---- | | .2 | | .24 | 1 | .25 | | 4.01 | | ---- | | 4.01 | | .25 | 2 | .24 | | .2 | * *
Global vector e with block size of 4:
B,D 0 * * | 2.0 | | 2.0 | 0 | 2.0 | | 2.0 | | ---- | | 2.0 | | 2.0 | 1 | 2.0 | | 2.0 | | ---- | | .49 | | .48 | 2 | .4 | | . | * *
The following is the 3 × 1 process grid:
B,D | 0 -----| ------- 0 | P00 -----| ------- 1 | P10 -----| ------- 2 | P20
Local array D with block size of 4:
p,q | 0 -----|------ | .25 | .25 0 | .25 | 4.0 -----|------ | .2 | .24 1 | .25 | 4.01 -----|------ | 4.01 | .25 2 | .24 | .2
Local array E with block size of 4:
p,q | 0 -----|------ | 2.0 | 2.0 0 | 2.0 | 2.0 -----|------ | 2.0 | 2.0 1 | 2.0 | 2.0 -----|------ | .49 | .48 2 | .4 | .
The value of info is 0 on all processes.