[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20031202: netCDF General - gentoo - Large files



Stuart,

> To: address@hidden
> From: "Stuart Murdock" <address@hidden>
> Subject: netCDF General - gentoo - Large files
> Organization: University of Southampton
> Keywords: netCDF Linux large file

The above message contained the following:

> Institution: University of Southampton
> Package Version: netcdf-3.5.1-beta13
> Operating System: gentoo
> Hardware Information: P4 2.6GHz 120GB
> Inquiry: Hi,
> 
> I am trying to create a large netCDF file > 2GB with Hinsens'
> Scientific netCDF API which we are reinstalling after netCDF.

We don't know, have, or support Hinsens' Scientific netCDF API.

> There are no problems with files less than 2GB but when I go over the
> this value I get the error
>
> netcdf: Operation not allowed in define mode
> Traceback (most recent call last):
>   File "netCDF.py", line 32, in ?
>     xyzVar[start:end,:,:] = RandomArray.random((step,3,natom))
> IOError: netcdf: Operation not allowed in define mode
> 
> The code was compiled with the flags 
> CFLAGS='-DNDEBUG -D_LARGEFILE_SOURCE'
> which appear to have been used.
> 
> Are there any other flags, or is my code wrong etc.

According to the large-file Linux example at

    http://my.unidata.ucar.edu/content/software/netcdf/INSTALL.html

the option -D_FILE_OFFSET_BITS=64 might also be necessary.

> Less importantly as a check I have a big.c code

Actually, this is crucial; otherwise, we would have suggested that you
contact Hinsen.

> which should be able to create a file bigger than 2GB. The error is 
> 
> line 79 of big.c: Invalid argument
> 
> When I hit the 2GB limit.
> 
> Thanks for your help
> 
> Stuart
> 
> 
> --=_e173514df2ce34e6116a4e8c55aec535
> Content-Type: application/octet-stream
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename="netCDF.py"
> 
> 
> --=_e173514df2ce34e6116a4e8c55aec535
> Content-Type: application/octet-stream
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename="big.c"
> 
> 
> --=_e173514df2ce34e6116a4e8c55aec535--

The file "big.c" wasn't in your email.

Regards,
Steve Emmerson