[MITgcm-devel] BLING
Patrick Heimbach
heimbach at MIT.EDU
Fri Jun 6 13:56:53 EDT 2014
Yes, that could work too (and which is why I mentioned “at least for a start”).
Martin’s option addresses the issue of not having to deal with extra storing to avoid recomputations (which you still have to deal with when going the autodiff_inadmode route).
Best to have a gradient check test in place first before exploring this, I’d say.
p.
On Jun 6, 2014, at 1:06 PM, Dimitris Menemenlis <dmenemenlis at gmail.com> wrote:
> I am the wrong person to be giving advice on this, but wouldn't the autodiff_inadmode.*
> mechanism be another option for achieving what Ariane is trying to do, i.e., different code
> in forward and adjoint?
>
> Dimitris Menemenlis
>
> On Jun 6, 2014, at 8:34 AM, Patrick Heimbach <heimbach at MIT.EDU> wrote:
>
>> Hi Ariane,
>>
>> looks very promising.
>> Martin’s suggestion points, at least for a start.
>>
>> One suggestion regarding the checked-in verification experiment is to configure it as a gradient check. I’ve tried it *very* briefly (without looking at the experiment in detail), but failed. I tried testing indices 1 (theta), 2 (salt), and 201 (GENVAR3D).
>>
>> In addition, providing reference output for forward and adjoint runs (incl. gradient checks) in directory results/ would be good.
>>
>> Cheers
>> -Patrick
>>
>>
>> On Jun 6, 2014, at 3:51 AM, Martin Losch <Martin.Losch at awi.de> wrote:
>>
>>> Hi Ariane,
>>>
>>> I would put this little bit of code into a separate routine with PTR_NUT/FE as I/O and then you can tell taf that the routine is inactive. There are examples in pkg/autodiff/checkpoint.flow, but otherwise have a look at the documentation of TAF for details.
>>>
>>> Why do you get negative concentrations in the first place?
>>>
>>> M.
>>>
>>>
>>> On Jun 6, 2014, at 3:33 AM, Ariane Verdy <averdy at ucsd.edu> wrote:
>>>
>>>> Hi,
>>>>
>>>> We have checked in the BLING code (mitgcm_contrib/bling) and a verification example (mitgcm_contrib/verification_other/global_oce_biogeo_bling). If anyone uses it or glances at the code, we could certainly appreciate your feedback!
>>>>
>>>> One thing in particular that needs attention is a small piece of code that we'd like to hide from TAF. In the bling_production subroutine, there is an option to get rid of negative tracer concentrations using the BLING_NO_NEG flag, analogous to DIC_NO_NEG in the dic package. We find this makes the code much more stable and thus is highly desirable. However it causes numerous adjoint recomputations, and the only way I found to get rid of those recomputations is with several store commands, some of which are inside loops, which ends up slowing down the code more than the recomputations themselves. (Furthermore, I don't think we want this NO_NEG bit adjointed as it is likely ill-posed.) We could probably hide this bit of code outside of the BLING package (e.g. in autodiff pkg), but that is not ideal. So my question is: can someone please suggest a good way to hide a bit of code from TAF within the BLING package?
>>>>
>>>> Thank you,
>>>> Ariane
>
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
---
Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
MIT | EAPS 54-1420 | 77 Massachusetts Ave | Cambridge MA 02139 USA
FON +1-617-253-5259 | FAX +1-617-253-4464 | SKYPE patrick.heimbach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1588 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20140606/bcd8d9a0/attachment.p7s>
More information about the MITgcm-devel
mailing list