Error when calling representation_conversion_up_to_symmetry too many times
Posted: 06 Jan 2026, 16:08
Hi. When I call the function representation_conversion_up_to_symmetry in polytope \( 10,001 \) times, I am given the error:
I believe this is a memory leak in sympol, although certainly it could be user error. I'm looking for a way around this, as I need to compute many, many dual descriptions.
I've put together an MWE:
Loading this as a script or just pasting it into the terminal, and any subsequent calls to representation_conversion_up_to_symmetry, give the error
I'm not very familiar with sympol, but I think I've tracked down the source to the function RayComputationLRS::getLinearities on line 309 of polymake/bundled/sympol/external/sympol/sympol/raycomputationlrs.cpp. It creates two lrs objects but doesn't clear them afterwards. I tried adding
just before the function return and after recompiling the error is no longer there for the MWE. I haven't been able to test it for my actual use case, however, as that is all in Julia.
Is there any way to avoid this within Polymake? A way to clear the sympol memory manually, or maybe another way to compute the dual description under symmetries that doesn't use sympol? I'm mainly using Polymake through the Julia interface as part of Oscar, and I've been unsuccessful in getting the system to accept anything but the pre-built binaries it ships with, so I can't use a 'user-patched' version.
Thanks for the help.
Code: Select all
Fatal: Attempt to allocate more than 10000 global data blocksI've put together an MWE:
Code: Select all
use application "group";
my $pa = new PermutationAction(GENERATORS => [[1,0]]);
my $G = new Group(RAYS_ACTION => $pa);
use application "polytope";
my $C = new Cone(RAYS=>[[1,0],[0,1]],GROUP => $G);
my $n = representation_conversion_up_to_symmetry($C);
for (my $i = 0; $i < 10000; $i++) {
$n = representation_conversion_up_to_symmetry($C);
}
Code: Select all
Fatal: Attempt to allocate more than 10000 global data blocks
Fatal: Attempt to allocate more than 10000 global data blocks
polymake: ERROR: sympol computation of linear symmetry representatives not successful Code: Select all
lrs_dic *P; /* structure for holding current dictionary and indices */
lrs_dat *Q; /* structure for holding static problem data */Code: Select all
lrs_free_dic (P,Q); /* deallocate lrs_dic */
lrs_free_dat (Q); /* deallocate lrs_dat */Is there any way to avoid this within Polymake? A way to clear the sympol memory manually, or maybe another way to compute the dual description under symmetries that doesn't use sympol? I'm mainly using Polymake through the Julia interface as part of Oscar, and I've been unsuccessful in getting the system to accept anything but the pre-built binaries it ships with, so I can't use a 'user-patched' version.
Thanks for the help.