# NOT RUN {
spmd.code = "
library(pbdDMAT, quiet = TRUE)
init.grid()
dx <- ddmatrix(1:16, ncol=4, bldim=2)
y <- as.matrix(dx, proc.dest=0)
comm.print(y)
finalize()
"
pbdMPI::execmpi(spmd.code = spmd.code, nranks = 2L)
# }
Run the code above in your browser using DataLab