[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #BIJ-640778]: Error when a NetCDF file becomes bigger than 2.1 GB [DELFT3D-35792]
- Subject: [netCDF #BIJ-640778]: Error when a NetCDF file becomes bigger than 2.1 GB [DELFT3D-35792]
- Date: Fri, 08 Dec 2017 10:56:35 -0700
Hello Adri,
I'm afraid that 3.6.1 is no longer supported; it is certainly not tested
against modern platforms or compilers. The only suggestion I can make is to
upgrade to the latest C (4.5.0) and Fortran (4.4.4) versions of the libraries.
The C interface is available from
http://www.unidata.ucar.edu/software/netcdf/winbin.html. Alternatively, you
may download the source code from https://github.com/Unidata/netcdf-c. We do
not currently provide binary installers for the Fortran libraries for Windows,
but some users have reported success in compiling the Fortran code on Windows.
The Fortran source code can be downloaded from
https://github.com/Unidata/netcdf-fortran.
I'm sorry I can't provide a more immediately useful response, but I hope this
helps,
-Ward
> Dear UniData,
>
> We are using your NetCDF-3 source code, including the Fortran interface,
> on Windows. According to file "src/RELEASE_NOTES", the exact version
> is 3.6.1.
>
> When the binaries are built with VisualStudio 2015 and Intel Fortran
> compiler 16 and when these binaries are used in a computation, a runtime
> error occurs when the NetCDF file becomes bigger than 2.1 GB. Debugging
> shows that it goes wrong on closing a NetCDF file. The size of the output
> file is obtained via calling the Microsoft function "fstat" (posixio.c,
> line 1635). "fstat" puts the file size in a structure called "stat" and
> returns 0 on success and a negative value when failed. Since "stat" is
> 32bit, "fstat" is resolved via "_fstat64i32", putting a 32bit value for
> the size of the file in "stat", which is negative when the file becomes
> bigger than 2.1GB. In VS2012 and lower "fstat" still returns success (is
> 0), although the reported size is negative. In VS2015, the implementation
> of "_fstat64i32" is changed, leading to a negative return value (failed)
> when the size is negative.
>
> The bug can be fixed by the following changes in file posixio.c, in
> subrout ine ncio_filesize (line 1630):
>
> 1. Replace the declaration "struct stat sb" by "struct _stat64 sb"
> 2. Replace the call to "fstat" by a call to "_fstat64" (this might not
> be necessary: replacing "stat" by "_stat64" might be enough)
>
> Can you please answer the following questions:
>
> 1. Is this a known problem?
> 2. What solution do you propose?
>
> Thanks for your support.
>
> Regards,
>
> Adri
>
>
> Deltares
>
> Adri Mourits
> Consultant
>
> address@hidden<mailto:address@hidden>
>
>
> T:
>
> +31 88 335 8332
>
> M:
>
> +31 6 4691 4570
>
> F:
>
> +31 88 335 8160
>
> P.O. Box 177
> 2600 MH Delft
> The Netherlands
> www.deltares.nl<http://www.deltares.nl/>
>
>
> Rotterdamseweg 185
> 2629 HD Delft
> The Netherlands
>
>
>
>
> DISCLAIMER: This message is intended exclusively for the addressee(s) and may
> contain confidential and privileged information. If you are not the intended
> recipient please notify the sender immediately and destroy this message.
> Unauthorized use, disclosure or copying of this message is strictly
> prohibited. The foundation 'Stichting Deltares', which has its seat at Delft,
> The Netherlands, Commercial Registration Number 41146461, is not liable in
> any way whatsoever for consequences and/or damages resulting from the
> improper, incomplete and untimely dispatch, receipt and/or content of this
> e-mail .
>
>
Ticket Details
===================
Ticket ID: BIJ-640778
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata
inquiry tracking system and then made publicly available through the web. If
you do not want to have your interactions made available in this way, you must
let us know in each email you send to us.