# NOT RUN {
spmd.code <- "
suppressMessages(library(pbdMPI))
suppressMessages(library(pbdBASE))
init.grid()
iown <- base.ownany(dim=c(4, 4), bldim=c(4, 4), ICTXT=0)
comm.print(iown, all.rank = TRUE)
finalize()
"
pbdMPI::execmpi(spmd.code = spmd.code, nranks = 2L)
# }
Run the code above in your browser using DataLab