ddmatrix-class: Class ddmatrix
Description
Distributed matrix class.Creating Objects
new('ddmatrix', Data = ..., dim = ..., ldim = ...,
bldim = ..., ICTXT = ...)
Details
ddmatrix
is the container for ScaLAPACK-friendly parallel
block-cyclically distributed matrices. The class object is
instantiated in SPMD fashion, whereby each process owns a piece
of the "whole" matrix (which no single R process need ever own in
its entirety), and each process stores its piece of the whole into a
container with a name common to all processes.
The Data
slot contains the data (submatrix) belonging to
that process. Accessible via submatrix()
.
Values in the
Data
slot will vary from process to process.
The dim
slot contains the global dimension; the dimension
of the full matrix. Accessible via
dim()
. The dim
slot is global, i.e. each process stores the same information in
this slot.
The ldim
slot contains the local dimension; here,
all(ldim == dim(Data))
. Accessible via
ldim()
. Values
in the Data
slot will vary from process to process.
The bldim
slot contains the blocking factor for the block-
cyclic distribution of the data. It consists of two numbers,
namely the row and column blocking, respectively. Accessible via
bldim()
.
The bldim
slot is global, i.e. each process
stores the same information in this slot.
The ICTXT
slot contains the BLACS context onto which the
matrix information is stored. This is mostly for internal
bookkeeping, though advanced users might be able to effectively
leverage differing BLACS contexts for performance improvements.
Accessible via ictxt()
.
The ICTXT
slot is global, i.e. each process
stores the same information in this slot.
A very important piece of information is that every process must
own something in the Data slot. This is essentially a ScaLAPACK
"problem", but one that is not particularly hard to avoid so long
as you are aware that it exists. A submatrix of
matrix(0, nrow=1, ncol=1)
is used if the matrix should not
actually, technically, own part of the whole global matrix. You can
easily still see if the stored submatrix is indeed part of the global
matrix or just a placeholder with the
ownany()
function, which
is just a wrapper on numroc()
with argument fixme=FALSE
.