Matlab error "out of memory"
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Pruthvi Muppavarapu
2019년 5월 15일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!