Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[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
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu



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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690