[MITgcm-support] differentiating code_oad with ecco and cal enabled + OpenAd

Patrick Heimbach heimbach at MIT.EDU
Wed Aug 7 17:02:40 EDT 2013


Hi Suneet,

we haven't pushed pkg/ecco (nor pkg/cal) through OpenAD yet
(but we've been pushing more and more packages over the last 6 months,
and hope to get to these ones soon).
There are likely more problems than the ones you've encountered,
and some more code changes needed to fully sort this out.

-Patrick

On Aug 7, 2013, at 4:20 PM, Suneet Dwivedi <suneetdwivedi at gmail.com> wrote:

> Dear All,
> 
> Using the openad, I am able to build the adjoint of the example code given in /verification/OpenAD/code_oad. But when I try to include the packages ecco and cal in my model setup, I get the errors like this while compiling 'externalDummies_cb2m_oad.f'
> 
> ------------------------------------------------------------------------------------
> Cannot disable Fortran error message 6535
> externalDummies_cb2m_oad.f(344): error #6535: This variable or component must be of a derived or structure type   [ARRAY]
>          array_p = array%v
> -------------------^
> ---------------------------------------------------------------------------
> Similar errors are found for many other variables like, CG2D_B, CG2D_X etc in the same file. 
> 
> On investigating it further, I found that the openad is not able to convert the 'real*8' variables like 'ARRAY', SUMPHI, CG2D_B, CG2D_X etc. into 'type(active)' while differentiating. Instead it converts them into REAL(w2f__8) and this seems to be the main cause of error.
> 
> When I hardcode the variables 'ARRAY', SUMPHI, CG2D_B, CG2D_X into type(active), the externalDummies_cb2m_oad.f compiles fine.
> 
> When ecco package is not enabled, no such errors are seen. The problem occurs only when 'ecco' is enabled alongwith 'cal'.
> 
> Please help me resolve this problem. Kindly let me know what changes should I make in the code to convert 'real*8' variables into 'type(active)' as a result of differentiation using openad.
> 
> Looking forward for your kind reply,
> 
> Thanks,
> 
> Suneet


---
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-support/attachments/20130807/3897312e/attachment.p7s>


More information about the MITgcm-support mailing list