Matlab error "out of memory"
3 views (last 30 days)
Show older comments
Hi all,
I am running an optimization using fmincon. Initially, I run it with 3 minutes timestep and it runs fine. Afterwards, I run it with 1minute timestep and I get the following error:
Error using ldl
Out of memory. Type HELP MEMORY for your options.
Error in formAndFactorKKTmatrix
Error in formAndFactorKKTmatrix
Error in computeTrialStep
Error in barrier
Error in fmincon (line 798)
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] =
barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...
Error in P2P_TF_fault (line 383)
[x,fval]=fmincon(f,x0,A,b,Aeq,beq,lb,[],[],options);
I have seen some similar questions but I don't understand how you fix that. I run the 3-minute optimization in a computer with 8GB RAM and it ran fine. Then for the 1-minute I used one with 32GB RAM installed, so it's a bit odd as this amount of RAM should be more than enough.
indicatively, matrix A has a size [4800 X 4790] for the 3 minute optimization
and becomes [14400X14390] in the 1 minute optimization.
the memory of the system and the memory used is the following:
Maximum possible array: 54139 MB (5.677e+10 bytes) *
Memory available for all arrays: 54139 MB (5.677e+10 bytes) *
Memory used by MATLAB: 5658 MB (5.933e+09 bytes)
Physical Memory (RAM): 32678 MB (3.427e+10 bytes)
I hope the question is clear,
many thanks
Nikolas
0 Comments
Answers (1)
Pruthvi Muppavarapu
on 15 May 2019
Hi Nikolas,
The error looks like it might have been caused by the 'barrier.m' function which is called by the interior-point method. You could try changing the "fmincon" options to use "trust-region-reflective" algorithm instead ( a gradient needs to provided to use this algorithm).
Feel free to refer to the following page to learn more about fmincon options:
Hope this helps.
Regards,
Pruthvi
See Also
Categories
Find more on Numeric Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!