Page 1 of 1

Memory allocation error

PostPosted: Sat Aug 22, 2015 8:12 pm
by jeff.stetz
I know this has been brought up before but I haven't been able to find a solution, at least not for my particular case.

I am attempting to run SECR models that include covariates for g0 and sigma, but continue to get the following error for certain covariates.

Checking data
Preparing detection design matrices
Preparing density design matrix
Maximizing likelihood...
Eval Loglik D D.gbf1prdD g0 g0.TYPETrap g0.evi177193trap sigma
Error in FUN(1L[[1L]], ...) :
cannot allocate memory block of size 134217728 Tb
Calls: secr.fit ... <Anonymous> -> <Anonymous> -> f -> sapply -> lapply -> FUN -> .C
Execution halted

Models with integer (ie, 0-99) and/or categorical covariates run fine, but anything else (ie, values 0-99 with decimals, all values <1, or integers from 1k-20k) results in the above error. The memory block size value is always exactly the same. Even the simplest models (ie, D~1, g0~evi177193trap, sigma~1) with a single "problematic" covariate produces this error.

I am running models on an HPC with <= 128 Gb RAM and <=16 processors per node, and have gotten the same error on at least two other machines. Any suggestions would be most appreciated. Thanks.

Re: Memory allocation error

PostPosted: Sun Aug 23, 2015 5:04 pm
by murray.efford
The obvious solution is to try discretizing the covariate(s) into a small integer number of categories...
Memory is allocated for each combination of levels of the covariates.
Murray

Re: Memory allocation error

PostPosted: Mon Aug 24, 2015 2:42 pm
by mjgould
Hey Jeff,

Perhaps number type isn't the issue? I'm running models with a covariate that contains values from -2 to 3 and with decimals, and I haven't had any issues with memory allocation.