[GAP Forum] Stop GAP from storing group properties
Marc Keilberg
keilberg at usc.edu
Sat May 8 03:01:21 BST 2021
Dear GAP Forum,
I've been looking to sift through a particular family of a few ten-thousand
groups, which are not in any of the current libraries, to see if they have
certain properties. While it's relatively easy to construct the entire
family of groups via the anupq package, and the test I run on them is
relatively quick (a second or two per group on my computer), I run into
serious memory consumption issues when I go to start testing them all (with
a function specifically written to perform the test in question). While
the list of groups I want only takes up a few gigabytes, and each iteration
of the testing function should be consuming a small fraction of that before
it completes, my total memory consumption constantly ticks up as I run
through the list, ultimately consuming well more memory than the list of
groups itself.
The problem, best as I can tell, is that in my function I must compute
RationalClasses(Center(G)) for the given group G, and this information is
getting stored in the group, resulting in ever increasing amounts of memory
consumption as GAP iterates over my list of groups. But I don't want or
need it stored. I have tried using ShallowCopy, but that doesn't help, as
the group objects are all non-copyable apparently, so ShallowCopy,
Immutable, StructuralCopy etc. all just return the original object instead
of a wholly new one. So it's still storing the information on the original
group object, instead of a distinct copy that gets deleted upon the
function completing.
So is there any way I can prevent a testing function from storing
properties of a group on that group after it completes, or otherwise delete
any newly stored information before the function exits, and thereby prevent
this excess memory consumption?
Thanks,
Marc
More information about the Forum
mailing list