12
$\begingroup$

Bug introduced in 10.0.0 and fixed in 10.2.0.


I wrote a routine that convolves an impulse response array with a test array and checks for the RMS difference between that convolution and a data array. I do this iteratively so that I can modify the test array to obtain an improved fit to the data and eventually generate a good prediction of the test array required to produce the data.

I noticed that my memory in use increases steadily (I've narrowed it down to the ListConvolve function) and I'm hoping someone knows how to mitigate this memory drain.

Here is a simplified code to demonstrate this effect:

z = 1;
herp = Table[1, {i, 1, 10^2}];
derp = Table[0, {i, 1, 10^2}];
Monitor[
 While[z < 10^6,

  ListConvolve[derp, herp, 1];

  z++;
  blurg = MemoryInUse[];
  ClearSystemCache[];
  $HistoryLength = 0;
 ];
,{z, blurg}];

Removing the ListConvolve part of the code leaves the memory in use flat.

Any help is greatly appreciated!

$\endgroup$
7
  • $\begingroup$ I just determined that if I change the length of the sample arrays herp and derp to be <44, the memory used does not grow. Empirical evidence that the answer to life is 43, not 42... $\endgroup$
    – A. McEvoy
    Commented Apr 8, 2015 at 21:54
  • $\begingroup$ I can't reproduce your findings in versions 7.0.1 or 9.0.1. Which version are you using? $\endgroup$ Commented Apr 8, 2015 at 22:42
  • 5
    $\begingroup$ I'm filing a bug report on this. $\endgroup$ Commented Apr 9, 2015 at 0:32
  • 2
    $\begingroup$ I can reproduce it in 10.1.0 and 10.0.2 but not 9.0.1, OS X Yosemite. $\endgroup$
    – Szabolcs
    Commented Apr 9, 2015 at 0:43
  • $\begingroup$ I gather it has been addressed in our current development version. $\endgroup$ Commented Apr 9, 2015 at 2:38

1 Answer 1

4
$\begingroup$

To record an answer officially:

As noted by Daniel Lichtblau in a comment, it is a bug. Szabolcs comments that it affects versions 10.0.1, 10.0.2, and 10.1.0, but not versions before 10 (and unclear about 10.0.0). As of the time of writing, version 10.1.0 is the most recently released. However, Daniel further adds that it has already been fixed in the development version.

$\endgroup$
1
  • $\begingroup$ I grow happier by the day I reverted to 9... $\endgroup$
    – ciao
    Commented Jul 30, 2015 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.