[Numpy-discussion] numpy.test() errors r6862

Charles R Harris charlesr.harris at gmail.com
Sun Apr 12 14:52:13 EDT 2009


On Sun, Apr 12, 2009 at 12:17 PM, Nils Wagner
<nwagner at iam.uni-stuttgart.de>wrote:

> ======================================================================
> ERROR: test suite
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/nose-0.10.4-py2.6.egg/nose/suite.py",
> line 154, in run
>     self.setUp()
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/nose-0.10.4-py2.6.egg/nose/suite.py",
> line 180, in setUp
>     if not self:
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/nose-0.10.4-py2.6.egg/nose/suite.py",
> line 65, in __nonzero__
>     test = self.test_generator.next()
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/nose-0.10.4-py2.6.egg/nose/loader.py",
> line 221, in generate
>     for test in g():
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/tests/test_format.py",
> line 440, in test_memmap_roundtrip
>     shape=arr.shape, fortran_order=fortran_order)
>   File
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/format.py",
> line 484, in open_memmap
>     mode=mode, offset=offset)
>   File
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/core/memmap.py",
> line 231, in __new__
>     mm = mmap.mmap(fid.fileno(), bytes, access=acc,
> offset=offset)
> error: [Errno 22] Invalid argument
>
> ======================================================================
> ERROR: test_mmap (test_io.TestSaveLoad)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/testing/decorators.py",
> line 169, in knownfailer
>     return f(*args, **kwargs)
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/tests/test_io.py",
> line 92, in test_mmap
>     self.roundtrip(a, file_on_disk=True,
> load_kwds={'mmap_mode': 'r'})
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/tests/test_io.py",
> line 100, in roundtrip
>     RoundtripTest.roundtrip(self, np.save, *args,
> **kwargs)
>   File
>
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/tests/test_io.py",
> line 67, in roundtrip
>     arr_reloaded = np.load(load_file, **load_kwds)
>   File
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/io.py",
> line 193, in load
>     return format.open_memmap(file, mode=mmap_mode)
>   File
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/format.py",
> line 484, in open_memmap
>     mode=mode, offset=offset)
>   File
> "/home/nwagner/local/lib64/python2.6/site-packages/numpy/core/memmap.py",
> line 231, in __new__
>     mm = mmap.mmap(fid.fileno(), bytes, access=acc,
> offset=offset)
> error: [Errno 22] Invalid argument
>
> ----------------------------------------------------------------------
> Ran 1889 tests in 12.656s
>
> FAILED (KNOWNFAIL=1, errors=2)
>

Hmm, I'll guess that the problem is this:

*offset* must be a multiple of the ALLOCATIONGRANULARITY.

This conflicts with the current intent of offset. Looks like we need to fix
up the patch to use the  nearest multiple of ALLOCATIONGRANULARITY and then
offset the usual way. Or, since ALLOCATIONGRANULARITY is likely to be
platform dependent, maybe we should just revert the patch.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090412/0dfe9638/attachment.html>


More information about the NumPy-Discussion mailing list