Error when calling representation_conversion_up_to_symmetry too many times

Questions and problems about using polymake go here.
KilliB
Posts: 3
Joined: 06 Jan 2026, 14:54

Error when calling representation_conversion_up_to_symmetry too many times

Postby KilliB » 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:

Code: Select all

Fatal: Attempt to allocate more than 10000 global data blocks
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:

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); }
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

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
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

Code: Select all

lrs_dic *P; /* structure for holding current dictionary and indices */ lrs_dat *Q; /* structure for holding static problem data */
but doesn't clear them afterwards. I tried adding

Code: Select all

lrs_free_dic (P,Q); /* deallocate lrs_dic */ lrs_free_dat (Q); /* deallocate lrs_dat */
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.

User avatar
joswig
Main Author
Posts: 294
Joined: 24 Dec 2010, 11:10

Re: Error when calling representation_conversion_up_to_symmetry too many times

Postby joswig » 09 Jan 2026, 17:30

Can you please give more details, about the precise software versions of polymake, lrs etc you have been using? If you compiled polymake from the sources the config.ninja file would be helpful.

Or rather, if you used OSCAR/Julia, which versions did you use there?

KilliB
Posts: 3
Joined: 06 Jan 2026, 14:54

Re: Error when calling representation_conversion_up_to_symmetry too many times

Postby KilliB » 12 Jan 2026, 17:11

I've observed the error on a couple different platforms.

In OSCAR, I used OSCAR v1.6.0 and Julia v1.12.4. The polymake used in this case came from OSCAR. The relevant Julia packages are versioned:
Polymake v0.13.5
polymake_jll v400.1500.0+0
libpolymake_julia_jll v0.14.3+1
polymake_oscarnumber_jll v0.3.12+1
lrslib_jll v0.3.3+0
Which all installed from running `Pkg.add("Oscar")`

I've attached a Julia script that displays the error for me below.

I ran the MWE in my first post in the online intepreter for polymake, and got the same error. I also used a version on my machine compiled from source, but I have since written over it after editing the source code in the manner detailed in my post. If it would be helpful, I could rebuild it without my modifications and post the details. The lrs/sympol versions used were the versions that ship with polymake - I did not install either separately.

Thanks again for the help.
Attachments
poly_error.txt
(471 Bytes) Downloaded 19080 times

blorenz
Developer
Posts: 149
Joined: 10 Jan 2011, 17:21

Re: Error when calling representation_conversion_up_to_symmetry too many times

Postby blorenz » 13 Jan 2026, 10:49

Thanks for the details, I can reproduce the problem and it does look like memory leak there.
I don't see a way to avoid this without a new polymake build, sympol is the only software for this conversion up to symmetry. There is an option to switch to a different convex hull code but unfortunately even then some parts (computing linearity) are still done with lrs and trigger the same problem.
I have added your change to our merge queue, so it will be included in the next release, I am also doing a rebuild of the polymake_jll for julia with the patch included.

KilliB
Posts: 3
Joined: 06 Jan 2026, 14:54

Re: Error when calling representation_conversion_up_to_symmetry too many times

Postby KilliB » 13 Jan 2026, 13:40

Thanks for the help! I'll keep an eye out for new releases.

blorenz
Developer
Posts: 149
Joined: 10 Jan 2011, 17:21

Re: Error when calling representation_conversion_up_to_symmetry too many times

Postby blorenz » 13 Jan 2026, 14:08

A new `polymake_jll` is available now, version v400.1500.2+0. If you just have Polymake.jl in your environment then updating it should pull that version in.
If you are using Oscar then you will need to switch to the Oscar master branch (]add Oscar#master) because the build is using the a flint version which is not compatible with Oscar 1.6.0.


Return to “Helpdesk”