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
==============================================================================


  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: