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

from gap to libgap in strongly_regular_db #28818

Closed
dimpase opened this issue Nov 28, 2019 · 28 comments
Closed

from gap to libgap in strongly_regular_db #28818

dimpase opened this issue Nov 28, 2019 · 28 comments

Comments

@dimpase
Copy link
Member

dimpase commented Nov 28, 2019

remove the last use of GAP pexpect in that file;

remove no longer needed #optional tags in some tests

CC: @fchapoton @dcoudert

Component: graph theory

Author: Dima Pasechnik

Branch/Commit: 6489a18

Reviewer: David Coudert

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

@dimpase dimpase added this to the sage-8.9 milestone Nov 28, 2019
@dimpase
Copy link
Member Author

dimpase commented Nov 28, 2019

comment:1

this should make this a bit more robust and quick

@dimpase
Copy link
Member Author

dimpase commented Nov 28, 2019

Reviewer: dcoudert

@dimpase dimpase modified the milestones: sage-8.9, sage-9.0 Nov 28, 2019
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 29, 2019

Changed commit from 249d582 to 23d6a45

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 29, 2019

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

23d6a45use libgap instead of gap, remove no longer needed #optional

@dimpase
Copy link
Member Author

dimpase commented Nov 29, 2019

comment:4

a bit of cleanup in the updated commit

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 29, 2019

Changed commit from 23d6a45 to 82ec1c3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 29, 2019

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

82ec1c3use libgap instead of gap, remove no longer needed #optional

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 29, 2019

Changed commit from 82ec1c3 to b3183e8

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 29, 2019

Branch pushed to git repo; I updated commit sha1. New commits:

b3183e8use libgap to compute orbit lengths on edges/arcs

@dimpase
Copy link
Member Author

dimpase commented Dec 1, 2019

Changed reviewer from dcoudert to none

@dcoudert
Copy link
Contributor

dcoudert commented Dec 1, 2019

comment:8

after git trac try 28818 and sage -b, I did:

confetti:sage dcoudert$ ./sage -tp --long --optional=sage,optional,external src/sage/graphs/
too few successful tests, not using stored timings
Running doctests with ID 2019-12-01-14-02-49-49bed4c1.
Git branch: HEAD
Using --optional=benzene,bliss,cbc,csdp,dot2tex,external,gap_packages,gfortran,igraph,libsemigroups,mcqd,mpir,plantri,python_igraph,sage,sagenb,tdlib
External software to be detected: cplex,ffmpeg,graphviz,gurobi,imagemagick,internet,latex,macaulay2,magma,maple,mathematica,matlab,octave,pandoc,scilab
Sorting sources by runtime so that slower doctests are run first....
Doctesting 100 files using 4 threads.
sage -t --long src/sage/graphs/chrompoly.pyx
    [20 tests, 37.29 s]
sage -t --long src/sage/graphs/generators/smallgraphs.py
**********************************************************************
File "src/sage/graphs/generators/smallgraphs.py", line 3506, in sage.graphs.generators.smallgraphs.LivingstoneGraph
Failed example:
    g = graphs.LivingstoneGraph() # optional - gap_packages internet
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.generators.smallgraphs.LivingstoneGraph[0]>", line 1, in <module>
        g = graphs.LivingstoneGraph() # optional - gap_packages internet
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/graphs/generators/smallgraphs.py", line 3522, in LivingstoneGraph
        return Graph(edges, name="Livingstone Graph")
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/graphs/graph.py", line 1120, in __init__
        raise ValueError("This input cannot be turned into a graph")
    ValueError: This input cannot be turned into a graph
**********************************************************************
File "src/sage/graphs/generators/smallgraphs.py", line 3507, in sage.graphs.generators.smallgraphs.LivingstoneGraph
Failed example:
    g.order()                     # optional - gap_packages internet
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.generators.smallgraphs.LivingstoneGraph[1]>", line 1, in <module>
        g.order()                     # optional - gap_packages internet
    NameError: name 'g' is not defined
**********************************************************************
File "src/sage/graphs/generators/smallgraphs.py", line 3509, in sage.graphs.generators.smallgraphs.LivingstoneGraph
Failed example:
    g.size()                      # optional - gap_packages internet
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.generators.smallgraphs.LivingstoneGraph[2]>", line 1, in <module>
        g.size()                      # optional - gap_packages internet
    NameError: name 'g' is not defined
**********************************************************************
File "src/sage/graphs/generators/smallgraphs.py", line 3511, in sage.graphs.generators.smallgraphs.LivingstoneGraph
Failed example:
    g.girth()                     # optional - gap_packages internet
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.generators.smallgraphs.LivingstoneGraph[3]>", line 1, in <module>
        g.girth()                     # optional - gap_packages internet
    NameError: name 'g' is not defined
**********************************************************************
File "src/sage/graphs/generators/smallgraphs.py", line 3513, in sage.graphs.generators.smallgraphs.LivingstoneGraph
Failed example:
    g.is_vertex_transitive()      # optional - gap_packages internet
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.generators.smallgraphs.LivingstoneGraph[4]>", line 1, in <module>
        g.is_vertex_transitive()      # optional - gap_packages internet
    NameError: name 'g' is not defined
**********************************************************************
File "src/sage/graphs/generators/smallgraphs.py", line 3515, in sage.graphs.generators.smallgraphs.LivingstoneGraph
Failed example:
    g.is_distance_regular()       # optional - gap_packages internet
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.generators.smallgraphs.LivingstoneGraph[5]>", line 1, in <module>
        g.is_distance_regular()       # optional - gap_packages internet
    NameError: name 'g' is not defined
**********************************************************************
1 item had failures:
   6 of   7 in sage.graphs.generators.smallgraphs.LivingstoneGraph
    [582 tests, 6 failures, 72.94 s]
...
sage -t --long src/sage/graphs/strongly_regular_db.pyx
    [335 tests, 87.45 s]
...
sage -t --long src/sage/graphs/graph_latex.py
**********************************************************************
File "src/sage/graphs/graph_latex.py", line 1333, in sage.graphs.graph_latex.GraphLatex.dot2tex_picture
Failed example:
    print(g.latex_options().dot2tex_picture())  # optional - dot2tex graphviz
Expected:
    \begin{tikzpicture}[>=latex,line join=bevel,]
    %%
      \node (node_3) at (...bp,...bp) [draw,draw=none] {$\left(0, 1\right)$};
      \node (node_2) at (...bp,...bp) [draw,draw=none] {$\left(1, 0\right)$};
      \node (node_1) at (...bp,...bp) [draw,draw=none] {$\left(0, 0\right)$};
      \node (node_0) at (...bp,...bp) [draw,draw=none] {$\left(1, 1\right)$};
      \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_3);
      \draw [black,->] (node_2) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_3);
      \draw [black,->] (node_2) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_0);
      \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_0);
    %
    \end{tikzpicture}
Got:
    \begin{tikzpicture}[>=latex,line join=bevel,]
    %%
    \node (node_0) at (14.5bp,61.5bp) [draw,draw=none] {$\left(0, 0\right)$};
      \node (node_1) at (14.5bp,8.5bp) [draw,draw=none] {$\left(1, 1\right)$};
      \node (node_2) at (61.5bp,8.5bp) [draw,draw=none] {$\left(0, 1\right)$};
      \node (node_3) at (61.5bp,61.5bp) [draw,draw=none] {$\left(1, 0\right)$};
      \draw [black,->] (node_0) ..controls (14.5bp,45.802bp) and (14.5bp,35.845bp)  .. (node_1);
      \draw [black,->] (node_0) ..controls (28.968bp,45.185bp) and (38.841bp,34.051bp)  .. (node_2);
      \draw [black,->] (node_3) ..controls (47.032bp,45.185bp) and (37.159bp,34.051bp)  .. (node_1);
      \draw [black,->] (node_3) ..controls (61.5bp,45.802bp) and (61.5bp,35.845bp)  .. (node_2);
    %
    \end{tikzpicture}
**********************************************************************
File "src/sage/graphs/graph_latex.py", line 1352, in sage.graphs.graph_latex.GraphLatex.dot2tex_picture
Failed example:
    print(G.latex_options().dot2tex_picture()) # optional - dot2tex graphviz
Expected:
    \begin{tikzpicture}[>=latex,line join=bevel,]
    %%
    \node (node_1) at (...bp,...bp) [draw,draw=none] {$3333$};
      \node (node_0) at (...bp,...bp) [draw,draw=none] {$88$};
      \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_0);
      \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
      \pgfsetstrokecolor{strokecol}
      \draw (...bp,...bp) node {$\text{\texttt{my{\char`\_}label}}$};
    %
    \end{tikzpicture}
Got:
    \begin{tikzpicture}[>=latex,line join=bevel,]
    %%
    \node (node_0) at (13.5bp,75.5bp) [draw,draw=none] {$3333$};
      \node (node_1) at (13.5bp,6.5bp) [draw,draw=none] {$88$};
      \draw [black,->] (node_0) ..controls (13.5bp,58.557bp) and (13.5bp,38.274bp)  .. (node_1);
      \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
      \pgfsetstrokecolor{strokecol}
      \draw (40.0bp,41.0bp) node {$\text{\texttt{my{\char`\_}label}}$};
    %
    \end{tikzpicture}
**********************************************************************
1 item had failures:
   2 of  12 in sage.graphs.graph_latex.GraphLatex.dot2tex_picture
    [199 tests, 2 failures, 8.30 s]
----------------------------------------------------------------------
sage -t --long src/sage/graphs/generators/smallgraphs.py  # 6 doctests failed
sage -t --long src/sage/graphs/graph_latex.py  # 2 doctests failed
----------------------------------------------------------------------

the failures graph_latex.py are independent (and may be already fixed in another ticket).

@dimpase
Copy link
Member Author

dimpase commented Dec 1, 2019

comment:9

The error

File "src/sage/graphs/generators/smallgraphs.py", line 3506, in sage.graphs.generators.smallgraphs.LivingstoneGraph
Failed example:
    g = graphs.LivingstoneGraph() # optional - gap_packages internet
...

has not arisen from this branch, it's there without it. I guess noone tests with internet on :-)

OK, let me see if I can fix it quickly.

@dcoudert
Copy link
Contributor

dcoudert commented Dec 1, 2019

comment:10

Right. Let me know if you have a fix, or if we let these doctests for another ticket.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 1, 2019

Branch pushed to git repo; I updated commit sha1. New commits:

1bf4facfix for outdated code, tests for LivinstoneGraph

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 1, 2019

Changed commit from b3183e8 to 1bf4fac

@dimpase
Copy link
Member Author

dimpase commented Dec 1, 2019

comment:12

OK, there was a failure in Graph's understanding that edges are edges.

@dcoudert
Copy link
Contributor

dcoudert commented Dec 1, 2019

Reviewer: David Coudert

@dcoudert
Copy link
Contributor

dcoudert commented Dec 1, 2019

comment:13

In strongly_regular_db.pyx, you changed

-        sage: g.is_strongly_regular(parameters=True) # long time # optional - gap_packages
+        sage: g=SRG_280_135_70_60()                  # long time

but this test needs libgap, right ? I have not followed the recent changes with gap. Is it now part of the standard distribution ? Otherwise, how can we prevent to run this test if we don't have lib gap ?

@dimpase
Copy link
Member Author

dimpase commented Dec 1, 2019

comment:14

libgap is a standard package since I don't recall when. We're converting the whole sagelib to use libgap instead of gap.

@dcoudert
Copy link
Contributor

dcoudert commented Dec 1, 2019

comment:15

didn't know that. thanks.

LGTM

@vbraun
Copy link
Member

vbraun commented Dec 3, 2019

comment:16

I'm getting timeouts at

sage: gg = graphs.HallJankoGraph(from_string=False) # long time ## line 683 ##

and

sage: g=SRG_280_135_70_60()                  # long time ## line 2243 ##

resulting in

sage -t --long src/sage/graphs/generators/smallgraphs.py  # Timed out
sage -t --long src/sage/graphs/strongly_regular_db.pyx  # Timed out

Several buildbots time out at the same test so its reproducable...

@dimpase
Copy link
Member Author

dimpase commented Dec 3, 2019

comment:17

these tests need internet connection to cache data via GAP's AtlasRep package.
One can tag them # optional - internet

@vbraun
Copy link
Member

vbraun commented Dec 4, 2019

comment:18

please do!

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 4, 2019

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

5fed72fuse libgap instead of gap, remove no longer needed #optional
2b08c1ause libgap to compute orbit lengths on edges/arcs
70f67e5fix for outdated code, tests for LivinstoneGraph
6489a18 # optional - internet tags for AtlasRep uses

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 4, 2019

Changed commit from 1bf4fac to 6489a18

@dimpase
Copy link
Member Author

dimpase commented Dec 4, 2019

comment:20

rebased over latest beta, added commit ​6489a18 (with # optional - internet tags)

off to bots again.

@dcoudert
Copy link
Contributor

dcoudert commented Dec 4, 2019

comment:21

I have the same errors when I try ./sage -tp --long --optional=sage,optional,external src/sage/graphs/ but not when I try ./sage -tp --long src/sage/graphs/. So added flags are working well.

LGTM.

@vbraun
Copy link
Member

vbraun commented Dec 8, 2019

Changed branch from u/dimpase/graphs/srgupd to 6489a18

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

3 participants