# 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()
blacs_ <- blacs(ICTXT = 0)
# get the ICTXT = 0 BLACS coordsinates for process 0
myCoords <- pcoord(ICTXT = 0, PNUM = 0)
comm.print(myCoords)
finalize()
Run the code above in your browser using DataLab