MDAnalysis / pmda

Parallel algorithms for MDAnalysis
https://www.mdanalysis.org/pmda/
Other
31 stars 22 forks source link

RDF tests fail #110

Closed orbeckst closed 5 years ago

orbeckst commented 5 years ago

Expected behaviour

No changes were made to the RDF code in PMDA. Tests for RDF should pass, as they have done before.

Actual behaviour

Test fail now.

Maybe something changed in upstream MDAnalysis?

Code to reproduce the behaviour

e.g. https://travis-ci.org/MDAnalysis/pmda/jobs/592141990

____________________ test_density[True-13275.775528444701] _____________________
u = <Universe with 43480 atoms>
sels = [[<AtomGroup with 1 atom>, <AtomGroup with 2 atoms>], [<AtomGroup with 2 atoms>, <AtomGroup with 2 atoms>]]
density = True, value = 13275.775528444701
    @pytest.mark.parametrize("density, value", [
        (True, 13275.775528444701),
        (False, 0.021915460340071267)])
    def test_density(u, sels, density, value):
        rdf = InterRDF_s(u, sels, density=density).run()
>       assert_almost_equal(max(rdf.rdf[0][0][0]), value)
E       AssertionError: 
E       Arrays are not almost equal to 7 decimals
E        ACTUAL: 13275.775440503656
E        DESIRED: 13275.775528444701
/home/travis/build/MDAnalysis/pmda/pmda/test/test_rdf_s.py:117: AssertionError

Currently version of MDAnalysis:

current master

orbeckst commented 5 years ago

@VOD555 thanks for looking into this — this issue is really holding up progress here.

VOD555 commented 5 years ago

@orbeckst I run the same test with the old version (0.19) and the current develop version of mdanalysis. It failed with the develop version. It works with old version mdanalysis and numpy 1.15.4 or numpy 1.17.2. So I think this failue is caused by some changes in mdanalysis.

I'd like to change the reference values in the test.

orbeckst commented 5 years ago

Ok, especially if this is due to changes from float32 to float64.

On Oct 2, 2019, at 4:17 PM, Shujie Fan notifications@github.com wrote:

@orbeckst https://github.com/orbeckst I run the same test with the old version (0.19) and the current develop version of mdanalysis. It failed with the develop version. It works with old version mdanalysis and numpy 1.15.4 or numpy 1.17.2. So I think this failue is caused by some changes in mdanalysis.

I'd like to changed the reference values in the test.