[MITgcm-support] Re: pickup problem

Constantinos Evangelinos ce107 at ocean.mit.edu
Fri Apr 1 00:08:22 EST 2005


On Thursday 31 March 2005 10:21, Jean-Michel Campin wrote:
> Hi,
>
> I checked the restart accuracy (testing 2+2 = ? 4) on my laptop
> with g77 & ifc:
> most of the testing experiments pass (zero diff of binary pickup files):
>  adjustment.128x64x1
>  adjust_nlfs.cs-32x32x1
>  global_ocean.90x40x15
>  global_ocean_pressure
>  global_with_exf
>  ideal_2D_oce
>  lab_sea
>
> but some fail:
>  global_ocean.cs32x15
>  aim.5l_cs
>
> The reason for those "fail" is related to the Opfile:
>  with g77: -mfpmath=sse -msse -msse2
>  with ifc: -pc64 -xW
> and the problem persists even if I switch off the Non-Linear FS.

These flags instruct the compiler to use exclusively SSE/SSE2 code for the 
case of g77 and to use SSE/SSE2 code for vectorizable loops (at least) while 
doing x87 stack calculations with the mantissa width set to the 53 bits 
corresponding to a double precision 64-bit floating point number for the case 
of the Intel compiler. Basically in either case nothing aggressive in the 
optimization landscape, just a setting of the target instruction extension 
set.

>
> If I use the old optfiles (by the way, I wonder who did
> change the standard optfile ?) 

The SSE enabling flags were my suggestion but the culprit was ... :-)

> or if I don't use -ieee,
> then the restart is OK (2+2 = 4).
>
> I don't know what to do with those compiler options, and if
> you have any suggestion ...

The problem with not using these compiler options is:
a) One ends up using the x87 stack that is
1) slower on Pentium4 systems and much slower when using -ieee
2) of mixed precision (80 and 64 bit) in indeterminate (runtime varying) ways 
when not using -ieee
b) Future chips may eventually drop the x87 stack altogether (the M$ compilers 
do not even generate x87 code anymore on processors that support SSE2).

This is indeed a strange problem - it would appear to suggest some common 
compiler error for g77 and ifc (very unlikely unless the difference is to be 
found in some common library call) or something very exotic in the setup that 
likes the extra precision/range of the 80-bit numbers the x87 stack uses.

I wonder whether the problem appears with the latest g77, ifort8 etc. As soon 
as I get on a fast connection and not the modem line from the hospital I plan 
to install the beta versions of the Intel v9 compilers on lagoon and people 
would be most welcome to runs all sorts of tests on them.

Constantinos
-- 
Dr. Constantinos Evangelinos
Department of Earth, Atmospheric and Planetary Sciences
Massachusetts Institute of Technology




More information about the MITgcm-support mailing list