Package Details: python2-netcdf4 1.2.5-1

Git Clone URL: (read-only)
Package Base: python2-netcdf4
Description: Python/numpy interface to the netCDF version 4 library.
Upstream URL:
Licenses: MIT
Submitter: None
Maintainer: richli
Last Packager: richli
Votes: 10
Popularity: 0.024725
First Submitted: 2011-04-06 23:50
Last Updated: 2016-11-30 16:27

Latest Comments

iodine commented on 2016-10-02 12:56

@richli, thanks for looking into this! Turns out Arch is using half the RAM as the size for /tmp by default, hence it's 4G on my machine. I changed this according to the wiki article and now it builds as expected. Thanks!

richli commented on 2016-07-03 01:07

@leepesjee, @iodine: I checked it out more closely, and I think it's because your systems don't have enough free memory.

In test/, it creates a temporary netCDF file with a dimension length equal to 2^63 - 1. This results in a file about 4.1 GiB large. Unless you've done something to configure it otherwise, it's creating the temporary file under the "/tmp" directory, which has a size constrained by your available RAM (since it's a tmpfs mount). If you don't have enough free RAM, then the test file can't be created and you get those errors.

I confirmed this myself: if I fill up my /tmp directory enough, eating up my free memory, and then I re-run the tests, I can trigger the same failure for the file (I haven't bothered checking if "" is also affected, but I assume it is).

If you don't have enough room in /tmp to fit the 4 GiB temporary file, then I suggest either (a) disabling the test suite (run makepkg with "--nocheck") or (b) setting the "TMPDIR" environment variable to somewhere with enough room, like inside your home directory, before running makepkg. That should override where the temporary file is placed [1].


Hope that helps!

leepesjee commented on 2016-07-02 00:38

I have the same issue as iodine. Using makepkg.

richli commented on 2016-05-16 17:42

@iodine: The test suite works for me. Could you try using makepkg instead of yaourt?

iodine commented on 2016-05-16 11:43

I think the test suite might be broken. See:

netcdf4-python version: 1.2.4
HDF5 lib version: 1.10.0
netcdf lib version: 4.4.1-rc1
numpy version 1.11.0
ERROR: runTest (tst_cdf5.test_cdf5)
testing NETCDF3_64BIT_DATA format (CDF-5)
Traceback (most recent call last):
File "/tmp/yaourt-tmp-iodine/aur-python2-netcdf4/src/netcdf4-python-1.2.4rel/test/", line 20, in setUp
v[:ndim] = arrdata
File "netCDF4/_netCDF4.pyx", line 4053, in netCDF4._netCDF4.Variable.__setitem__ (netCDF4/_netCDF4.c:44166)
File "netCDF4/_netCDF4.pyx", line 4258, in netCDF4._netCDF4.Variable._put (netCDF4/_netCDF4.c:45687)
RuntimeError: NetCDF: Operation not allowed in define mode

ERROR: runTest (tst_atts.VariablesTestCase)
testing attributes
Traceback (most recent call last):
File "/tmp/yaourt-tmp-iodine/aur-python2-netcdf4/src/netcdf4-python-1.2.4rel/test/", line 42, in setUp
f = netCDF4.Dataset(self.file,'w')
File "netCDF4/_netCDF4.pyx", line 1811, in netCDF4._netCDF4.Dataset.__init__ (netCDF4/_netCDF4.c:12611)
IOError: Permission denied

Ran 80 tests in 23.620s

FAILED (errors=2)
python2: posixio.c:283: px_pgout: Assertion `*posp == OFF_NONE || *posp == lseek(nciop->fd, 0, SEEK_CUR)' failed.
/tmp/yaourt-tmp-iodine/aur-python2-netcdf4/./PKGBUILD: line 25: 7723 Aborted (core dumped) PYTHONPATH="../build/lib.linux-${CARCH}-2.7" python2 -B ./
==> ERROR: A failure occurred in check().
==> ERROR: Makepkg was unable to build python2-netcdf4.
==> Restart building python2-netcdf4 ? [y/N]
==> ----------------------------------------

This probably happens because the tmpfs gets overloaded with a huge .nc file.

richli commented on 2015-03-09 20:05

@giniu: Thanks! I've adopted it and brought it up to date with upstream. I also figured out to eliminate the unnecessary second build step and how to run the test suite.

giniu commented on 2015-03-09 19:23

@richli - no problem, if you have time for this one, go for it.

Anonymous comment on 2012-02-09 02:04

rebuild against latest netcdf

big_gie commented on 2012-01-21 20:24

0.9.9 available.

giniu commented on 2011-07-19 11:44

netcdf4 0.9.5 is now released, though they skipped the homepage - it is directly on

All comments