gridinfo: Get BLACS Context Grid Information

Description Usage Arguments Details Value Examples

Description

Grabs the existing BLACS context grid information.

Usage

1
2
3
base.blacs(ICTXT = 0)

blacs(ICTXT = 0)

Arguments

ICTXT

BLACS context number.

Details

BLACS contexts have important internal use, and advanced users familiar with ScaLAPACK might find some advantage in directly manipulating these process grids. Most users should not need to directly manage BLACS contexts, in this function or elsewhere.

The function effectively serves as a shorthand for

eval(parse(text=paste(".__blacs_gridinfo_", ICTXT, sep="")))

Value

Returns a list with 5 elements: NPROW and NPCOL, the number of process rows and columns respectively; ICTXT, the associated BLACS context number; MYROW and MYCOL, the current process' row and column position in the process grid.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
spmd.code <- "
  suppressMessages(library(pbdMPI))
  suppressMessages(library(pbdBASE))
  init.grid()

  mygrid <- blacs(0)
  comm.print(mygrid, all.rank = TRUE)

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

pbdBASE documentation built on March 26, 2020, 9:37 p.m.