Skip to content

Allow to silence certain polymake messages to stderr #23

@kiryph

Description

@kiryph

Currently, when someone runs a method from polymaking one sees in GAP additional messages. Example:

gap> S:=SymmetricGroup(3);; v:=[1,2,3];; points3:=Orbit(S,v,Permuted);;points:=points3{[1..6]}{[1,2]};;
gap> permutahedron:=CreatePolymakeObject();
<polymake object. No properties known>
gap> AppendPointlistToPolymakeObject(permutahedron,points);
gap> Polymake(permutahedron,"VOLUME");
polymake: upgrading /private/var/folders/2z/bljkcy1j2cbf7l9zf3dk0nqc0000gn/T/gaptempdirLtUNht/poly2084 from old plain file format
polymake: used package ppl
  The Parma Polyhedra Library ([[wiki:external_software#PPL]]): A C++ library for convex polyhedra
  and other numerical abstractions.
  http://www.cs.unipr.it/ppl/

3

I prefer to silence them. This is possible within polymake by customization.

polytope> set_custom $Polymake::User::Verbose::credits = 0;
polytope> set_custom $Polymake::User::Verbose::files = 0;

These settings are stored persistently in following config file:

❯ cat ~/.polymake/settings
...
  # Display the copyright notices and URLs of third-party software:
  # 0 - never, 1 - at the first use in the current session, 2 - always
  "Polymake::User::Verbose::credits": 0,

  # Notify about nontrivial actions during data file processing
  "Polymake::User::Verbose::files": 0,
...

However, Polymaking calls polymake with an empty string given to the flag --config-path:

scriptarg:=["--config-path","", "--script",

This disables any user customization of polymake. This includes the settings to silence the above given messages.

My workaround is to modify polymaking, by simply removing the flag and its empty argument in the aboven given line in the code.

However, I would prefer a proper solution without modifying the package polymaking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions