Re: out of memory message
- From: "Steven Lord" <slord@xxxxxxxxxxxxx>
- Date: Fri, 10 Mar 2006 09:21:24 -0500
"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
.
- References:
- out of memory message
- From: Halil
- Re: out of memory message
- From: M. Tetouan
- out of memory message
- Prev by Date: Re: Matrix Manipulation
- Next by Date: Re: expm
- Previous by thread: Re: out of memory message
- Next by thread: Re: out of memory message
- Index(es):
Relevant Pages
|
Loading