Skip to content

Commit

Permalink
Version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pnavaro committed Sep 26, 2024
1 parent 8ce4b42 commit e83412e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions codes/rmpi_rowSums.r
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
3 changes: 1 addition & 2 deletions corrections/rowsum.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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())

0 comments on commit e83412e

Please sign in to comment.