octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #59599] movmean crashes Octave


From: Rik
Subject: [Octave-bug-tracker] [bug #59599] movmean crashes Octave
Date: Thu, 3 Dec 2020 19:51:20 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36

Follow-up Comment #11, bug #59599 (project octave):

Well, there are a few problems here.  It starts with movmean().  Apparently,
this function is designed for small window sizes.  Using your clue from
version 5.1 where Octave threw an OOM error.


movfun>movfun_oncol at line 295 column 10


The line in movfun.m is


  y(C,:) = fcn (x(slcidx));


I set a breakpoint at this line and then ran


octave:2> ypred = rand (1, 40e3);
octave:3> std (movmean (ypred, 365*4))


Inspecting the variables, C is 40e3 - window_size or ~38e3.  That's not a
problem.  However, slcidx is huge.


debug> size (slcidx)
ans =

    1460   38541

debug> sizeof (slcidx)
ans = 4.5016e+08


That is ~450 MB.  Either something more clever needs to be done internally to
movfun to reduce the size of that variable or the function might need to be
converted to C++ so that it can use loops rather than index vectors.

But, the immediate question is why this doesn't just throw an error and return
the user to the Octave prompt when the new() operator fails to allocate
memory.

@Evangelos: Does a straightforward impossibility like


x = ones (1e50, 1);


throw an OOM error or does this immediately crash too?



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59599>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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