inst/examples/test_performance/demo_scatter_spmd.r

suppressMessages(library(pbdMPI, quietly = TRUE))

time.proc <- list()

x <- split(1:10000, rep(1:2, 5000))
time.proc$Robj <- system.time({
  for(i in 1:1000){
    y <- scatter(x)
  }
  barrier()
})

time.proc$integer <- system.time({
  for(i in 1:1000){
    y <- scatter(as.integer(1:10000), integer(5000))
  }
  barrier()
})

comm.print(time.proc, quiet = TRUE)
finalize()

Try the pbdMPI package in your browser

Any scripts or data that you put into this service are public.

pbdMPI documentation built on Sept. 10, 2023, 5:06 p.m.