Bug #1256
RingID: different values in test-output on different platforms
Description
In test-output
Anna and I get different outputs (due to different RingIDs) because we use different platforms.
Investigate, and decide how to fix.
Related issues
History
#1 Updated by John Abbott about 5 years ago
Anna uses clang
on MacOS, while I use g++
on Linux.
We get different outputs for test-output
: its seems that the RingIDs increase faster on Linux (as though more "temporary rings" are created internally somewhere).
A concrete example is:
NewQuotientRing(R,ideal(RingElem(R, "a^2-2")))
Anna sees the RingID increase by 1; John sees it increase by 2.
#2 Updated by John Abbott about 5 years ago
- Related to Support #1240: John's visit Feb 2019 added
#3 Updated by John Abbott about 5 years ago
- Related to Design #1225: Move to C++14 (skipping C++11) added
#4 Updated by John Abbott about 5 years ago
ring P = NewPolyRing(RingQQ(), symbols("a")); ring PmodI = NewQuotientRing(P, ideal(RingElem(P,"a^2-2"))); cout << "P = " << P << endl; cout << "PmodI = " << PmodI << endl;
JAA confirms that PmodI
has RingID = 4. Strange!
#5 Updated by John Abbott about 5 years ago
Using gdb
I see that ComputeGBasis
is called, and it detected that the input ring is a polyring over a fractionfield (see line 129), and then it builds an internal polyring over ZZ
for the GBasis computation (see line 132). This internal ring gets an ID of 3.
The GBasis computation was triggered by the test IsOne(I)
at line 858 of QuotientRing.C
.
Aha! Maybe Anna's impl has the clever trick that a non-zero principal ideal has an easy GBasis, so avoids calling ComputeGBasis
... Clue city!
#6 Updated by Anna Maria Bigatti about 5 years ago
- Status changed from New to Closed
- Assignee set to John Abbott
- % Done changed from 0 to 100
- Estimated time set to 2.01 h
John Abbott wrote:
Using
gdb
I see thatComputeGBasis
is called, and it detected that the input ring is a polyring over a fractionfield (see line 129), and then it builds an internal polyring overZZ
for the GBasis computation (see line 132). This internal ring gets an ID of 3.The GBasis computation was triggered by the test
IsOne(I)
at line 858 ofQuotientRing.C
.Aha! Maybe Anna's impl has the clever trick that a non-zero principal ideal has an easy GBasis, so avoids calling
ComputeGBasis
... Clue city!
true!!! wow, that was subtle....
#7 Updated by John Abbott about 5 years ago
- Related to Feature #1249: principal ideal has a Gbasis added