[MITgcm-support] G95 build issue: f2c name mangling

Mark Hadfield m.hadfield at niwa.co.nz
Wed Oct 11 15:38:25 EDT 2006


Mark Hadfield wrote:
> Oh what the hell. Below (following my signature) is my attempt at a 
> rewrite of subroutine TIMER_GET_TIME in timers.F.
The code I posted the other day included the following in the 
declarations section:

# elif (defined (TARGET_T3E) || defined (TARGET_CRAY_VECTOR))
C     No declarations necessary

I assumed this was OK because there were no declarations in the original 
for the functions in question (second & secondr). I thought they might 
be Cray-specific intrinsic functions.

The compiler on the NIWA T3E begs to differ and insists that 
declarations *are* necessary, as these are external functions. This is 
what the above code should look like (with some redundant parentheses 
also removed).

# elif (defined TARGET_T3E || defined TARGET_CRAY_VECTOR)
      real second, secondr
      external second, secondr

I haven't tested this with TARGET_CRAY_VECTOR. From the "man second" 
page I think "real" is the correct data type. (There is only one real 
data type on T3Es.)

By the way, I have build-options files for a few new platforms to 
submit. Where should I send them? Should I attach them to an email to 
the list?

-- 
Mark Hadfield          "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield at niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)






More information about the MITgcm-support mailing list