[MITgcm-devel] BLING
Dimitris Menemenlis
dmenemenlis at gmail.com
Fri Jun 6 13:06:15 EDT 2014
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
More information about the MITgcm-devel
mailing list