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

netcdf-c branch ghpull-375 breaks netcdf4-python tests #645

Open
WardF opened this issue Apr 19, 2017 · 4 comments
Open

netcdf-c branch ghpull-375 breaks netcdf4-python tests #645

WardF opened this issue Apr 19, 2017 · 4 comments

Comments

@WardF
Copy link
Member

WardF commented Apr 19, 2017

I'm in the process of merging a pull request submitted by Wei-Keng Liao (full history here: Unidata/netcdf-c#319 working branch is ghpull-375). Regression tests on the branch result in the following error in the netcdf4-python tests:

Writing /usr/local/lib/python2.7/dist-packages/netCDF4-1.2.7.egg-info
......................E....................................................................
======================================================================
ERROR: runTest (tst_multifile2.VariablesTestCase)
testing multi-file dataset access
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tester/netcdf4-python/test/tst_multifile2.py", line 60, in runTest
    assert_array_equal(varin[4:-4:4,3:5,2:8],data2[4:-4:4,3:5,2:8])
  File "netCDF4/_netCDF4.pyx", line 5834, in netCDF4._netCDF4._Variable.__getitem__ (netCDF4/_netCDF4.c:72711)
  File "netCDF4/_netCDF4.pyx", line 3753, in netCDF4._netCDF4.Variable.__getitem__ (netCDF4/_netCDF4.c:38851)
  File "netCDF4/_netCDF4.pyx", line 4470, in netCDF4._netCDF4.Variable._get (netCDF4/_netCDF4.c:48586)
IndexError

----------------------------------------------------------------------
Ran 91 tests in 80.829s

FAILED (errors=1)
not running tst_unicode3.py ...

netcdf4-python version: 1.2.7
HDF5 lib version:       1.8.18
netcdf lib version:     4.4.2-development
numpy version           1.11.0

It has been a long time coming, but we are preparing to merge this into master. Since there are netcdf4-python failures, I thought I should post this information here so there is some warning (and chance for feedback; if this is a big problem let us know!) instead of rudely allowing the tests to fail with no warning :).

@WardF
Copy link
Member Author

WardF commented Apr 19, 2017

If you have docker available, you can duplicate this easily as follows:

$ docker run -it -e CBRANCH=ghpull-375 unidata/nctests:serial

@WardF
Copy link
Member Author

WardF commented Apr 20, 2017

To run ONLY the python tests:

$ docker run -it -e CBRANCH=ghpull-375 -e RUNC=OFF -e RUNF=OFF -e RUNCXX=OFF -e RUNNCO=OFF unidata/nctests:serial

@dopplershift
Copy link
Member

dopplershift commented Apr 20, 2017

So that test fails because it is requesting data from a slice that is outside the actual bound of the data. Previously, this would return an empty array; with these changes to netcdf-c, now it seems that this code is triggering:

                    ierr = nc_get_vars(self._grpid, self._varid,
                                       startp, countp, stridep, data.data)
            if ierr == NC_EINVALCOORDS:
                raise IndexError

So we need to adapt somehow...

jswhit added a commit that referenced this issue Apr 21, 2017
jswhit added a commit that referenced this issue Apr 24, 2017
fix for failing test (issue #645)
@jswhit
Copy link
Collaborator

jswhit commented Apr 24, 2017

pull request merged that should fix the tests

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

3 participants