I make numerical calculation series with integrals in each term (Mathematica 11.1, system Linux Mint 18). I use ParallelSum with 4 kernels. I start $HistoryLength = 0 at the beginning. MemoryUsed[] at the beginning shows around 76Mb. After calculations it is around 100Mb but memory used in computer is all of my memory 7.5Gb from 8Gb. System monitor shows that there are 4 kernels with 1.2Gb each and 1 kernel with 140Mb and Mathematica itself 220Mb. How enforce Mathematica to clean kernels after calculations?
Asked
Active
Viewed 158 times
$HistoryLengthon the kernels? Some example code that reproduces the issue would help; make it take up less memory but still show the memory is not released. – Edmund Dec 15 '17 at 16:46Print["k=", k, " ", "pp0[", k, "]=", pp0[k]]; For[i = 1, i < 100, i++, pp[i] = F1tmgr[1 + (k - 1) 2/10, d, n, 10, 1 + i St, (i + 1) St]; ps = ps + pp[i]; Print["i=", i, " ", "pp[", i, "]=", pp[i], " ", "ps=", ps]; If[Abs[pp[i]] < 10^-8, i = 100, i]]; AppendTo[nn, {1 + (k - 1) 2/10, ps}] && Put[nn, "tmS.txt"]] – nail Dec 15 '17 at 19:46
$HistoryLength = 0on all kernels (156054). – Edmund Dec 15 '17 at 21:08