Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
347 stars 231 forks source link

Normaliz output file formats #1439

Closed d-torrance closed 4 years ago

d-torrance commented 4 years ago

From https://github.com/Normaliz/Normaliz/commit/3661d6d6e9b022181a22a35dc4fcda041649bc65 (included in 3.4.0) until https://github.com/Normaliz/Normaliz/commit/6a7a243d6497f97ed074c80e11d85acb9ec30216 (included in 3.5.2), Normaliz didn't include row and column numbers when it output matrices. In particular, version 3.5.1, which is the version found in Ubuntu 18.04 (EOL April 2028), falls in this window. For example:

profzoom@orange:~/tmp$ /usr/bin/normaliz --version
Normaliz 3.5.1
Copyright (C) 2007-2017  The Normaliz Team, University of Osnabrueck.
This program comes with ABSOLUTELY NO WARRANTY; This is free software,
and you are welcome to redistribute it under certain conditions;
See COPYING for details.
profzoom@orange:~/tmp$ /usr/bin/normaliz -f foo
profzoom@orange:~/tmp$ cat foo.gen
0 1 0 
1 0 0 
profzoom@orange:~/tmp$ /usr/libexec/Macaulay2/bin/normaliz --version
Normaliz 3.7.2
Copyright (C) 2007-2018  The Normaliz Team, University of Osnabrueck.
This program comes with ABSOLUTELY NO WARRANTY; This is free software,
and you are welcome to redistribute it under certain conditions;
See COPYING for details.
profzoom@orange:~/tmp$ /usr/libexec/Macaulay2/bin/normaliz -f foo
profzoom@orange:~/tmp$ cat foo.gen
2
3
0 1 0 
1 0 0 

The Normaliz package in Macaulay2 expects the latter format and fails miserably when encountering the former, e.g.,:

...

--making example results for diagInvariants
 ulimit -c unlimited; ulimit -t 700; ulimit -m 850000; ulimit -s 8192; ulimit -n 512;  cd /tmp/M2-7290-0/52-rundir/; GC_MAXIMUM_HEAP_SIZE=400M "/usr/bin/M2-binary" --int --no-randomize --no-readline --silent --stop --print-width 77 -e 'needsPackage("Normaliz", Reload => true, FileName => "/home/profzoom/src/macaulay2/M2/M2/Macaulay2/packages/Normaliz.m2")' <"/tmp/M2-7290-0/2_diag__Invariants.m2" >>"/home/profzoom/.Macaulay2/local/share/doc/Macaulay2/Normaliz/example-output/_diag__Invariants.errors" 2>&1
/home/profzoom/.Macaulay2/local/share/doc/Macaulay2/Normaliz/example-output/_diag__Invariants.errors:0:1: (output file) error: Macaulay2 exited with status code 1
currentString:1:6:(3):[14]: error: no method for adjacent objects:
--            35 (of class ZZ)
--    SPACE   0 (of class ZZ)
/tmp/M2-7290-0/2_diag__Invariants.m2:0:1: (input file)
M2: *** Error 1
stdio:43:1:(3): error: 37 error(s) occurred running examples for package Normaliz

Currently, this isn't an issue since we always build Normaliz, but if #1417 is merged and we allow the use of Normaliz already present on the user's system, we should account for this. I see two possible solutions:

Which solution would be preferable?

DanGrayson commented 4 years ago

Somehow we skipped all those bad versions!

Probably we can just require 3.5.2, and the Ubuntu person will have to deal with it by upgrading normaliz (or permitting us to bundle it). Which they might do, anyway. But we definitely want to get into Ubuntu 18.04!

d-torrance commented 4 years ago

Somehow we skipped all those bad versions!

Probably we can just require 3.5.2, and the Ubuntu person will have to deal with it by upgrading normaliz (or permitting us to bundle it). Which they might do, anyway.

Okay, I'll modify #1417 so that it checks for at least 3.5.2.

But we definitely want to get into Ubuntu 18.04!

It's too late to get Macaulay2 into the official 18.04 release, but we could still host a PPA (which is actually how I discovered this issue -- I started a PPA with daily builds of the development branch), or maybe look into getting into Ubuntu Backports.

DanGrayson commented 4 years ago

When the time comes, it would be good for you to set up such a PPA for us.

d-torrance commented 4 years ago

When the time comes, it would be good for you to set up such a PPA for us.

Sounds good!