[MITgcm-devel] TAF 1.9.13 bug

Patrick Heimbach heimbach at MIT.EDU
Tue Dec 4 23:23:19 EST 2007


Ralf,

it took me some time and sweat to narrow down the adjoint problem
in our lab_sea verification experiment
(NAN's only occur with one compiler, and that compiler doesn't
have an "-fpe0" type of option to stop when NAN occurs).

As we suspected it is a TAF bug.
It occurs in the seaice dynamic solver, S/R seaice_lsr.F
I suspect, that you did not update the loop index changes for
the usage of
CADJ LOOP = iteration
i.e. the adjoint of the iterative loop.

I've appended a tar ball with
ad_taf_output.f_1.9.13_orig        faulty adjoint
ad_taf_output.f_1.9.13_corrected   hand-fixed adjoint (corrected loop  
indices)
ad_taf_output.f_1.9.8

I suggest we agree that lab_sea is a valid test setup for TAF,
and that you should add it to your test suite
so we don't have to argue again whether our code is wrong or TAF is  
wrong
(at least for this case).

Cheers
-Patrick

-------------- next part --------------
A non-text attachment was scrubbed...
Name: all_adcode.tgz
Type: application/octet-stream
Size: 1206975 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20071204/88bab71c/attachment.obj>
-------------- next part --------------



On Nov 15, 2007, at 11:36 AM, Ralf Giering wrote:

> Patrick,
>
> I have checked the whole diff file and there are only differences  
> in array shifts
> and some empty if-statemetns are removed, thats it.
> I understand that you both are traveling.
> If somebody else has this problem he could just send me the whole  
> code and run-time environment to check.
>
> The new version was very carefully checked and nobody but you has  
> reported problems.
> So I do not want to go back to the older version again.
> You can always use version 1.9.8.
>
> Ralf
>
> On Thu November 15 2007, Patrick Heimbach wrote:
>>
>> Ralf,
>>
>> as I mentioned, J.M. and I are both traveling in Europe this week,
>> and little time to look into this.
>>
>> If you do a diff between the codes, there are plenty of differences,
>> mostly seem to shifts in array boundaries.
>> The underlying code from which these were generated is identical
>> (only change is add/remove staf option "-version 1.9.8").
>>
>> We are using compiler options for g77
>>   -Wimplicit -Wunused -mfpmath=sse -msse -msse2
>> so maybe an uninitialised variable in 1.9.13 code.
>>
>> Could I ask you again to revert to working staf default version.
>> There are quite a few users who are relying on similar setup now.
>>
>> Thanks
>> -Patrick
>>
>>
>>
>> On Nov 15, 2007, at 10:13 AM, Ralf Giering wrote:
>>
>>> Patrick,
>>>
>>> I can't see any relevant differences between both codes.
>>> Can you please check again.
>>> There should be an easy way to pinpoint the problem by catching
>>> a run time exception (NaN).
>>>
>>> Ralf
>>>
>>> On Thu November 15 2007, Patrick Heimbach wrote:
>>>>
>>>> Ralf,
>>>>
>>>> both Jean-Michel and I were traveling to Europe
>>>> (and I now sit 4 rows behind your colleague)
>>>> so we couldn't look into this more.
>>>>
>>>> Please revert to a working default version of TAF
>>>> while the problem isn't fixed.
>>>>
>>>> I've attached codes for 1.9.13 and 1.9.8
>>>>
>>>> Also, it might be worth adding our lab_sea
>>>> verification to your test suite.
>>>> W can talk about this or help you get
>>>> what you need.
>>>>
>>>> -Patrick
>>>>
>>>>
>>>
>>>
>>>
>>> -- 
>>> ###################################################
>>>  Dr. Ralf Giering
>>>  FastOpt oHG
>>>  Schanzenstr. 36, 20357 Hamburg, Germany
>>>  Tel.: +49 40 48096347
>>>  Fax : +49 40 48096357
>>>  Email: Ralf.Giering at FastOpt.de
>>>  URL  : http://www.FastOpt.de
>>>  Handelsregister Amtsgericht Hamburg, HRA 105187
>>>  Gesch?ftsf?hrer: Ralf Giering, Thomas Kaminski
>>> ###################################################
>>
>> ---
>> Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
>> MIT | EAPS 54-1518 | 77 Massachusetts Ave | Cambridge MA 02139 USA
>> FON +1-617-253-5259 | FAX +1-617-253-4464 | SKYPE patrick.heimbach
>>
>>
>
>
>
> -- 
> ###################################################
>  Dr. Ralf Giering
>  FastOpt oHG
>  Schanzenstr. 36, 20357 Hamburg, Germany
>  Tel.: +49 40 48096347
>  Fax : +49 40 48096357
>  Email: Ralf.Giering at FastOpt.de
>  URL  : http://www.FastOpt.de
>  Handelsregister Amtsgericht Hamburg, HRA 105187
>  Gesch?ftsf?hrer: Ralf Giering, Thomas Kaminski
> ###################################################

---
Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
MIT | EAPS 54-1518 | 77 Massachusetts Ave | Cambridge MA 02139 USA
FON +1-617-253-5259 | FAX +1-617-253-4464 | SKYPE patrick.heimbach




More information about the MITgcm-devel mailing list