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

Flaky test in test_pruner.py #161

Closed
timokau opened this issue Dec 2, 2019 · 6 comments
Closed

Flaky test in test_pruner.py #161

timokau opened this issue Dec 2, 2019 · 6 comments

Comments

@timokau
Copy link

timokau commented Dec 2, 2019

While packaging the 0.5.0 update for nixos, I noticed that one of the tests fails some of the time:

=================================== FAILURES ===================================
_________________________________ test_pruner __________________________________

    def test_pruner():
    
        # A dummyPruningParams.run to load tabulated values
        Pruning.run(5, 50, 10*[1.], .5)
    
        for (n, overhead) in dim_oh:
    
            print(" \n ~~~~ Dim %d \n" % n)
    
            M = prepare(n)
            r = [M.get_r(i, i) for i in range(n)]
    
            print(" \n GREEDY")
            radius = gaussian_heuristic(r) * 1.6
            print("pre-greedy radius %.4e" % radius)
            tt = process_time()
>           pruning =Pruning.run(radius, overhead, r, 200, flags=Pruning.ZEALOUS, metric="solutions")

tests/test_pruner.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   sig_on()
E   RuntimeError: Aborted

src/fpylll/fplll/pruner.pyx:1000: RuntimeError
----------------------------- Captured stdout call -----------------------------
 
 ~~~~ Dim 40 

 
 GREEDY
pre-greedy radius 4.3353e+06
Time 6.0940e-02
post-greedy radius 4.3353e+06
PruningParams<1.600000, (1.00,...,0.36), 203.2640>
cost 8.4996e+04
209
 
 GRADIENT 

radius 4.3353e+06
Time 1.3805e-02
PruningParams<1.600000, (1.00,...,0.36), 203.2640>
cost 8.4996e+04
209
 
 HYBRID 

radius 4.3353e+06
Time 6.1017e-02
PruningParams<1.600000, (1.00,...,0.36), 203.2640>
cost 8.4996e+04
209
 
 ~~~~ Dim 41 

 
 GREEDY
pre-greedy radius 2.9518e+06
----------------------------- Captured stderr call -----------------------------
terminate called after throwing an instance of 'std::runtime_error'
  what():  Concavity says that should not happen.
======================== 1 failed, 64 passed in 37.31s =========================
@malb
Copy link
Collaborator

malb commented Dec 5, 2019

What system/OS is this on? What fraction of tests fails? I can't reproduce it on Debian/64-bit.

@timokau
Copy link
Author

timokau commented Dec 5, 2019

Its on nixos (64 bit) and only the one test that I reported fails.

@malb
Copy link
Collaborator

malb commented Dec 9, 2019

I can reproduce it now. I wonder if it is related to fplll/fplll#398

@timokau
Copy link
Author

timokau commented Dec 9, 2019

Sounds likely. We can re-test once that is merged.

@malb
Copy link
Collaborator

malb commented Dec 9, 2019

I just ran the tests 200 times and this does indeed seem to fix it.

@timokau
Copy link
Author

timokau commented Dec 11, 2019

I can confirm that the PR fixes the issue for me as well. The patch looks harmless, so I'll backport it to fpylll-0.5 package on nixos (NixOS/nixpkgs#74372). Thank you!

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

No branches or pull requests

2 participants