# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r
library(pbdDMAT, quiet = TRUE)
init.grid()
x <- ddmatrix(1:9, 3, 3)
x <- as.ddmatrix(x)
y <- list(dim=dim(x), ldim=ldim(x), bldim=bldim(x))
comm.print(y)
finalize()
Run the code above in your browser using DataLab