Learn R Programming

pbdBASE (version 0.1-1)

BLACS: Get BLACS Context Grid Information

Description

Grabs the existing BLACS context grid information.

Usage

blacs(ICTXT = 0)

Arguments

ICTXT
BLACS context number.

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.

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="")))

See Also

InitGrid

Examples

Run this code
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r

library(pbdBASE, quiet = TRUE)
init.grid()

mygrid <- blacs(0)

comm.print(mygrid)

finalize()

Run the code above in your browser using DataLab