Skip to content

Rmpi long vector support

14 messages · Ei-ji Nakama, Xiaochun Sun, Hao Yu +3 more

#
Hi,

<WARNING>
It is not yet completed...
</WARNING>
http://prs.ism.ac.jp/~nakama/Rhpc/

2013/8/7, Xiaochun Sun <xiaoch.sun at gmail.com>:
Its can treat the considerably big data.
#
Jim,
On Aug 7, 2013, at 11:59 AM, Jim Gattiker <j.gattiker at gmail.com> wrote:

            
that is not true. R supports vectors up to 2^52 elements. That is way beyond current RAM sizes and certainly more than 2^31:
[1] 2.4e+10
[1] 34.48232

However Rmpi does not. You have to use XLENGTH and R_xlen_t in the C code if you want to go beyond 2^31.

Cheers,
Simon
#
Hi Simon,

Thank for pointing out this XLENGTH and R_xlen_t. I will add them in the
next release of Rmpi.

However I do run into the following issue. On a debian system with R 3.0.1
(8GB ram), I can run
[1] 2.4e+09

However, on a win7 64 with R 3.0.1 (16GB ram), I got
Error: long vectors not supported yet: ../include/Rinlinefuns.h:100

Is this a bug or xlenght is not implemented in R win version?

Thanks,

Hao
Simon Urbanek wrote:

  
    
#
To all,

Look like the max buffer size in any MPI transfer is restricted to 2^31-1.
Whether XLENGTH is used or not will not change it. This is the restriction
of MPI-2. MPI-3 will address some of those issues. Until then we either
split the data in R before transferring or define a user-defined type
(e.g. a contiguous type like 10 double as one unit so we can transfer max
10*(2^31-1) elements of double).

Hao
Simon Urbanek wrote:

  
    
#
On Aug 8, 2013, at 10:58 AM, Jim Gattiker <j.gattiker at gmail.com> wrote:

            
Nope, since R 3.0.0 we use 64-bit binaries on Mac OS X:

$ R
R version 3.0.1 Patched (2013-07-15 r63328) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin10.8.0 (64-bit)
[...]
[1] 8
http://cran.r-project.org/bin/macosx/

Cheers,
Simon
#
On Aug 7, 2013, at 9:42 PM, Hao Yu <hyu at stats.uwo.ca> wrote:

            
I'm currently traveling so I cannot check. It's a good question - maybe try R-devel? 
Note that long int on Windows is only 32-bit so I wonder if it is related ...

Cheers,
Simon
#
On Aug 8, 2013, at 1:44 PM, Jim Gattiker <j.gattiker at gmail.com> wrote:

            
Ok, thanks, I was checking with 3.0.1 so I didn't notice.
That's possible - Rstudio overrides R functions which has caused problems before. If in doubt, test with R.

Cheers,
Simon