[R-sig-hpc] Shared Memory

Nathan S. Watson-Haigh nathan.watson-haigh at csiro.au
Mon Apr 20 07:36:31 CEST 2009

I'm new to HPC and parallel programming but I've created my own R
package which has a parallel (using Rmpi) and non-parallel
implementation of the same algorithm. It works nicely, but I'm trying to
better understand how/if Rmpi uses shared memory. Does/can Rmpi use
shared memory? For instance, if each slave needs access to the same data
matrix, does Rmpi create a copy of that data for each slave when I do:

I think it does create a copy and I therefore currently pass a subset of
the data matrix to each slave using:
objList <- list(m=m[xMin:nrow(m), xMin:nrow(m)])
mpi.send.Robj(objList, slave_id, 1)

myMatrix can be up to 24k x 24k in size. That's > 4Gb of RAM just to
hold it in memory! I suppose I'm wondering if memory requirements are
proportional to the number of slaves requested - if each slave has to
have it's own copy of the data and if I can reduce this requirement by
utilising the shared memory!?


More information about the R-sig-hpc mailing list