expand: expand

Description Usage Arguments Value Communication Examples

View source: R/expand.r

Description

Expand a regular matrix owned on MPI rank 0 into a shaq.

Usage

1
expand(x, class = "shaq")

Arguments

x

A regular matrix.

class

'shaq' or 'tshaq'

Value

A shaq or a tshaq.

Communication

Short answer: quite a bit. Each local submatrix has to be received from rank 0.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
spmd.code = "
  library(kazaam)
  if (comm.rank() == 0){
    x = matrix(runif(30), 10, 3)
  } else {
    x = NULL
  }
  
  dx = expand(x)
  dx
  
  finalize()
"

pbdMPI::execmpi(spmd.code=spmd.code, nranks=2)

RBigData/kazaam documentation built on Nov. 9, 2021, 9:09 a.m.