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]

Cray T3E F90 interface



Hello all

In case anyone is interested, I have got the netcdf-3.6.2 Fortran-90 interface working on a Cray T3E (don't laugh!). The main obstacle to this was related to the usual T3E problem: the default REAL type has the same number of bytes (8) as the default DOUBLEPRECISION. However the netCDF Fortran 90 code defines two real kinds:

   FourByteReal = selected_real_kind(P=6, R=37)
   EightByteReal = selected_real_kind(P=13, R=307)

and then assumes that FourByteReal corresponds to REAL. This is an incorrect assumption, with the result that all the nf90_*_FourByteReal functions give SEGFAULTs. My solution was to strip out all references to these functions in the interface declarations in f90/netcdf_overloads.f90. The resulting library supports only 8-byte reals (as does the underlying Fortran 77 library).

The purpose of the current message is twofold:

   * To leave a record of this in the Googleverse, in the unlikely
     event that anyone else needs to use the netCDF Fortran-90
     interface on a Cray T3E.
   * To ask, is there any interest from the developers in incorporating
     my changes into the master code?

By the way, some time ago I explored the alternative approach of using the compiler's "-default32" switch, which makes the default REAL 4 bytes long. This turns out not to be a good idea, as it also affect the default integer size in a way that breaks a lot of other code.

--
Mark Hadfield          "Ka puwaha te tai nei, Hoea tahi tatou"
m.hadfield@xxxxxxxxxx
National Institute for Water and Atmospheric Research (NIWA)



===============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================


 
 
  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