Opened 6 years ago
Closed 5 years ago
#16364 closed defect (fixed)
Installing ChomP causes ChainComplex to return incorrect answers
Reported by: | dunfield | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | packages: optional | Keywords: | chomp |
Cc: | jhpalmieri, kini | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Reported upstream. No feedback yet. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Installing the ChomP package causes ChainComplex
to give different (and basically wrong) answers. Here are two examples from the doctests:
sage: C = ChainComplex([matrix(ZZ, 1, 1, [2]), matrix(ZZ, 1, 1), matrix(1, 1, [3])]) sage: C.torsion_list(5) [(2, []), (3, [])] # Should be [(2, [1]), (3, [3])] sage: S = simplicial_complexes.SumComplex(17, [0, 1, 4]) sage: S.homology(1) 0 # Should be C140183
May be related to #12607 where installing ChomP causes certain 0 dimensional homology groups not to be reported.
Change History (15)
comment:1 Changed 6 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:2 Changed 6 years ago by
comment:3 Changed 6 years ago by
comment:4 Changed 5 years ago by
- Report Upstream changed from N/A to Reported upstream. No feedback yet.
Several comments: first, there is a new version of CHomP: see https://github.com/shaunharker/CHomP, but it does not fix these problems (at least the second one: the first is a problem with Sage's interface with CHomP, so that's our fault). Second, because of the second problem, we obviously need to catch this kind of error to avoid producing nonsensical answers. (It would also be nice to fix CHomP. I'll email the developer.)
comment:5 Changed 5 years ago by
We probably should fix #12607 now that optional spkgs are always tested, and we can do a version bump of CHomP (along with making it a new-style spkg).
comment:6 Changed 5 years ago by
It would also be good to deal with #15202, but that's a more complicated project.
comment:7 Changed 5 years ago by
The first problem is solved by the branch at #12607, that needs review.
comment:8 Changed 5 years ago by
- Keywords chomp added
comment:9 Changed 5 years ago by
And the second looks indeed like an overflow error in a product inside CHomP. This works
sage: S = simplicial_complexes.SumComplex(17, [0, 1, 4]) sage: S.homology(algorithm='chomp',verbose=True,base_ring=GF(103))
How should we catch the errors of CHomP ?
comment:10 Changed 5 years ago by
I am taking care of the second problem also in ticket #12607
comment:11 Changed 5 years ago by
- Milestone changed from sage-6.4 to sage-6.8
comment:12 Changed 5 years ago by
- Milestone changed from sage-6.8 to sage-duplicate/invalid/wontfix
Everything should be taken care of in #12607
comment:13 Changed 5 years ago by
- Status changed from new to needs_review
comment:14 Changed 5 years ago by
- Status changed from needs_review to positive_review
comment:15 Changed 5 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
I poked around a bit. In the first example, the issue seems to be that the wrapper is misparsing the correct output of "homchain". In the second example, "homchain" outputs the following abort message (due to integer overflow, I think) which is ignored by the wrapper.
[Tech info: chain 24, addr 8, intgr 2.] Reading a chain complex from 'bad.txt'... Time used so far: 0.00 sec (0.000 min). The ring of coefficients is the ring of integers. Computing the homology of the chain complex... Reducing D_1: 0 +ERROR: Number out of range (*).