help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Memory issues when using GSL ODE solver


From: Daniele Nicolodi
Subject: Re: [Help-gsl] Memory issues when using GSL ODE solver
Date: Mon, 25 Nov 2013 19:32:48 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 25/11/2013 19:19, Alex Shevtsov wrote:
>> Excellent.  This was with GSL version 1.16?
> 
> No, I compiled it all with GSL 1.15 from Ubuntu 12.04 repositories. But
> still I see no leaks in the C-version, while there is something in the
> Cython/Python version.
> 
>> Sometimes scripting environments or shared libraries will "hold
>> on" to memory until they exit or until they're asked to let go (e.g.
>> Intel MKL and FFTW both do this).
> 
> Probably it is the problem of a Python interpreter. It has an automatic
> garbage collector, which is probably invoked in the end, when all the loops
> are finished. But while they were running, the memory was being consumed. I
> never had any problems with it before though.
> 
> I have to think how to work-around these difficulties. Any suggestions are
> very appreciated.

Python memory management should not be the problem here, at least if you
are not leaking references to unused objects.

I believe Cython itself, is unlikely the responsible for the memory
leak, because it does not do much memory allocation.  If the same code
written in C does not exhibit the memory leak, I believe the problem may
be in your wrapping of GSL in Cython.  Would you like to share your
code, at least the part that exhibits the memory leak?

Cheers,
Daniele




reply via email to

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