<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Dan,<div><br></div><div>yes, I started PR 773 (<a href="https://github.com/MITgcm/MITgcm/pull/773">https://github.com/MITgcm/MITgcm/pull/773</a>) and you already reviewed it, so all is good (o:<div><br></div><div>Martin<br><div><br><blockquote type="cite"><div>On 22. Sep 2023, at 12:09, Daniel Goldberg <Dan.Goldberg@ed.ac.uk> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">hi both</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">very sorry -- i did not see this email yesterday (i think i saw that it was taf tang-lin and figured it was not for me).</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">very sorry about this. i considered making the changes to the files contingent on ALLOW_OPENAD being defined but they seemed so harmless i was confident it would not be an issue!</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">martin, have you already started a PR? if so would i be able to contribute? the easiest thing is to drop in ifdef's where these temporary string variables are used to avoid string arrays that OpenAD cannot parse. there are just a lot of them, which is annoying, but i can probably remember where they are.</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">dan</div><div id="appendonsend" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div><hr tabindex="-1" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline-block; width: 1023.109375px;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;"></span><div id="divRplyFwdMsg" dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>MITgcm-devel <<a href="mailto:mitgcm-devel-bounces@mitgcm.org">mitgcm-devel-bounces@mitgcm.org</a>> on behalf of Martin Losch <<a href="mailto:Martin.Losch@awi.de">Martin.Losch@awi.de</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>Friday, September 22, 2023 08:56<br><b>To:</b><span class="Apple-converted-space"> </span>MITgcm-devel <<a href="mailto:MITgcm-devel@mitgcm.org">MITgcm-devel@mitgcm.org</a>><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [MITgcm-devel] problem with TAF tang-Lin exp. hs94.1x64x5</font><div> </div></div><div class="BodyFragment" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font size="2"><span style="font-size: 11pt;"><div class="PlainText">This email was sent to you by someone outside the University.<br>You should only click on links or attachments if you are certain that the email is genuine and the content is safe.<br><br>PS. I tried halpice_streamice with this ( "./testreport -oad -devel -t halfpipe_streamice”) and it worked, maybe Dan can quickly confirm.<br><br>Shall I submit a quick PR?<br><br>Martin<br><br>> On 22. Sep 2023, at 09:22, Martin Losch <Martin.Losch@awi.de> wrote:<br>><br>> Hi Jean-Michel,<br>><br>> that makes sense, I was just referring to just changing the two lines in question (which didn’t work), but reverting the entire routine works for me, too.<br>><br>> Anyway, based on the current master, these changes work for me, but I don’t know if OpenAD is happy with that. Maybe Dan can quickly try:<br>><br>> diff --git a/pkg/ctrl/ctrl_map_ini_gentim2d.F b/pkg/ctrl/ctrl_map_ini_gentim2d.F<br>> index 7459b7fda..98dc1f4c7 100644<br>> --- a/pkg/ctrl/ctrl_map_ini_gentim2d.F<br>> +++ b/pkg/ctrl/ctrl_map_ini_gentim2d.F<br>> @@ -57,7 +57,6 @@ C temporary values in the do loop during reverse pass.<br>> CHARACTER*(MAX_LEN_FNAM) fnamegenIn(1:maxCtrlTim2D)<br>> CHARACTER*(MAX_LEN_FNAM) fnamegenOut(1:maxCtrlTim2D)<br>> CHARACTER*(MAX_LEN_FNAM) fnamegenTmp(1:maxCtrlTim2D)<br>> - CHARACTER*(MAX_LEN_FNAM) fnamebase(1:maxCtrlTim2D)<br>> CHARACTER*(MAX_LEN_FNAM) temp_genarr_fnamA<br>> CHARACTER*(MAX_LEN_FNAM) temp_genarr_fnamB<br>> integer startrec<br>> @@ -121,9 +120,8 @@ C-- generic 2D control variables<br>><br>> ilgen=ilnblnk( xx_gentim2d_file(iarr) )<br>> temp_genarr_fnamA = xx_gentim2d_file(iarr)<br>> - fnamebase(iarr) = temp_genarr_fnamA(1:ilgen)<br>><br>> - call ctrl_init_rec ( fnamebase(iarr),<br>> + call ctrl_init_rec ( temp_genarr_fnamA(1:ilgen),<br>> I xx_gentim2d_startdate1(iarr),<br>> I xx_gentim2d_startdate2(iarr),<br>> I xx_gentim2d_period(iarr),<br>> @@ -165,9 +163,8 @@ C print statements are removed. See "Automatic Differentiation" chap. in the doc<br>> endif<br>> enddo<br>><br>> - ilgen=ilnblnk( xx_gentim2d_file(iarr) )<br>> - temp_genarr_fnamA = xx_gentim2d_file(iarr)<br>> - fnamebase(iarr) = temp_genarr_fnamA(1:ilgen)<br>> +CML ilgen=ilnblnk( xx_gentim2d_file(iarr) )<br>> +CML temp_genarr_fnamA = xx_gentim2d_file(iarr)<br>> write(temp_genarr_fnamB,'(2a,i10.10)')<br>> & ctrlDir(1:ilDir)//temp_genarr_fnamA(1:ilgen),'.',optimcycle<br>> fnamegenIn(iarr) = temp_genarr_fnamB<br>><br>> M<br>><br>>> On 21. Sep 2023, at 20:40, Jean-Michel Campin <jmc@mit.edu> wrote:<br>>><br>>> Hi Martin,<br>>><br>>>> I tried reverting the code to the previous version, but that does not help.<br>>> This does not match what I found:<br>>> 1) this test is run every night (e.g., on villon), and was passing on Sep 20 and it's now failing to run.<br>>> And TAF has not been upgraded (both days it's Version 5.8.8).<br>>> 2) using the code just after merging PR #751, this test fails but if I use the previous<br>>> (before PR #751 was merged) version of ctrl_map_ini_gentim2d.F it run fine (since<br>>> TAF does not remove the 2 lines I copied in my ealier eamil.<br>>><br>>> Cheers,<br>>> Jean-Michel<br>>><br>>> On Thu, Sep 21, 2023 at 06:46:46PM +0200, Martin Losch wrote:<br>>>> Hi Jean-Michel,<br>>>><br>>>> I tried reverting the code to the previous version, but that does not help. Going back to version 5.8.0 does not either, not the combination of both.<br>>>> Going back to pre PR 517 works.<br>>>> Using ???staf -keep??? works, but we don???t want that.<br>>>> That???s weird, so TAF is confused.<br>>>><br>>>> This works:<br>>>><br>>>> ilgen=ilnblnk( xx_gentim2d_file(iarr) )<br>>>> temp_genarr_fnamA = xx_gentim2d_file(iarr)<br>>>><br>>>> call ctrl_init_rec ( temp_genarr_fnamA(1:ilgen),<br>>>> [???]<br>>>><br>>>> but does it work with OpenAD/Tapenade?<br>>>><br>>>> Looking at the code the character array "fnamebase(1:maxCtrlTim2D)??? is not necessary at all, definitely it does not need to be an array. Maybe that???s what upsets TAF?<br>>>><br>>>> Martin<br>>>><br>>>> BTW, the second assignment of fnamebase(parr) can be dropped, too, it???s not used after that. I say we drop the entire variable.<br>>>><br>>>>> On 21. Sep 2023, at 17:37, Jean-Michel Campin <jmc@mit.edu> wrote:<br>>>>><br>>>>> Hi Martin and Dan,<br>>>>><br>>>>> With the changes in ctrl_map_ini_gentim2d.F from Dan's PR #751 (got merged yesterday)<br>>>>> the TAF tang-lin experiment "hs94.1x64x5" does not run anymore with gfortran and -devel<br>>>>> see, without MPI:<br>>>>><span class="Apple-converted-space"> </span><a href="http://mitgcm.org/testing/results/2023_09/tr_villon-b_20230921_1/summary.txt">http://mitgcm.org/testing/results/2023_09/tr_villon-b_20230921_1/summary.txt</a><br>>>>> and with MPI:<br>>>>><span class="Apple-converted-space"> </span><a href="http://mitgcm.org/testing/results/2023_09/tr_engaging-gfoTlm_20230921_0/summary.txt">http://mitgcm.org/testing/results/2023_09/tr_engaging-gfoTlm_20230921_0/summary.txt</a><br>>>>><br>>>>> It looks like a TAF problem, current Version 5.8.8, which remove lines 122 & 124:<br>>>>> 122 ilgen=ilnblnk( xx_gentim2d_file(iarr) )<br>>>>> 123 temp_genarr_fnamA = xx_gentim2d_file(iarr)<br>>>>> 124 fnamebase(iarr) = temp_genarr_fnamA(1:ilgen)<br>>>>> in the Tang-Lin version of this routine (i.e., in ctrl_map_ini_gentim2d_tl.f),<br>>>>> just before the call to "ctrl_init_rec".<br>>>>> And since this experiment is using "debugLevel = 2" (the only TLM test with debugLevel > 1),<br>>>>> it triggers an error in ctrl_init_rec (with -devel, local var fnamebase(iarr) is not set at all).<br>>>>><br>>>>> With the older version of ctrl_map_ini_gentim2d.F (before PR #751), TAF was keeping<br>>>>> these 2 lines:<br>>>>>> ilgen = ilnblnk(xx_gentim2d_file(iarr))<br>>>>>> fnamebase(iarr) = xx_gentim2d_file(iarr)(1:ilgen)<br>>>>><br>>>>> If you know a trick to convince TAF to keep these 2 lines, let me know.<br>>>>> Otherwise, will likely submit the problem to Ralf Giering.<br>>>>><br>>>>> Cheers,<br>>>>> Jean-Michel<br>>>>> _______________________________________________<br>>>>> MITgcm-devel mailing list<br>>>>> MITgcm-devel@mitgcm.org<br>>>>><span class="Apple-converted-space"> </span><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel</a><br>>>><br>>>> _______________________________________________<br>>>> MITgcm-devel mailing list<br>>>> MITgcm-devel@mitgcm.org<br>>>><span class="Apple-converted-space"> </span><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel</a><br>>> _______________________________________________<br>>> MITgcm-devel mailing list<br>>> MITgcm-devel@mitgcm.org<br>>><span class="Apple-converted-space"> </span><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel</a><br>><br><br>_______________________________________________<br>MITgcm-devel mailing list<br>MITgcm-devel@mitgcm.org<br><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel</a><br></div></span></font></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336. _______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">MITgcm-devel mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="mailto:MITgcm-devel@mitgcm.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">MITgcm-devel@mitgcm.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel</a></div></blockquote></div><br></div></div></body></html>