<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1258">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello J-M (and anyone interested in/knowledgeable of Tapenade):</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I have not had very much luck determining why I cannot get the TLM (tangent linear model) experiments with halfpipe_streamice to give accurate values. To recap the issue:</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<ul style="margin-top: 0px; margin-bottom: 0px;" data-editing-info="{"applyListStyleFromLevel":false,"unorderedStyleType":2}">
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); list-style-type: "- ";">
<div role="presentation" class="elementToProof">the TLM experiment passed the verification test on Baudelaire as of checkpoint69i. At this point I did not even know there was a TLM verification being run.</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); list-style-type: "- ";">
<div role="presentation" class="elementToProof">after the merging of <a title="https://github.com/MITgcm/MITgcm/pull/927" href="https://github.com/MITgcm/MITgcm/pull/927">
PR 927</a> the TLM streamice verification no longer worked on Baudelaire. This was for an explainable reason: a critical S/R was no longer passed through Tapenade, and in the reverse (adjoint) model was replaced by handwritten derivative code, but was replaced
by nothing for the TLM.</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); list-style-type: "- ";">
<div role="presentation" class="elementToProof">Since then I have not been able to run the TLM verification with 69i on any linux machine, this includes an Ubuntu server belonging to my department, the ARCHER2 supercomputer login nodes, and a free-tier AWS
ubuntu VM. There have been small variations in the Tapenade 3.16 version available, but I have tried a wide range of these sub-versions of Tapenade.</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); list-style-type: "- ";">
<div role="presentation">I <b>can, however</b>, run it successfully on my M2 mac. </div>
</li></ul>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I have also created a <a title="https://github.com/dngoldberg/MITgcm/tree/branch_streamice_tlm" href="https://github.com/dngoldberg/MITgcm/tree/branch_streamice_tlm">
branch</a> which adds in handwritten TLM code — and this, I can run successfully on my mac (i.e. small relative errors with FD) but not on any linux machines. I have also noted that the test gives inaccurate values ONLY when the control tested by pkg/grdchk
is a gentim2d control. values are accurate if it is a genarr2d control. </div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I am wracking my brain but cannot think of a reason that the TLM, when testing a gentim2d control would be accurate on one a mac (and apparently on baudelaire) but not on any linux architectures. I have even compared the tapenade-generated code on linux and
on mac, and they are identical (other than a few lines related to SIGREG, which seem benign, but it may not be?). So there are a few things I would like to ask you all:</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<ol style="margin-top: 0px; margin-bottom: 0px; list-style-type: decimal;" data-editing-info="{"applyListStyleFromLevel":true,"unorderedStyleType":2}" start="1">
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role="presentation" class="elementToProof">do any other tapenade TLM verification exercises use gentim2d controls?</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role="presentation" class="elementToProof">has anyone seen similar behaviour with tapenade (<a href="mailto:shreyas.gaikwad@utexas.edu" class="tWKOu mention ms-bgc-nlr ms-fcl-b" id="OWAAM639692">@Shreyas Suni Gaikwad</a>)?</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role="presentation" class="elementToProof">Why might baudelaire be distinct in this behaviour to other linux machines? is it anything i can emulate with an AWS vm?</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role="presentation" class="elementToProof">has anyone ever seen similar such behaviour with TAF?</div>
</li></ol>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks very much all! Needless to say this is going to be a very difficult mystery to solve..</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Dan</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Jean-Michel Campin <jmc@mit.edu><br>
<b>Sent:</b> Sunday, December 28, 2025 00:10<br>
<b>To:</b> Daniel Goldberg <Dan.Goldberg@ed.ac.uk><br>
<b>Cc:</b> mitgcm-devel@mitgcm.org <mitgcm-devel@mitgcm.org><br>
<b>Subject:</b> Re: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Dan,<br>
<br>
I will cc mitgcm-devel so that we keep track of this.<br>
<br>
And I'ce just tried on baudelaire (fc42), with c69i MITgcm code ( git checkout checkpoint69i ):<br>
> cd verification<br>
> testreport -dd -tap -tlm -of ../tools/build_options/linux_amd64_gfortran -t halfpipe_streamice<br>
> grep 'grdchk summary : RMS' halfpipe_streamice/run/output_tap_tlm.txt <br>
(PID.TID 0000.0001) grdchk summary : RMS of 4 ratios = 7.1444934467587E-06<br>
> grep 'generated by Tapenade' tr_out.txt<br>
TangLin generated by Tapenade 3.16 (develop) - 29 Jul 2025<br>
<br>
I will send in following email the tapenade tar file I am using.<br>
<br>
Cheers,<br>
Jean-Michel<br>
<br>
On Sat, Dec 27, 2025 at 09:35:31PM +0000, Daniel Goldberg wrote:<br>
> Hi J-M --<br>
> <br>
> An update - I have tried the testing on my arm64 mac, and i DO see accurate TLM results with checkpoint69i.<br>
> <br>
> But.. i still have no luck on the ubuntu server i used. i also tried the TLM test on the ARCHER2 supercomputer login node, which runs suse enterprise linux. Still, inaccurate values.<br>
> <br>
> So i wonder if something about the architecture.. on every linux machine i have access to.. is causing this (meaning possibly a bug in tapenade in the way the generated code is running on linux architecture). So I find it strange if you are seeing accurate
values on baudelaire.. so please let me know the results of your investigation.<br>
> <br>
> best<br>
> dan<br>
> ________________________________<br>
> From: Daniel Goldberg <Dan.Goldberg@ed.ac.uk><br>
> Sent: Saturday, December 27, 2025 09:04<br>
> To: Jean-Michel Campin <jmc@mit.edu><br>
> Cc: jmc@mit.edu <jmc@mit.edu><br>
> Subject: Re: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution<br>
> <br>
> Thank you Jean Michel!<br>
> <br>
> If success for you I will try perhaps on an Amazon cloud machine.<br>
> <br>
> If you still have the 29 July tarball for tapenade btw and can put it somewhere available I can use that instead of the 18 December one.<br>
> <br>
> Best<br>
> Dan<br>
> <br>
> Get Outlook for iOS<<a href="https://aka.ms/o0ukef">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553223462%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=jqlKgfWeRzE1Cgr8o3bM%2B0%2BYTp2bxllUOvQwsVKVPIw%3D&reserved=0</a>><br>
> ________________________________<br>
> From: Jean-Michel Campin <jmc@mit.edu><br>
> Sent: Saturday, December 27, 2025 3:34:01 AM<br>
> To: Daniel Goldberg <Dan.Goldberg@ed.ac.uk><br>
> Cc: jmc@mit.edu <jmc@mit.edu><br>
> Subject: Re: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution<br>
> <br>
> Hi Dan,<br>
> <br>
> 2 things: First, I don't think it was an issue to have these post on mitgcm-devel list,<br>
> not that busy there anyway + not many subscriber, and an easy way to keep track of<br>
> where this is going.<br>
> And second, I will re-run the Tapenade TLM on baudelaire with MITgcm c69i tag,<br>
> and will put the details in folowing email.<br>
> <br>
> Cheers,<br>
> Jean-Michel<br>
> <br>
> On Fri, Dec 26, 2025 at 10:00:49PM +0000, Daniel Goldberg wrote:<br>
> > hi J-M --<br>
> ><br>
> > I didn't realise we were having that conversation on devel. i've taken us off that list.<br>
> ><br>
> > i've not had any better luck with trying 69i. I have checked it out and run the verification:<br>
> ><br>
> > ./testreport -t halfpipe_streamice/ -tap -tlm<br>
> ><br>
> > with tapenade. (Is this what you used??) It seems that I have been using a 10 april version of tapenade on the linux server i use. I have downloaded the most recent tarball, 18 december. Both versions with 69i give identical (and wrong) tangent linear values.<br>
> ><br>
> > i downloaded the tapenade source from 29 July, to match with you ? but for some reason i ran into errors trying to build it with gradlew. But, given that the 10 april and 18 december versions of tapenade lead to identical results, i have to believe that
the 29 July tapenade commit would as well.<br>
> ><br>
> > I understood from your email that not only were you running tests on baudelaire (and the streamice TLM was passing) up until november 21.. but when you received my query on 16 dec you re-ran with 69i and still got good results on baudelaire. Im a bit stuck
as i don't understand the TLM well and I do not have a correct starting point. I know what change to make and could simply create a branch that you could test on baudelaire.. but that is a lot of work and a long iterative process.<br>
> ><br>
> > Can i just confirm the testreport command above is what you used?<br>
> ><br>
> > Many many thanks<br>
> > Dan<br>
> > ________________________________<br>
> > From: MITgcm-devel <mitgcm-devel-bounces@mitgcm.org> on behalf of Daniel Goldberg <Dan.Goldberg@ed.ac.uk><br>
> > Sent: Tuesday, December 23, 2025 20:05<br>
> > To: Jean-Michel Campin <jmc@mit.edu><br>
> > Cc: mitgcm-devel@mitgcm.org <mitgcm-devel@mitgcm.org><br>
> > Subject: Re: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution<br>
> ><br>
> > Ok JM thanks for this. That means that for almost 2 months the experiment was running on Baudelaire with the 29 July tapenade version, which I think is what I have (and I will find out, I hadn?t realised the trace gives the tapenade date, that is useful).
So I will try testreport with 69i soon as I can..<br>
> ><br>
> > Best<br>
> > Dan<br>
> ><br>
> > Get Outlook for iOS<<a href="https://aka.ms/o0ukef">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553251690%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=jZKWhPq1o6cfLHBZqLDWTubPuqfg7y1gqGuh7VdnjZc%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553268077%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=GKGNYAuxV6MDjNppbdZyNNjbSa8lh6wuCtmDf0MiUJ0%3D&reserved=0</a>>><br>
> > ________________________________<br>
> > From: Jean-Michel Campin <jmc@mit.edu><br>
> > Sent: Tuesday, December 23, 2025 4:00:42 PM<br>
> > To: Daniel Goldberg <Dan.Goldberg@ed.ac.uk><br>
> > Cc: mitgcm-devel@mitgcm.org <mitgcm-devel@mitgcm.org><br>
> > Subject: Re: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution<br>
> ><br>
> > Hi Dan,<br>
> ><br>
> > The way I got Tapenade was to follow the instruction from MITgcm manual, section 7.6.5.,<br>
> > so I don't specify a specific commit.<br>
> > The tar file is always tapenade_3_16.tar but when I use it and the version change<br>
> > then it reports a different time, so I believe that:<br>
> > > > TangLin generated by Tapenade 3.16 (develop) - 29 Jul 2025<br>
> > does identify a particular tapenade version.<br>
> ><br>
> > And regarding the daily tests on baudelaire, it started on Aug 18, 2025, using tar file<br>
> > version from - 21 Mar 2023, and run this way until Sep 29, 2025.<br>
> > After that, starting on Sep 30, 2025, I switch to a newer version and I am still using<br>
> > the same version which is from - 29 Jul 2025.<br>
> ><br>
> > Cheers,<br>
> > Jean-Michel<br>
> ><br>
> > On Tue, Dec 23, 2025 at 02:29:09PM +0000, Daniel Goldberg wrote:<br>
> > > Hi Jean Michel<br>
> > ><br>
> > > I believe that the develop version is subject to change and the only way to be sure is to use a specific commit. I recall that you were checking PR 927 you needed to update your version of tapenade on Baudelaire, even though (I think) it remained at 3.16..
but I could be wrong.<br>
> > ><br>
> > > Nevertheless I will try testreport with the command below when I get a chance, with checkpoint 39i, and the tapenade version I used to test PR 927, and let you know what I see..<br>
> > ><br>
> > > Thanks<br>
> > > Dan<br>
> > ><br>
> > ><br>
> > ><br>
> > > Get Outlook for iOS<<a href="https://aka.ms/o0ukef">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553287081%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=wC9NAWonj6aqdajTCyT%2FKH%2Bcrbtxe8UYkG1bxtmQGGw%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553305288%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=A4V0y3QX3ShycvJG9HtWrdGxtNlwZ%2Fg1UgjisJbXpYA%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553320825%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=2iduffTJ3MYe2UJ%2FO0EcbLHwWrLGgxrf8JvNGJNmcK0%3D&reserved=0</a>>>><br>
> > > ________________________________<br>
> > > From: Jean-Michel Campin <jmc@mit.edu><br>
> > > Sent: Tuesday, December 23, 2025 2:02:27 PM<br>
> > > To: Daniel Goldberg <Dan.Goldberg@ed.ac.uk><br>
> > > Cc: jmc@mit.edu <jmc@mit.edu><br>
> > > Subject: Re: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution<br>
> > ><br>
> > > Hi Dan,<br>
> > ><br>
> > > The tapenade version is written in the summary.txt, and has not changed for these daily tests<br>
> > > (because, for practical reasons, I am not currently updating or downloading the latest one):<br>
> > > > TangLin generated by Tapenade 3.16 (develop) - 29 Jul 2025<br>
> > ><br>
> > > Cheers,<br>
> > > Jean-Michel<br>
> > ><br>
> > > On Tue, Dec 23, 2025 at 06:09:52AM +0000, Daniel Goldberg wrote:<br>
> > > > Hi j-m thanks. This is very strange, I could not reproduce this with a previous commit. I wonder if it has to do with the tapenade version.<br>
> > > ><br>
> > > > Did you just now run the test below with 69i, or are you looking at the logs? If this is in the logs, I?m just wondering if you are able to reproduce it now. I will try with 69i when I get a chance.<br>
> > > ><br>
> > > > The command, just to be sure, is<br>
> > > > ./testreport -t halfpipe_streamice -tap -tlm<br>
> > > > Correct?<br>
> > > ><br>
> > > > Thanks!<br>
> > > > Dan<br>
> > > ><br>
> > > > Get Outlook for iOS<<a href="https://aka.ms/o0ukef">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553336087%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=rdur7%2FhwTl0%2FseVlP%2FfcXyfVIrJVqIiKdv0UhS%2BJNSs%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553351136%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=cm7wZwWNbyLZRJcbS0WLlb%2FH7faEFhwEca1o1oLGcNg%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553366670%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=LDXnpDquYYgiFEOge6WtqI7i3hHHSLcdnpznkXdmBRI%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553381524%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=hBoAM91Y2%2F7H%2BAy3r1H5zq%2BU15kZPgcHPvvBxTTwoLM%3D&reserved=0</a>>>>><br>
> > > > ________________________________<br>
> > > > From: Jean-Michel Campin <jmc@mit.edu><br>
> > > > Sent: Monday, December 22, 2025 5:22 PM<br>
> > > > To: Daniel Goldberg <Dan.Goldberg@ed.ac.uk><br>
> > > > Subject: Re: Fw: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution<br>
> > > ><br>
> > > > Hi Dan,<br>
> > > ><br>
> > > > Before PR #927 got merged (on Nov 21), "halfpipe_streamice" TLM test with Tapenade was<br>
> > > > run every day on baudelaire, see the last one from Nov 21:<br>
> > > > <a href="http://mitgcm.org/testing/results/2025_11/tr_baudelaire_20251121_6/summary.txt">
https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmitgcm.org%2Ftesting%2Fresults%2F2025_11%2Ftr_baudelaire_20251121_6%2Fsummary.txt&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553396444%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=gB63pKWC6Asqqr7h%2BAWDutlphRly82%2FX%2FLc4U31H18A%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmitgcm.org%2Ftesting%2Fresults%2F2025_11%2Ftr_baudelaire_20251121_6%2Fsummary.txt&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553411555%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=PLMR3annxcubO2v9OurTNl7Bzkv%2FlC7uYhvdve3vQJs%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmitgcm.org%2Ftesting%2Fresults%2F2025_11%2Ftr_baudelaire_20251121_6%2Fsummary.txt&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553426761%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=604QWs2aWDLqfNJhJLewbOJC7EmsAMVjYzppsM71FFE%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmitgcm.org%2Ftesting%2Fresults%2F2025_11%2Ftr_baudelaire_20251121_6%2Fsummary.txt&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553443374%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=9Hfu2Km62%2FvjWqot9NneS3N1V8P6TWB22lumvHaHWNU%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmitgcm.org%2Ftesting%2Fresults%2F2025_11%2Ftr_baudelaire_20251121_6%2Fsummary.txt&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553458627%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=EUOggJuJInZTpnxxeIW3kIsDvVZ9ZxE43YY1OwkHwVg%3D&reserved=0></a><br>
> > > ><br>
> > > > To see what the grdchk looks like, I can go back do the last tag before Nov 21,<br>
> > > > which was checkpoint69i, done on Nov 14 (and no changes related to halfpipe_streamice<br>
> > > > between c69i and Nov 21):<br>
> > > > > git checkout checkpoint69i<br>
> > > > And what I get from the reference output (in halfpipe_streamice/results/) is:<br>
> > > > Tap-TL: grdchk summary : RMS of 4 ratios = 7.1444934467587E-06<br>
> > > > Tap-AD: grdchk summary : RMS of 4 ratios = 9.3393363837944E-06<br>
> > > > TAF-AD: grdchk summary : RMS of 4 ratios = 1.2875200645822E-05<br>
> > > > OAD-AD: grdchk summary : RMS of 4 ratios = 7.3161247348914E-06<br>
> > > ><br>
> > > > So the agreement was good for Tapenade TL.<br>
> > > ><br>
> > > > Now on the current master branch, the ref. "output_tap_tlm.txt" has been removed but<br>
> > > > from PR #927 discussion, it was reported that the grdchk RMS was 4.7, so much larger.<br>
> > > ><br>
> > > > Cheers,<br>
> > > > Jean-Michel<br>
> > > ><br>
> > > > On Tue, Dec 16, 2025 at 05:12:27PM +0000, Daniel Goldberg wrote:<br>
> > > > > hi J-M ? I am working on this right now because like you i was not happy about losing the TLM for streamice either.<br>
> > > > ><br>
> > > > > i am in the middle of trying several things including what i suggest below, but i am still not getting good answers.<br>
> > > > ><br>
> > > > > However, when i check out an old commit, i am still not able to see an accurate TLM. Im not sure if I ever did, though i cannot recall. You said that before my PR for tapenade/streamice was merged, you were able to see an accurate TLM test (i.e. the
grad-res errors were small). Do you remember which commit?<br>
> > > > ><br>
> > > > > Also are you still able to see accurate values with an old commit? Im worried it might be a change in the tapenade version!<br>
> > > > ><br>
> > > > > NB Im currently using 3a00e4dea944ee4a8c4a579882340f83925af1f0.<br>
> > > > ><br>
> > > > > Many thanks<br>
> > > > > Dan<br>
> > > > ><br>
> > > > > ________________________________<br>
> > > > > From: Daniel Goldberg <Dan.Goldberg@ed.ac.uk><br>
> > > > > Sent: Monday, December 15, 2025 09:51<br>
> > > > > To: MITgcm-devel@mitgcm.org <mitgcm-devel@mitgcm.org><br>
> > > > > Subject: Re: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution<br>
> > > > ><br>
> > > > > thanks martin, i think this is a reasonable idea then.<br>
> > > > ><br>
> > > > > from what i have seen, if tapenade is passed a subroutine, it does not care if there is a flow file entry or not. one difference is that the flow file for tapenade does not tell the tool which manual subroutines to use. one has to make sure they are
defined somewhere (e.g. stubs_tap_adj.F).<br>
> > > > ><br>
> > > > > thanks<br>
> > > > > dan<br>
> > > > > ________________________________<br>
> > > > > From: MITgcm-devel <mitgcm-devel-bounces@mitgcm.org> on behalf of Martin Losch <Martin.Losch@awi.de><br>
> > > > > Sent: Monday, December 15, 2025 13:54<br>
> > > > > To: MITgcm-devel <MITgcm-devel@mitgcm.org><br>
> > > > > Subject: Re: [MITgcm-devel] restoring tapenade-tangent linear for STREAMICE: proposed solution<br>
> > > > ><br>
> > > > > Hi Dan,<br>
> > > > ><br>
> > > > > there is a similar problem for verification/bottom_ctrl_5x5 where we test the manual AD routine of cg2d (cg2d_mad.F), which does not work for the TLM (there is none) and hence the TLM gradients are totally wrong. An optional model_tlm_diff.list could
be useful in this context, too. I am not sure how TAF handles that because when flow directives describing the interfact are given, then usually TAF ignores the corresponding files.<br>
> > > > ><br>
> > > > > Martin<br>
> > > > ><br>
> > > > > On 15. Dec 2025, at 13:46, Daniel Goldberg <Dan.Goldberg@ed.ac.uk> wrote:<br>
> > > > ><br>
> > > > > Dear J-M and all:<br>
> > > > ><br>
> > > > > Upon the merging of 927<<a href="https://github.com/MITgcm/MITgcm/pull/927">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMITgcm%2FMITgcm%2Fpull%2F927&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553473372%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=5Fkqw5XGe03IB4G45EjooIiy8tKJD8WbZJWRPWZH5PY%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMITgcm%2FMITgcm%2Fpull%2F927&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553488556%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=nU7R3TvqqgsUWYxBk2axeBTJKWvRFcnxO%2BCPFfHcH3s%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMITgcm%2FMITgcm%2Fpull%2F927&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553503876%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=GZa5ABa8M4GSjktwkyCJGjmm1DJ9sHCtjb77ysb81qU%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMITgcm%2FMITgcm%2Fpull%2F927&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553519345%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=M%2FPpNhtd2gNAJIVZRLmX5GNdlTaKLB7avkZETzWzbZs%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMITgcm%2FMITgcm%2Fpull%2F927&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553534765%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=xfLW0wTVL5iwou02440yViUrzu6%2BlAmZUOAJ58plNsw%3D&reserved=0</a>>>>>>(which
was a good thing!), the tangent linear test of STREAMICE under Tapenade no longer worked, whereas it seemed to be giving accurate values. I am writing this email to run a proposed solution by the team, rather than submitting a PR unannounced, to get a feel
for whether it would be welcomed, and looked at.<br>
> > > > ><br>
> > > > > The reason is that streamice_cg_solve.f is no longer passed to Tapenade, instead using a "manual" approach as with cg2d.f. This is necessary for large problems where the ad-generated adjoint code would be very slow and/or memory intensive and would
preclude external library solvers. These issues would not apply as much to the TLM ? but no "manual" solution exists.<br>
> > > > ><br>
> > > > > My idea for a solution, is to pass streamice_cg_solve.f through tapenade only when the TLM is compiled. I propose to do this by modifying genmake2 to look for "supplemental" files *_tlm_diff.list (in addition to *_ad_diff.list). A list of S/Rs called
$(TLM_FILES) (or something) will be created and passed as an argument to tapenade, only for the TLM call. The *_tlm_diff.list files (e.g. streamice_tlm_diff.list) files will be optional, and only need contain files that are passed to the TLM but not adjoint.
I think this is justified as in general the set of functions that the TLM can parse easily is larger than that of the adjoint.<br>
> > > > ><br>
> > > > > All the best<br>
> > > > > Dan<br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > > --<br>
> > > > > Daniel Goldberg, PhD (he/him)<br>
> > > > > Reader in Glaciology<br>
> > > > > School of Geosciences, University of Edinburgh<br>
> > > > > Geography Building, Drummond Street, Edinburgh EH8 9XP<br>
> > > > > <a href="https://dngoldberg.github.io/">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdngoldberg.github.io%2F&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553550149%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=HCl%2FrgzSgIyRLzxAekNzfrfo4kJR5yEIz%2FPUapUMlq4%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdngoldberg.github.io%2F&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553565403%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=FS6zVhmPyaUR3UpIIde2HepysC3t8JeilcEhdVNDL%2B0%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdngoldberg.github.io%2F&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553580777%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=95pctiJYtsFFee%2FNS%2BHnVaJ9r1IynfgjddJB%2BpvZG1o%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdngoldberg.github.io%2F&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553597144%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=C8APnx1jxyPiQH26jUxWC4VxHulPS6s0119%2FJJqTGfo%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdngoldberg.github.io%2F&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553612724%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=D9LFI%2BgnCd9z0wqjwOf0L5N5mRelQWIpIrRA2uRprmA%3D&reserved=0></a><br>
> > > > > 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. _______________________________________________<br>
> > > > > MITgcm-devel mailing list<br>
> > > > > MITgcm-devel@mitgcm.org<mailto:MITgcm-devel@mitgcm.org><br>
> > > > > <a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel">https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-devel&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553628003%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=I9qdWZM966gpGt1Qx7QyRy%2Bn%2BdfKmG0l3JEG6%2BJZpso%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-devel&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553643461%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=CKqrfSTaRrU4GhqYuDnFSkbfxyJrshwA%2B6lscVjahK0%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-devel&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553658897%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=TBBPnXsGgnG%2BDo4U2J84wjpa8ZfjUIgGhRYCztUtRhU%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-devel&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553674193%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=nqdUttwetycvgZvOWosYGl9K9y%2B%2BZm8k7TPD4JnWWPg%3D&reserved=0><https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-devel&data=05%7C02%7C%7C61e2fe3dafe3407324d508de45a58f5a%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C639024774553689319%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=4vH2AtZ%2FKUt2s6u48Gz7zKNTN7uRgh0joR4E7o3tDbE%3D&reserved=0></a><br>
> > > > ><br>
</div>
</span></font></div>
</body>
</html>