필터 지우기
필터 지우기

Matlab error "out of memory"

조회 수: 5 (최근 30일)
Nikolas Spiliopoulos
Nikolas Spiliopoulos 2019년 5월 9일
댓글: Nikolas Spiliopoulos 2019년 5월 16일
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

답변 (1개)

Pruthvi Muppavarapu
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
  댓글 수: 1
Nikolas Spiliopoulos
Nikolas Spiliopoulos 2019년 5월 16일
thanks a lot, I am gonna give it a try or break the optimization in smaller ones
thanks again!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by