# NOT RUN {
spmd.code <- "
suppressMessages(library(pbdMPI))
suppressMessages(library(pbdBASE))
init.grid()
opt <- base.procgrid(4)
comm.print(opt)
opt <- base.procgrid(6)
comm.print(opt)
opt <- base.procgrid(8)
comm.print(opt)
finalize()
"
pbdMPI::execmpi(spmd.code = spmd.code, nranks = 1L)
# }
Run the code above in your browser using DataLab