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

[Support #ZTO-391659]: Invalid dimension id or name



Peter,

Sorry to have sent you off on a wild goose chase, I hope trying the Intel
instructions to rebuild from source didn't take too much extra time.

In the meantime, I've looked at your original compiler flags and noticed you
are specifying -r8 and -i8 as Fortran compiler flags to the ifort compiler,
but not specifying any corresponding flags to the icc C compiler.  So Fortran
thinks integers and reals are 8 bytes, but the C code has 4byte ints and
floats.

That could easily be the source of the problem.  The Fortran-77 interface is
implemented in C, and the Fortran-90 interface uses the Fortran-77 interface
in netCDF.  If a Fortran function declares a netCDF ID to be an integer which
is stored in 8 bytes and it passes this to a C function which is expecting a 4
byte integer, things won't work.

You must specify compatible flags for both the Fortran and C compiler, so that
corresponding types take the same amount of storage.  If you use -r8 and -i8
flags to the Fortran compiler, you must use equivalent flags for C
compilations.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: ZTO-391659
Department: Support netCDF
Priority: Normal
Status: Closed