# NOT RUN {
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)
# }
Run the code above in your browser using DataLab