Matrix Descriptors
The matrix descriptor DESCA is associated with each global matrix in a distributed matrix system. It describes the mapping relationship between the global matrix, the processes, and the memory locations. In theory, each distributed matrix has its own individual matrix descriptor; however, matrices sharing identical distribution patterns can share a single descriptor. The x_ matrix descriptor entry denotes the attribute of a global matrix. For example, M_ denotes the number of rows, and M_A denotes the number of rows in global matrix A. The descriptor type and matrix storage mode vary according to the matrix type. The following lists the content of the matrix descriptor DESCA.
Dense Matrices
A general distributed matrix A (M_ × N_) is defined by its dimensions, the size of the elementary MB_ × NB_ block used for its factorization, the coordinates of the process having in its local memory the first matrix entry (RSRC_,CSRC_), and the BLACS context (CTXT_) in which this matrix is defined. A local leading dimension LLD_ is associated with the local memory address pointing to the data structure used for the local storage of this distributed matrix.
|
Descriptor Name |
Scope |
Definition |
|---|---|---|
|
DTYPE_A |
Global |
Type of the matrix. |
|
CTXT_A |
Global |
BLACS context handle, representing the distribution of global matrix A on the process grid. |
|
M_A |
Global |
Number of rows in global matrix A. |
|
N_A |
Global |
Number of columns in global matrix A. |
|
MB_A |
Global |
Blocking factor used to distribute rows. |
|
NB_A |
Global |
Blocking factor used to distribute columns. |
|
RSRC_A |
Global |
Process row over which the first row of matrix A is distributed. |
|
CSRC_A |
Global |
Process column over which the first column of matrix A is distributed. |
|
LLD_A |
Local |
Leading dimension of the local matrix. |
The matrix descriptor is initialized through the descinit_ interface.
int descA[9];
descinit_( descA, &m, &n, &mb, &nb, &rsrc, &csrc, &ctxt, &lddA, &info);
m and n indicate the global matrix row and column, respectively. mb and nb indicate the sizes of the matrix blocks. rsrc and csrc indicate the positions of the first element (0,0) of the global matrix in the process grid. Therefore, 0 ≤ rsrc < nprow and 0 ≤ csrc < npcol. ctxt is the context handle that contains the process grid information. info is the return value of the ScaLAPACK function and indicates whether an error is reported during function calling and the error cause.
