[FieldTrip] memory leak in ft_selectdata

Maximilien Chaumon maximilien.chaumon at gmail.com
Fri Oct 20 16:30:19 CEST 2017


Perfect! that fixed it, many thanks!

Max

Le ven. 20 oct. 2017 à 09:35, Schoffelen, J.M. (Jan Mathijs) <
jan.schoffelen at donders.ru.nl> a écrit :

> Hi Max,
>
> From your (otherwise clear) description, I am not sure whether your issue
> is due to the actual data selection itself. Rather, my first thought would
> be that something goes amiss with recursive piling up of large amounts of
> irrelevant (for the plotting at least) metadata, that gets assembled while
> iterating through subsequent interactive plotting steps.
> It’s kind of a long story, which I am not going to type down here, but to
> check whether I am thinking into the right direction, could you see whether
> your problem persists if you call ft_topoplotER in the following way?
>
>
> ft_topoplotER(cfg, rmfield(big_spec_grad, ‘cfg’));
>
> Thanks,
>
> Jan-Mathijs
>
>
>
> > On 19 Oct 2017, at 11:18, Maximilien Chaumon <
> maximilien.chaumon at gmail.com> wrote:
> >
> > Dear all,
> >
> > I'm doing topoplots of rather large spectrum data focused on a tiny
> frequency portion
> >     cfg = [];
> >     cfg.parameter = 'logmpowspctrm';
> >     cfg.comment = 'no';
> >     cfg.xlim = [20 21];
> >     cfg.zlim = 'maxmin';
> >     cfg.layout = 'neuromag306all.lay';
> >     cfg.colorbar = 'no';
> >     big_spec_grad.dimord = 'chan_freq';
> >     ft_topoplotER(cfg,big_spec_grad);
> >
> > This used to work fine until a last update this week from a version I
> suspect dated back to 03/17.
> > Now today, the ft_topoplotER line eats up a lot of memory
> > the call to "ft_prepare_layout" took 0 seconds and required the
> additional allocation of an estimated 0 MB
> > the call to "ft_selectdata" took 0 seconds and required the additional
> allocation of an estimated 1283 MB
> > the call to "ft_topoplotER" took 1 seconds and required the additional
> allocation of an estimated 1283 MB
> >
> > This gets more dramatic the second time this part of the script runs
> (with 2500MB added for reach topoplot) and then crashes on the next
> iteration with all of 30GB RAM eaten up by this.
> >
> > I traced down the memory leak to ft_selectdata line 1281 in a
> subfunction called cellmatselect.
> >       x = x(:,selindx,:,:,:,:);
> > The memory usage jumps every time this dimension gets selected. (I admit
> I do have a lot of frequencies, over 13000, but I need them for my
> application).
> > Memory comes back to a normal level when the figure is closed, but as I
> said, execution with another dataset eats up double the amount of memory
> and I don't know how to get out of this...
> >
> > Any help is much appreciated.
> > Thanks!
> > Max
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20171020/da6edcea/attachment-0002.html>


More information about the fieldtrip mailing list