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="")))
# Save code in a file "demo.r" and run with 2 processors by# > mpiexec -np 2 Rscript demo.rlibrary(pbdBASE, quiet = TRUE)
init.grid()
mygrid <- blacs(0)
comm.print(mygrid)
finalize()