inst/examples/test_performance/demo_allgather_spmd.r

suppressMessages(library(pbdMPI, quietly = TRUE))

time.proc <- list()

time.proc$default <- system.time({
  for(i in 1:1000){
    y <- allgather(list(x = 1:10000))
  }
  barrier()
})

time.proc$matrix <- system.time({
  for(i in 1:1000){
    y <- allgather(matrix(1:10000, nrow = 100))
  }
  barrier()
})

comm.print(time.proc, quiet = TRUE)
finalize()
RBigData/pbdMPI documentation built on Jan. 31, 2024, 10:34 p.m.