Learn R Programming

pbdBASE (version 0.5-3)

base.procgrid: procgrid

Description

"Optimal" process grid when nprow and npcol are empty

Usage

base.procgrid(nprocs)

Arguments

nprocs

Number of processors.

Value

A list contains nprow and npcol.

Details

For advanced users only. See pbdDMAT for high-level functions.

Examples

Run this code
# NOT RUN {
spmd.code <- "
  suppressMessages(library(pbdMPI))
  suppressMessages(library(pbdBASE))
  init.grid()

  opt <- base.procgrid(4)
  comm.print(opt)

  opt <- base.procgrid(6)
  comm.print(opt)

  opt <- base.procgrid(8)
  comm.print(opt)

  finalize()
"
pbdMPI::execmpi(spmd.code = spmd.code, nranks = 1L)

# }

Run the code above in your browser using DataLab