help-octave
[Top][All Lists]
Advanced

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

Freeing up memory occupied by mex ?


From: John W. Eaton
Subject: Freeing up memory occupied by mex ?
Date: Wed, 21 Jan 2009 10:41:59 -0500

On 21-Jan-2009, Rishi Amrit wrote:

|     I am using IPOPT ( https://projects.coin-or.org/Ipopt ) nonlinear solver
| for solving some large scale NLP's. It's used with Octave via mex interface
| provided along with the package. Quite expectedly, while solving large scale
| problems, memory usage will be high. Once an IPOPT call is finished, Octave
| still uses a lot of my system memory untill I exit. If I save all the
| variables in the workspace in a mat file, after the ipopt call, exit octave,
| restart it and load the variables back, I do not have Octave using all the
| memory it was using in the last call. So it seems the mex interface did not
| clean up the memory before coming out of the call. Is there a way to free up
| all that heavy memory that was being used by the mex function, without
| having to restart octave ?

The code in Octave that calls mex functions should free all memory
allocated with the mex/mx functions on exit.  Are you sure that the
leak is not in the ipopt code itself?

After calling ipopt, what happens if you clear all variables in the
workspace?

jwe


reply via email to

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