diff --git a/codes/rmpi_rowSums.r b/codes/rmpi_rowSums.r index a9a1b09..0ffe01b 100644 --- a/codes/rmpi_rowSums.r +++ b/codes/rmpi_rowSums.r @@ -1,9 +1,6 @@ # File name: rmpi_rowSums.r loop.fun <- function(){ - ## - # Modify from loop_rowSums.r - ## m.dim <- list(nrow = 200000, ncol = 10) m <- matrix(1, nrow = m.dim$nrow, ncol = m.dim$ncol) diff --git a/corrections/rowsum.R b/corrections/rowsum.R index 4635bde..62b1384 100644 --- a/corrections/rowsum.R +++ b/corrections/rowsum.R @@ -11,7 +11,6 @@ my.size <- mpi.comm.size(comm=0) my.loop <- 20 my.split <- .splitIndices(my.loop, my.size) - my.loop <- unlist(my.split[my.rank+1]) ret <- 0 @@ -21,7 +20,7 @@ for(i in my.loop){ res <- mpi.reduce(as.integer(ret), type = 1, op = "sum", dest = 0, comm = 0) -if (my.rank == 0 ) { cat("\n", res, "\n") } +if (my.rank == 0 ) { cat("\n res = ", res, "\n") } invisible(mpi.barrier(comm=0)) invisible(mpi.finalize())