Hi there R-helpers: I'm having problems with the function ode() found in the package deSolve. It seems that when my state variables are too numerous (>33000 elements), the function throws the following error:
Error in vode(y, times, func, parms, ...) : cannot allocate memory block of size 137438953456.0 Gb In addition: Warning message: In vode(y, times, func, parms, ...) : NAs introduced by coercion This appears to be case regardless of the computer I use; that is, whether it's a laptop or server with 24Gb of RAM. Why is ode() trying to allocate 137 billion gigabytes of memory?! (I receive exactly the same error message whether I have, for example, 34000 or 80000 state variables: the amount of memory trying to be allocated is exactly the same.) I have included a trivial example below that uses a function that returns a rate of change of zero for all state variables. > require(deSolve) Loading required package: deSolve > C<-rep(0,34000) > TestFunc<-function(t,C,para){ + return(list(rep(0,length(C)))) + } > soln<-ode(y=C,times=seq(0,1,0.1),func=TestFunc,parms=c(0),method="vode") Error in vode(y, times, func, parms, ...) : cannot allocate memory block of size 137438953456.0 Gb In addition: Warning message: In vode(y, times, func, parms, ...) : NAs introduced by coercion > Am I making a foolish mistake somewhere or is this simply a limitation of the function? Thanks in advance! [[alternative HTML version deleted]] ______________________________________________ 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.