On Aug 1, 2011, at 3:04 AM, Dimitris.Kapetanakis wrote:

Thanks a lot for the help.

Actually, I am using a mac which (R for Mac OS X GUI 1.40-devel Leopard build 32-bit (5751)) but I think I can find access on windows 7 64- bit.

I don't think that was what Holtman was advising. You just need more available memory, no need to use Win7. The Mac platform has been 64- bit capable longer than the Windoze OS, anyway. The way you get there might be as simple as rebooting, not starting any other applications, and re-running your code. Success depends upon how much addressable memory you have, which you did not state. All of the stuff below is immaterial to these considerations.

What
I am trying to do is a maximization through grid search (because I am not sure that any of the optim() methods works sufficiently to my case, at least all of them provide quite different results), the reason that I want the
optimizing is because I want to use it for a Monte Carlo analysis for
Smoothed Maximum Score estimator, and for that reason I want the
optimization to be the most efficient possible, but given that I am kind of
amateur on R and on programming in general, I doubt that I can do that
sufficiently.

Your code ran without problem on my Mac running Leopard using an R64 GUI session with 32 GB RAM (R.app GUI 1.41 (5866)).

> str(G.search)
 num [1:40000000, 1:3] 1 1 1 1 1 1 1 1 1 1 ...

I have no idea whether it produced meaningful results, but a 120 million item matrix is not a problem with enough physical memory. It's only around a Gig. Your error indicated a problem with allocating 915.5 Mb. That should be possible (although borderline) in 4GB Mac running 32 bit R. (32 bit R is more memory efficient when working with physical memory of 4 GB or less because the pointer size is smaller.)

--
david.

--
View this message in context: 
http://r.789695.n4.nabble.com/memory-problem-Error-cannot-allocate-vector-of-size-915-5-Mb-tp3707943p3709002.html
Sent from the R help mailing list archive at Nabble.com.



David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to