gbd_dmat: GBD Matrix to Distributed Dense Matrix and vice versa

Description Usage Arguments Details Value Examples

Description

This function convert a GBD matrix and a distributed dense matrix.

Usage

1
2
3
4
5
6
gbd2dmat(X.gbd, skip.balance = FALSE, comm = .pbd_env$SPMD.CT$comm,
  gbd.major = .pbd_env$gbd.major, bldim = .pbd_env$BLDIM,
  ICTXT = .pbd_env$ICTXT)

dmat2gbd(X.dmat, bal.info = NULL, comm = .pbd_env$SPMD.CT$comm,
  gbd.major = .pbd_env$gbd.major)

Arguments

X.gbd

a GBD matrix.

skip.balance

if load.balance were skipped.

comm

a communicator number.

gbd.major

1 for row-major storage, 2 for column-major.

bldim

the blocking dimension for block-cyclically distributing the matrix across the process grid.

ICTXT

BLACS context number for return.

X.dmat

a ddmatrix matrix.

bal.info

a returned object from balance.info.

Details

X.gbd is a matrix with dimension N.gbd * p and exists on all processors. N.gbd may be vary across processors.

If skip.balance = TRUE, then load.balance will not be called and X.gbd is preassumed to be balanced.

For demonstration purpose, these objects should not contains weird values such as NA.

dmat2gbd is supposed returned a balanced gbd matrix if bal.info is not supplied.

Value

gbd2dmat returns a ddmatrix object. dmat2gbd returns a (balanced) gbd matrix.

Examples

1
2
3
4
5
6
## Not run: 
### Under command mode, run the demo with 4 processors by
### (Use Rscript.exe for windows system)
mpiexec -np 4 Rscript -e "demo(gbd_dmat,'pbdDEMO',ask=F,echo=F)"

## End(Not run)

pbdDEMO documentation built on May 2, 2019, 3:33 p.m.