help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More on "memory exhausted..."


From: Martin Helm
Subject: Re: More on "memory exhausted..."
Date: Wed, 3 Aug 2011 16:34:38 +0200
User-agent: KMail/1.13.7 (Linux/2.6.37.6-0.7-desktop; KDE/4.6.5; x86_64; ; )

On Mittwoch, 3. August 2011 02:12:15 J Stasko wrote:
> My version of octave is 3.4.0, it is the MacPorts build.  I am running Snow
> Leopard, if that matters, 10.6.8.  I do not have the 64 bit enabled.  I do
> not see a memory spike, either.  I only have 2GB RAM on this monster.  Does
> increasing swap space help?  The function which I am calling is the
> following:
> 
> function y=heat4(u)
>    global A dx dy dt q Ulast dbg
>    y = (A .* del2(u,dx,dy)) + q - (u - Ulast) / dt;
> endfunction
> 
> Referring to the heat equation of
> http://www.wikipedia.org/Heat_equationunder heading "Internal heat
> generation"...
> 
> \begin{equation}
> \frac{\partial u}{\partial t} = \alpha \nabla^2 u + q
> \end{equation}
> 
> where A is $\alpha$, (u - Ulast) / dt is $\frac{\partial u}{\partial t}$,
> and the rest is the same.
> 
> Thank you for your time and help.
From what you pass as a function to fsolve I guess that the matrices 200x200 
and 217x217 are the grids you work on with your PDE and are effectively the 
"input vectors" for fsolve, which means they have a size of 40000 and higher. 
Looking into fsolve it does compute an approximation for the Jacobian and this 
is in fact a 40000x40000 matrix (if I understand in the right way what fsolve 
does here) in the first case (wich is around 12 GB of memory). So unless there 
is someone who knows a clever way how to avoid that I would write my own 
function to iteratively solve the problem and where you have full control over 
the intermediate objects in it instead of calling fsolve with these large 
input vectors.

Maybe someone comes up with a better idea.

By the way in my mail client it looks like you create everytime a new thread 
when you send an email to the list instead of continuing the existing one.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]