Re: out of memory message




"M. Tetouan" <centrino@xxxxxxxxxxxxx> wrote in message
news:ef2bbdb.1@xxxxxxxxxxxxxxxxxxx
Halil wrote:


I am getting "out of memory" message when I use "fsolve". I have
got
300 nonlinear equations equations in the 100 grid points for each
equations. Therefore the Jacobian that fsolves needs to handle is
30000x30000 in dimension in my problem. When the dimension is low
I
have no problem but I need to work in high dimension like above.
Does anyone know how to tackle this problem.

Thank you...

Pre-allocating a matrix of size 30000x30000 requires 7.2 GB of memory
which is too costly. However, you may be able to solve your problem
if the Jacobian matrix is sparse.

J1 = zeros(30000,30000); %out of memory
J2 = sparse(30000,30000); %no problem

If your Jacobian is sparse, Halil, be sure to set the Jacobian, JacobMult,
and/or JacobPattern properties (whichever is appropriate) using the OPTIMSET
function and pass that options structure into FSOLVE, so that FSOLVE knows
that the Jacobian is sparse and where the nonzeros are located.

http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/f19175.html

If you specify JacobMult and/or JacobPattern, you will also need to set the
LargeScale property to 'on'..

If you don't have a sparse Jacobian, you may need to try to break your
problem into smaller pieces, say working on one grid point at a time or
solving one of the 300 nonlinear equations across all the grid points at a
time.

--
Steve Lord
slord@xxxxxxxxxxxxx


.



Relevant Pages

  • Re: solving two of nonlinear equations and two unknwons.
    ... I have a problem about solving two of nonlinear equations. ... I cannot have anallytic Jacobian. ... Solves a nonlinear least squares problem subject to bounds on the ... you are using codes which try to approximate derivatives (Jacobians) ...
    (sci.math.num-analysis)
  • Re: solving two of nonlinear equations and two unknwons.
    ... I have a problem about solving two of nonlinear equations. ... I cannot have anallytic Jacobian. ...  I use IMSL and fortran. ... What does "Number of good digits in the function." ...
    (sci.math.num-analysis)
  • solving two of nonlinear equations and two unknwons.
    ... I have a problem about solving two of nonlinear equations. ... I cannot have anallytic Jacobian. ... I use IMSL and fortran. ... Solves a nonlinear least squares problem subject to bounds on the ...
    (sci.math.num-analysis)
  • Re: fsolve
    ... does this indicate fsolve can not be used ... for a large-scale nonlinear system of algebraic equations? ... I don't see why it matters whether the system is algebraic equations ... Jacobian If 'on', fsolve uses a ...
    (comp.soft-sys.matlab)
  • i want to tell fsolve to call my function in parallel
    ... i want to tell fsolve that when it is building a jacobian for its next guess (i use ... i think matlab is "merely" parallelizing my loops and vectorizing ... eligible operations, and despite efforts at parallel-friendly coding, i only see a ...
    (comp.soft-sys.matlab)

Loading