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

[netCDF #LBV-482826]: for: netCDF Lagefile issue

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [netCDF #LBV-482826]: for: netCDF Lagefile issue
  • Date: Mon, 26 Sep 2011 05:15:22 -0600

> Hi,
> I worked on Linux using netcdf-4.0 library to created a netCDF file in
> C++. The file size was bigger than 6 GB.
> The code was the following,
> ----------------------------------------------------
> 
> if (I == 1)
> {
> dataFile = new NcFile(FullName.c_str(), I == 1 ? NcFile::Replace 
> :NcFile::Write,
> NULL,
> 0,
> NcFile::Offset64Bits);
> 
> }
> else
> {
> dataFile = new NcFile(FullName.c_str(), NcFile::Write);
> }
> .......
> 
> ------------------------------------------------------
> The problem was whenever the netcdf library opens the file with the
> correct options i.e. O_LARGEFILE it works but when it neglects that
> option, it fails. The netcdf library appears to perform a single 'open'
> call with large file support, then a number of other subsequent 'open'
> calls without that option, which fail.
> 
> So my output netCDF file was failed.
> Could you help me with it?
> Thanks,
> Wendy
> 
> 

Howdy Wendy!

You need to upgrade to the latest release of netCDF:
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.1.3.tar.gz

Build it according to these instructions:
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/Quick-Instructions.html#Quick-Instructions

Thanks,

Ed

Ticket Details
===================
Ticket ID: LBV-482826
Department: Support netCDF
Priority: Normal
Status: Closed