Opened 10 years ago
Closed 9 years ago
#13234 closed enhancement (fixed)
Add Normaliz optional package
Reported by: | novoselt | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-5.6 |
Component: | packages: optional | Keywords: | |
Cc: | john_perry | Merged in: | sage-5.6.beta0 |
Authors: | Andrey Novoseltsev | Reviewers: | Dmitrii Pasechnik |
Report Upstream: | Fixed upstream, but not in a stable release. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Normaliz http://www.mathematik.uni-osnabrueck.de/normaliz/ is one of the dependencies of Macaulay2 (which is also an optional package), but can be of interest on its own as well.
Install the spkg from here
Attachments (4)
Change History (25)
comment:1 Changed 10 years ago by
- Cc john_perry added
- Status changed from new to needs_review
comment:2 follow-up: ↓ 3 Changed 9 years ago by
- Status changed from needs_review to needs_work
comment:3 in reply to: ↑ 2 Changed 9 years ago by
Replying to dimpase:
-static
is not supported on MacOSX.
The file
source/Makefile.configuration
contains lines
##for mac link libgcc not static NORMFLAGS = -static #NORMFLAGS = -static-libgcc
If I set switch NORMFLAGS = -static-libgcc
then on MacOSX 10.6.8 the spkg builds OK. It's a trivial matter to add an OS recognition to spkg-install and patch the said file if one happens to be on OSX.
comment:4 Changed 9 years ago by
- Status changed from needs_work to needs_review
Winfried has also suggested to just remove this static option, I've updated the spkg and rewrote the installation script based on pyopenssl.
comment:5 Changed 9 years ago by
- Status changed from needs_review to needs_info
OK, it builds on MacOSX 10.6. (with Sage 5.4.rc0). However, if I try to use the provided in the spkg Macaulay2 package Normaliz, it does not seem to work. I cd to the directory containing Normaliz.m2, start a standalone M2 version 1.4 within Sage shell, and then I get
i10 : installPackage "Normaliz" stdio:11:1:(3): error: makeDocumentTag: package cannot be determined: 'Normaliz' stdio:4:16-4:24: here is the first use of 'Normaliz'
I don't know enough M2 to know how to deal with it.
EDIT: it could be that this just means that a version of Normaliz is already present in this instance of M2 (and indeed, it is). So just ignore this, I guess. We'll sort it out when M2 Sage spkg will be ready.
comment:6 Changed 9 years ago by
As well, I don't know how to properly handle the Singular interface. Note that Normaliz provides an interface to Singular, in src/Singular/normaliz.lib
.
On the other hand, Singular spkg provides normaliz.lib
for version 2.7 of Normaliz.
(Which is probably useless without Normaliz installed, and ought to be removed, but this is not for this ticket).
I think one should make this spkg install normaliz.lib
to its proper place in $SAGE_LOCAL
.
Regarding M2 support, it can wait, but this one definitely needs work. I'd be happy to have another look after this is implemented.
comment:7 follow-up: ↓ 8 Changed 9 years ago by
It seems to me that M2 just wants to have normaliz executable during installation, the interface package is included in M2 and does not have to be installed from normaliz one. So far my goal was just to have normaliz in sage/local/bin, but I'll look at the Singular library as well. I suspect it may be independent of the rest of normaliz - it is quite a compact program.
comment:8 in reply to: ↑ 7 Changed 9 years ago by
Replying to novoselt:
It seems to me that M2 just wants to have normaliz executable during installation, the interface package is included in M2 and does not have to be installed from normaliz one. So far my goal was just to have normaliz in sage/local/bin, but I'll look at the Singular library as well. I suspect it may be independent of the rest of normaliz - it is quite a compact program.
not according to the following lines
@*Singular and Normaliz exchange data via files. These files are automatically created and erased behind the scenes.
in Singular/singular.lib
So it is not something independent.
comment:9 Changed 9 years ago by
- Status changed from needs_info to needs_review
Added library copying - I misunderstood what was going on, I thought it was a library file as in "objective code", not "Singular module".
comment:10 follow-up: ↓ 13 Changed 9 years ago by
- Status changed from needs_review to needs_work
after installing the spkg, one can call normaliz
from Sage's singular_console()
, (or just as sage -singular
--- the results are the same) but results don't always make sense. E.g.
sage: singular_console() SINGULAR / Development A Computer Algebra System for Polynomial Computations / version 3-1-5 0< by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann \ Jul 2012 FB Mathematik der Universitaet, D-67653 Kaiserslautern \ > LIB "normaliz.lib"; // ** loaded /usr/local/src/sage/sage-5.5.rc0/local/share/singular/normaliz.lib $Id$ > ring R=0,(x,y,z,t),dp; > ideal I=x^2,y^2,z^3; > list l=intclMonIdeal(I); > showNuminvs(); hilbert_basis_elements : 2 number_extreme_rays : 2 rank : 2 index : 1 number_support_hyperplanes : 2 size_triangulation : 1 sum_dets : 1 graded : 1 degree_1_elements : 2 grading : 1,-1 grading_denom : 1 multiplicity : 1 multiplicity_denom : 1 hilbert_series_num : 1 hilbert_series_denom : 1,1 primary : 1 ideal_multiplicity : 2 >
whereas according to Singular docs the output should be
showNuminvs(); ==> hilbert_basis_elements : 9 ==> number_extreme_rays : 6 ==> rank : 4 ==> index : 1 ==> number_support_hyperplanes : 5 ==> homogeneous : 0 ==> primary : 1 ==> ideal_multiplicity : 12
comment:11 Changed 9 years ago by
If I try running normaliz directly on the input (roughly) corresponding to this example of the monomial ideal (see t.in), I get results consistent with Singular docs, see the t.out. So this looks like an interface problem.
comment:12 Changed 9 years ago by
I also noticed that some normaliz.lib functions are not working as advertised, e.g.
> startNmz(); ? open: Error for link _ of type: ASCII, mode: r, name: nmz_sing_exec.path ? cannot read from `nmz_sing_exec.path` ? error occurred in or before normaliz.lib::startNmz line 292: ` string s=read(inf); ` ? expected string-expression. type 'help string;' ? leaving normaliz.lib::startNmz skipping text from `;` error at token `)`
instead of this. This is probably minor, as normaliz
executable is found in the PATH
.
To make it work I can do
> setNmzDataPath("/tmp/"); > setNmzFilename("blah"); > writeNmzPaths(); > startNmz(); nmz_exec_path not set nmz_data_path is /tmp/
If I then try the Singular input as above to compute
intclMonIdeal(I)
I can see that the files /tmp/blah.*
created do not make sense. E.g. /tmp/blah.in
is as follows:
1 1 2 3
which makes little sense.
I would not be surprised if this is an upstream (i.e. normaliz
) bug.
comment:13 in reply to: ↑ 10 Changed 9 years ago by
Replying to dimpase:
after installing the spkg, one can call
normaliz
from Sage'ssingular_console()
, (or just assage -singular
--- the results are the same) but results don't always make sense. E.g.sage: singular_console() SINGULAR / Development A Computer Algebra System for Polynomial Computations / version 3-1-5 0< by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann \ Jul 2012 FB Mathematik der Universitaet, D-67653 Kaiserslautern \ > LIB "normaliz.lib"; // ** loaded /usr/local/src/sage/sage-5.5.rc0/local/share/singular/normaliz.lib $Id$ > ring R=0,(x,y,z,t),dp;
If I rather set ring R=0,(x,y,z),dp;
then the result is consistent with Singular's manual. So this looks like a documentation bug rather than anything more serious.
comment:14 Changed 9 years ago by
- Report Upstream changed from N/A to Reported upstream. No feedback yet.
comment:15 Changed 9 years ago by
- Report Upstream changed from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.
- Status changed from needs_work to needs_review
I've added a patched based on the file sent to me by Christof Söger. Now I am getting
SINGULAR / Development A Computer Algebra System for Polynomial Computations / version 3-1-5 0< by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann \ Jul 2012 FB Mathematik der Universitaet, D-67653 Kaiserslautern \ > LIB "normaliz.lib"; // ** loaded /home/novoselt/sage-5.5.rc0/local/share/singular/normaliz.lib $Id$ > ring R=0,(x,y,z,t),dp; > ideal I=x^2,y^2,z^3; > list l=intclMonIdeal(I); No grading specified and cannot find one. Disabling some computations! > showNuminvs(); hilbert_basis_elements : 9 number_extreme_rays : 6 rank : 4 index : 1 number_support_hyperplanes : 5 size_triangulation : 3 sum_dets : 7 graded : 0 primary : 1 ideal_multiplicity : 12 >
which seems to be consistent with Singular manual.
comment:16 Changed 9 years ago by
OK, good - but could you please bump up the version to 2.8.p0, as this is not vanilla upstream.
comment:17 Changed 9 years ago by
- Description modified (diff)
- Reviewers set to Dmitrii Pasechnik
- Status changed from needs_review to positive_review
I've made the spkg bumped up version (linked in the ticket description).
comment:18 Changed 9 years ago by
Thank you for a thorough review and quick responses despite my long pauses, it was a good spkg-exercise for me!
comment:19 Changed 9 years ago by
- Component changed from packages to optional packages
comment:20 Changed 9 years ago by
I just copied the spkg into the "optional" subdir on the server and mirrors.
comment:21 Changed 9 years ago by
- Merged in set to sage-5.6.beta0
- Resolution set to fixed
- Status changed from positive_review to closed
-static
is not supported on MacOSX. There one gets:It's probably better to build a dynamic library.