# 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()
comm.set.seed(diff=T)
x <- ddmatrix("rnorm", 10, 10)
y <- scale(x)
print(y)
finalize()
Run the code above in your browser using DataLab