On Wed, 30 Sep 2015, Travis Scrimshaw wrote:
That's strange. My guess is that the graphs constructed by P.width() are
either being nailed in memory (which is what I strongly suspect given
that height() doesn't leak) or keep the poset alive.
Can be, I have no idea. Same happened with some other functions too. This
is one example:
P7 = Posets(7).list()
i = 0
while True:
for P in P7:
if i%1000 == 0:
print i, get_memory_usage()
if P.is_lattice():
M = LatticePoset(P).meet_matrix()
i += 1
* * *
Is there a way to "clean the cache" or something like that? Week ago I
wanted to run a little test over all posets of 14 elements. I had to do it
part by part, as it ate all memory. (There are about 16 million of those.)
--
Jori Mäntysalo