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

generic latte_int interface to count #22497

Closed
videlec opened this issue Mar 2, 2017 · 21 comments
Closed

generic latte_int interface to count #22497

videlec opened this issue Mar 2, 2017 · 21 comments

Comments

@videlec
Copy link
Contributor

videlec commented Mar 2, 2017

We provide a file sage/interfaces/latte.py that provides a uniform function count to query the LattE program count (integrate will be dealt with in another ticket). It is used in this ticket to refactor ehrhart_polynomial and integral_points_count.

Prerequisite for #18232.

CC: @mkoeppe @sagetrac-tmonteil

Component: geometry

Keywords: days84

Author: Vincent Delecroix

Branch: d5ff154

Reviewer: Matthias Koeppe

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

@videlec videlec added this to the sage-7.6 milestone Mar 2, 2017
@videlec
Copy link
Contributor Author

videlec commented Mar 2, 2017

Changed keywords from none to days84

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Mar 2, 2017

comment:2

Why not putting this in the interfaces section ?

@videlec

This comment has been minimized.

@videlec
Copy link
Contributor Author

videlec commented Mar 2, 2017

Commit: be2de21

@videlec
Copy link
Contributor Author

videlec commented Mar 2, 2017

New commits:

be2de2122497: generic interface to LattE integrale count22497: generic

@videlec
Copy link
Contributor Author

videlec commented Mar 2, 2017

Branch: u/vdelecroix/22497

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 2, 2017

Changed commit from be2de21 to cf9f0de

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 2, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

cf9f0de22497: generic interface to LattE integrale count

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 2, 2017

Changed commit from cf9f0de to 9a0d0a2

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 2, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9a0d0a222497: generic interface to LattE integrale count

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 3, 2017

comment:7

Keyword arguments should be provided (perhaps via decorator) for the benefit of tab completion.

@videlec
Copy link
Contributor Author

videlec commented Mar 4, 2017

comment:8

Replying to @mkoeppe:

Keyword arguments should be provided (perhaps via decorator) for the benefit of tab completion.

This would be nice to have but not implemented. Did you have something in mind? The implementation I have in mind is a kind of challenge since you have to play with the bytecode of the function...

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 4, 2017

Reviewer: Matthias Koeppe

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 4, 2017

comment:9

OK, separate ticket then

@kiwifb
Copy link
Member

kiwifb commented Mar 4, 2017

comment:10

I have one failure when latte_int is not installed

sage -t --long /usr/lib64/python2.7/site-packages/sage/interfaces/latte.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/latte.py", line 51, in sage.interfaces.latte.count
Failed example:
    count(P.cdd_Hrepresentation(), cdd=True, ehrhart_polynomial=True)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 501, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 864, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.latte.count[2]>", line 1, in <module>
        count(P.cdd_Hrepresentation(), cdd=True, ehrhart_polynomial=True)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/latte.py", line 149, in count
        raise RuntimeError("LattE integrale program failed (exit code {})".format(ret_code) + err.strip())
    RuntimeError: LattE integrale program failed (exit code 2):
    usage: count <expected line count>
**********************************************************************
1 item had failures:

I see this test is not marked optional, is it normal?

@videlec
Copy link
Contributor Author

videlec commented Mar 4, 2017

comment:11

it is not. Thanks for testing.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 4, 2017

Changed commit from 9a0d0a2 to d5ff154

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 4, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d5ff15422497: generic interface to LattE integrale count

@vbraun
Copy link
Member

vbraun commented Mar 5, 2017

Changed branch from u/vdelecroix/22497 to d5ff154

@seblabbe
Copy link
Contributor

Changed commit from d5ff154 to none

@seblabbe
Copy link
Contributor

comment:15

When looking at this branch, I could not understand how the problem solved in #21491 was not reappearing. I tested 7.6.rc0 and everything was fine so I could not understand. I just realized the existence of #22577 which is a follow up of this ticket. So now I understand everything, and everything is great, thank you!

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

5 participants