[MITgcm-devel] mom_calc_ke

Martin Losch Martin.Losch at awi.de
Thu Jul 19 07:23:19 EDT 2012


Hi Jean-Michel,

on second thought, splitting the loop in mom_u/v_bottomdrag break isomip and dome (on my linux box), but nothing else, and I have no idea why, so I'll refrain from doing that for now.

Martin

csysl24:verification> diff tr_out.txt  tr_out.txt_ref 
[...]
< Y Y Y Y> 2<16 16  9  8 16  3 16  3  2  2  3  2 16  1  3  2 FAIL  dome
---
> Y Y Y Y>14<16 16 16 16 16 16 16 16 16 16 16 16 16 13 14 16 pass  dome
59,61c59,61
< Y Y Y Y> 3< 8  9 13 10 10 11 14 10  3  4  2  3  3  3  1  3 FAIL  isomip
< Y Y Y Y> 4<10 16 16 11 12 16 16 11  4  4  2  4  4  3  2  3 FAIL  isomip.htd
< Y Y Y Y> 6<10 16 16 11 12 16 16 11  4  4  2  4  4  3  4  3 FAIL  isomip.icefront
---
> Y Y Y Y>16<16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  isomip
> Y Y Y Y>16<16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  isomip.htd
> Y Y Y Y>16<16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  isomip.icefront
[...]
 
On Jul 19, 2012, at 10:47 AM, Martin Losch wrote:

> Hi Jean-Michel,
> why do you want to split it? To have different loop boundaries for the first part, like this:
>      DO j=1-Oly,sNy+Oly-1
>       DO i=1-Olx,sNx+Olx-1
> or even
>      DO j=1-Oly,sNy+Oly
>       DO i=1-Olx,sNx+Olx
> ? I can do that along with my change.
> 
> Martin
> 
> On Jul 18, 2012, at 11:36 PM, Jean-Michel Campin wrote:
> 
>> Hi Martin,
>> 
>> I think it's better to have .GT.0. rather than .NE.0. anyway,
>> so if it helps with your compiler optimisation problem,
>> you should go and change it.
>> 
>> I also had in mind (for a long time) to split this bottom-drag
>> computation loop in (at least) 2 parts (linear & quadratic) but
>> no urgent need to do it now.
>> 
>> Cheers,
>> Jean-Michel
>> 
>> On Wed, Jul 18, 2012 at 09:14:33PM +0200, Martin Losch wrote:
>>> Hi there, I stumbled across a situation, where the optimization of ifort (-O3) destroys the code and leads to NaNs. The problem is (probably) due to the optimzed code not producing small negative numbers in S/R mom_calc_ke for KE (kinetic energy). In mom_?_bottomdrag, we have SQRT(KE) and this results in NaNs in some cases. The problem can be fixed, when the if-statement in mom_?_bottomdrag (line 91 for u and 97 for v) is changed from .NE. 0. to .GT. 0.
>>> 
>>> What do you think? is this worth it?
>>> 
>>> Martin
>>> 
>>> 
>>> _______________________________________________
>>> MITgcm-devel mailing list
>>> MITgcm-devel at mitgcm.org
>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>> 
>> _______________________________________________
>> MITgcm-devel mailing list
>> MITgcm-devel at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
> 
> 
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel




More information about the MITgcm-devel mailing list