Array-based Communication

Many communication packages can be classified as having operations based on one dimensional arrays, which are the machine representation for linear algebra's vector class. In programming linear algebra problems, however, it is more natural to express all operations in terms of matrices. Vectors and scalars are, of course, simply subclasses of matrices. On computers, a linear algebra matrix is represented by a two dimensional array (2D array), and therefore the BLACS operate on 2D arrays.

The BLACS recognize the two most common classes of matrices for dense linear algebra. The first of these classes consist of general rectangular matrices, which in machine storage are 2D arrays consisting of M rows and N columns, with a leading dimension, LDA, that determines the distance between successive columns in memory.

The general rectangular matrices therefore take the following parameters as input when determining what array to operate on:

M
(input) INTEGER
The number of matrix rows to be operated on.
N
(input) INTEGER
The number of matrix columns to be operated on.
A
(input/output) TYPE DEPENDS ON ROUTINE, array of dimension (LDA,N)
A pointer to the beginning of the (sub)array to be sent.
LDA
(input) INTEGER
The distance between two elements in matrix row.
The second class of matrices recognized by the BLACS are trapezoidal matrices (triangular matrices are a sub-class of trapezoidal) Trapezoidal arrays are defined by M, N, and LDA, as above, but they have two additional parameters as well. These parameters are:
UPLO
(input) CHARACTER*1
Indicates whether the matrix is upper or lower trapezoidal, as discussed below.
DIAG
(input) CHARACTER*1
Indicates whether the diagonal of the matrix is unit diagonal (will not be operated on) or otherwise (will be operated on).
The shape of the trapezoidal arrays is determined by these parameters as follows:
            

The packing of arrays (if required) so that they may be sent efficiently is hidden, allowing the user to concentrate on the logical matrix, rather than how the data is organized in the machine's memory.