[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #ZMO-376492]: NetCDF 3.6.3 - large file support
- Subject: [netCDF #ZMO-376492]: NetCDF 3.6.3 - large file support
- Date: Wed, 20 Jan 2010 10:41:05 -0700
> Greetings,
>
> I've Googled and examined output files to no end, so I give up and beg
> for assistance!
>
> My agency basically requires us to use the Windows platform, which
> causes no end of headaches when trying to integrate NetCDF into an
> existing Fortran application.
>
> Here's my problem. I am compiling version 3.6.3 from source, attempting
> to create the F90 bindings. I am using gfortran (4.3.3) and gcc (4.3.3);
> I have MSYS and mingw installed, but am using the gfortran, gcc, and
> libraries from the www.equation.com distribution.
>
> I'm running configure.sh via a shell script:
>
> #!/c/MSYS/1.0/bin/bash.exe
> export CC=/c/gccwin/bin/gcc
> export CPP=/c/gccwin/bin/g++
> export FC=gfortran
> export CFLAGS=-O2
> export CPPFLAGS=-O2
> export FFLAGS=-O2
> export LIBRARY_PATH=/c/gccwin/lib/gcc/i386-pc-mingw32
> ./configure --disable-examples --disable-utilities
> --enable-large-file-tests
> --prefix=/d/smwdata/source_code/netcdf-3.6.3/netcdf
> make check
>
> The result is that NetCDF appears to compile flawlessly and passes all
> of the 64-bit offset and classic tests. However, when the large file
> tests begin, all hell breaks loose, ending with a Windows pop-up
> message: "tst_large.exe has encountered a problem and needs to close. We
> are sorry for the inconvenience."
>
> A snippet of output at the start of large file testing looks like this:
>
> *** Testing large files, quickly.
> *** Creating ./quick_large_files.nc for 64-bit offset large file
> test...Sorry! Unexpected result, quick_large_files.c, line: 82
> Sorry! Unexpected result, quick_large_files.c, line: 84
> Sorry! Unexpected result, quick_large_files.c, line: 86
> ok
> *** Now a 64-bit offset, large file, fixed var test...Sorry! Unexpected
> result, quick_large_files.c, line: 134
> ok
>
>
> Any insight or help you can offer would be most appreciated! I can
> always run my application under Linux (works flawlessly), but there are
> those who insist on being able to run my application on Windows, and it
> would be nice to have NetCDF enabled on the Windows platform for that
> reason.
>
> Cheers,
>
> - Steve
>
>
Howdy Steve!
I find the following somewhat cryptic comment and code in the C header file for
the visual studio build (win32/NET/config.h):
/* I added the following to this config.h file by hand, after being abducted by
aliens last week in Kansas. (All Hail Zorlock, Mighty Destroyer of Worlds!)
*/
#include <io.h>
#include <process.h>
#define lseek _lseeki64
#define off_t __int64
#define _off_t __int64
#define _OFF_T_DEFINED
#define snprintf sprintf_
The idea is that with 64-bit values, a special lseek must be used. The above
define sets up the OS to use lseek64, which can handle 64-bit offsets into the
file.
Please let me know whether or not this helps.
Thanks,
Ed
Ticket Details
===================
Ticket ID: ZMO-376492
Department: Support netCDF
Priority: High
Status: Closed