On Apr 29, 2010, at 8:56 AM, Sachi Ito wrote:
> Hi,
>
> Probably this is a very simple question for all the programmers, but how do
> you change from 32-bit builds (default) to 64-bit builds?
>
> I've been trying to run Anova to compare two models, but I get the
following
> error message:
>
> Error: cannot allocate vector of size 1.2 Gb
> R(3122,0xa0ab44e0) malloc: *** mmap(size=1337688064) failed (error code=12)
> *** error: can't allocate region
> *** set a breakpoint in malloc_error_break to debug
> R(3122,0xa0ab44e0) malloc: *** mmap(size=1337688064) failed (error code=12)
> *** error: can't allocate region
> *** set a breakpoint in malloc_error_break to debug
>
>
> I suppose it's a problem with memory allocation because of the big data
> size, so I thought I should use 64-bit builds instead of 32.
>
> As it was recommended in a manual, I've entered the following:
>
>> CC='gcc -arch x86_64'
>> CXX='g++ -arch x86_64'
>> F77='gfortran -arch x86_64'
>> FC='gfortran -arch x86_64'
>> OBJC='gcc -arch x86_64'
>
> But it still gave me error. I'd greatly appreciate if someone can
answer
> this question!
>
> Thank you,
> Sachi
What OS? If Linux, which distribution?
For the more common platforms, there are pre-built 64 bit binary versions of R
available, including Windows:
http://cran.r-project.org/bin/windows64/
Also, moving to 64 bit to take advantage of a larger memory space presumes that
you also have the physical memory available on your computer.
If you successfully built the 64 bit version on your system, it is possible that
you still have the 32 bit version installed and that is what is being run. You
can check this by using:
.Machine$sizeof.pointer
If it returns 4, you are running 32 bit R and it if returns 8, 64 bit.
HTH,
Marc Schwartz