Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing ChomP causes ChainComplex to return incorrect answers #16364

Closed
NathanDunfield opened this issue May 16, 2014 · 11 comments
Closed

Installing ChomP causes ChainComplex to return incorrect answers #16364

NathanDunfield opened this issue May 16, 2014 · 11 comments

Comments

@NathanDunfield
Copy link

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.

Upstream: Reported upstream. No feedback yet.

CC: @jhpalmieri @kini

Component: packages: optional

Keywords: chomp

Issue created by migration from https://trac.sagemath.org/ticket/16364

@NathanDunfield
Copy link
Author

comment:2

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 (*).

@kcrisman
Copy link
Member

@jhpalmieri
Copy link
Member

Upstream: Reported upstream. No feedback yet.

@jhpalmieri
Copy link
Member

comment:4

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.)

@tscrim
Copy link
Collaborator

tscrim commented Jul 7, 2015

comment:5

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).

@jhpalmieri
Copy link
Member

comment:6

It would also be good to deal with #15202, but that's a more complicated project.

@fchapoton
Copy link
Contributor

comment:7

The first problem is solved by the branch at #12607, that needs review.

@fchapoton
Copy link
Contributor

Changed keywords from none to chomp

@fchapoton
Copy link
Contributor

comment:9

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 ?

@fchapoton
Copy link
Contributor

comment:10

I am taking care of the second problem also in ticket #12607

@fchapoton fchapoton modified the milestones: sage-6.4, sage-6.8 Jul 20, 2015
@fchapoton
Copy link
Contributor

comment:12

Everything should be taken care of in #12607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants