<div dir="ltr">Hi Laurent and Haoran,<div><br></div><div>Good news from my side - on the pcluster we are using for ECCO Hackweek, the glibc is outdated and I am able to use the new FortranParser tarball to compile fortranParser specifically for this system and run it with the program.f file that Laurent shared. Furthermore, I am able to differentiate the MITgcm with Tapenade and get the correct derivatives as expected.</div><div><br></div><div>Best,</div><div>Shreyas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 16, 2024 at 6:09 AM Haoran Xu <<a href="mailto:xu1jian2wei3@163.com">xu1jian2wei3@163.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Laurent,<br><br>I will test it and get back to you later.<br><br>Haoran<br><br><br>

    

<div>
<div style="padding-top:1px;padding-bottom:1px">
    <div style="margin-top:20px;margin-bottom:12px;font-size:14px;line-height:1.25;color:rgb(137,137,140)">---- Replied Message ----</div>
    <div style="margin-bottom:12px;font-size:13px;line-height:1.25;color:rgb(44,44,46);padding:2px;border-radius:8px;background-color:rgb(240,240,240)">
        <table width="100%" cellpadding="0" cellspacing="10" border="0">
            <tbody><tr>
                <td valign="top" style="width:4em;font-size:13px;line-height:1.25;color:rgb(137,137,140);white-space:nowrap">From</td>
                <td valign="top" style="font-size:13px;line-height:1.25;color:rgb(44,44,46);word-break:break-all"><a style="color:rgb(28,131,235);text-decoration:none" href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">Shreyas Suni Gaikwad<shreyas.gaikwad@utexas.edu></a></td>
            </tr>
            <tr>
                <td valign="top" style="width:4em;font-size:13px;line-height:1.25;color:rgb(137,137,140);white-space:nowrap">Date</td>
                <td valign="top" style="font-size:13px;line-height:1.25;color:rgb(44,44,46);word-break:break-all">10/14/2024 23:55</td>
            </tr>
            <tr>
                <td valign="top" style="width:4em;font-size:13px;line-height:1.25;color:rgb(137,137,140)">To</td>
                <td valign="top" style="font-size:13px;line-height:1.25;color:rgb(44,44,46);word-break:break-all"><a style="color:rgb(28,131,235);text-decoration:none" href="mailto:Laurent.Hascoet@inria.fr" target="_blank">Laurent Hascoet<Laurent.Hascoet@inria.fr></a></td>
            </tr>
            <tr>
                <td valign="top" style="width:4em;font-size:13px;line-height:1.25;color:rgb(137,137,140)">Cc</td>
                <td valign="top" style="font-size:13px;line-height:1.25;color:rgb(44,44,46);word-break:break-all"><a style="color:rgb(28,131,235);text-decoration:none" href="mailto:xu1jian2wei3@163.com" target="_blank">Haoran Xu<xu1jian2wei3@163.com></a></td>
            </tr>
            <tr>
                <td valign="top" style="width:4em;font-size:13px;line-height:1.25;color:rgb(137,137,140)">Subject</td>
                <td valign="top" style="font-size:13px;line-height:1.25;color:rgb(44,44,46);word-break:break-all">Re: Fwd: Re: Compiling Problems with Tapenade</td>
            </tr>
        </tbody></table>
    </div>
    <div><div dir="ltr">Hi Laurent and Haoran,<br><div><br></div><div>I am at ECCO Hackweek (<a href="https://ecco-hackweek.github.io/ecco-2024/" target="_blank">https://ecco-hackweek.github.io/ecco-2024/</a>) this week, and we are using a system with glibc 2.31 and Tapenade needs glibc 2.34. This is also a great opportunity for me to contribute to this testing. I will also try this out as soon as I log in.</div><div><br></div><div>Best,</div><div>Shreyas </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 14, 2024 at 8:47 AM Laurent Hascoet <<a href="mailto:Laurent.Hascoet@inria.fr" target="_blank">Laurent.Hascoet@inria.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Haoran,<br>
<br>
It seems the Fortran parser of Tapenade did not compile well on your <br>
system. My suggestion is that we re-compile it from scratch on your <br>
system, as follows:<br>
<br>
Take and untar the attached FortranParserSources.tar<br>
<br>
The compilation script process is described in file <br>
FortranParserSources/compile<br>
<br>
Of course, you need to adapt the compilation command ($CC) to your system.<br>
I am not certain about the option -Dlinux:<br>
if you are not under linux, then maybe you should remove this -Dlinux, <br>
but I must admit I have little experience on other systems.<br>
<br>
On my system, all these compilation commands issue no message at all, no <br>
error, no warning...<br>
<br>
At the end of compilation, you should obtain the final parser in <br>
Gen/fortranParser.<br>
To test it, type for instance (using the same small file fortran.f that <br>
I sent on October 7):<br>
<br>
Gen/fortranParser program.f<br>
<br>
This should print a long sequence of numbers and strings, finishing in:<br>
<br>
...<br>
7<br>
line<br>
106<br>
16<br>
98<br>
y<br>
142<br>
67<br>
67<br>
<br>
If it doesn't, then you may want to run it again as:<br>
<br>
Gen/fortranParser program.f -debug<br>
<br>
and send me the log...<br>
<br>
--Laurent<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 10/8/24 5:57 PM, Shreyas Suni Gaikwad wrote:<br>
> Thanks, Haoran! I have CC'ed Laurent here so that he can help us.<br>
> <br>
> Best,<br>
> Shreyas<br>
> <br>
> On Tue, Oct 8, 2024 at 4:32 AM Haoran Xu <<a href="mailto:xu1jian2wei3@163.com" target="_blank">xu1jian2wei3@163.com</a> <br>
> <mailto:<a href="mailto:xu1jian2wei3@163.com" target="_blank">xu1jian2wei3@163.com</a>>> wrote:<br>
> <br>
>     Hi Shreyas,<br>
> <br>
> <br>
>     Here are the results of the command run:<br>
> <br>
> <br>
>     @@ TAPENADE_HOME=/lustre/home/dutao/perl5/quin/tapenade_3.16/bin/..<br>
> <br>
>     System: Not a tree operator: top in program.f<br>
> <br>
>     Command: No root unit to differentiate<br>
> <br>
>     File: The code provided does not contain a top procedure<br>
> <br>
>     @@ Created ./program_d.msg<br>
> <br>
> <br>
>     The results are the same as the "helloworld"  test. Any advice please?<br>
> <br>
>     Thanks,<br>
>     Haoran<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
>     At 2024-10-08 06:01:54, "Shreyas Suni Gaikwad"<br>
>     <<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a> <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a>>> wrote:<br>
> <br>
>         Hi Haoran,<br>
> <br>
>         Can you try to run the following command on your terminal with<br>
>         this attached file, shared by Laurent? We are trying to get a<br>
>         minimum example of what's not working.<br>
> <br>
>         tapenade program.f<br>
> <br>
>         Thanks,<br>
>         Shreyas<br>
> <br>
>         On Wed, Oct 2, 2024 at 12:03 PM Laurent Hascoet<br>
>         <<a href="mailto:Laurent.Hascoet@inria.fr" target="_blank">Laurent.Hascoet@inria.fr</a> <mailto:<a href="mailto:Laurent.Hascoet@inria.fr" target="_blank">Laurent.Hascoet@inria.fr</a>>> wrote:<br>
> <br>
>             Hi Sheyas, Hi Haoran<br>
> <br>
>             It seems the problem here is that the fortran parser did not<br>
>             succeed in<br>
>             parsing *any* of the files provided.<br>
>             For each file, I see a<br>
>             System: Not a tree operator: <some text> in <filename><br>
> <br>
>             For the few files that I checked, the <some text> is often<br>
>             the contents<br>
>             of a comment which is very close to the file start (possibly<br>
>             the first<br>
>             line?)<br>
> <br>
>             Which makes me think that the fortranParserRun.sh crashes<br>
>             very early...<br>
> <br>
>             It would be interesting to test your installed tapenade on a<br>
>             small<br>
>             "hello world" Fortran file?<br>
> <br>
>             --Laurent<br>
> <br>
>             On 10/2/24 6:09 PM, Shreyas Suni Gaikwad wrote:<br>
>              > Hi Haoran,<br>
>              ><br>
>              > CC'ing Laurent (developer of Tapenade) here. Can you use<br>
>             this genmake2<br>
>              > log to resolve the issue, Laurent? Also, please add<br>
>              > <a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a><br>
>             <mailto:<a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a>><br>
>             <mailto:<a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a><br>
>             <mailto:<a href="mailto:mitgcm-support@mitgcm.org" target="_blank">mitgcm-support@mitgcm.org</a>>> in your<br>
>              > send and CC both Laurent and me when you reply in the<br>
>             future, so we have<br>
>              > a record of this conversation on the mailing list. :)<br>
>              ><br>
>              > Thanks,<br>
>              > Shreyas<br>
>              ><br>
>              > ---------- Forwarded message ---------<br>
>              > From: *Haoran Xu* <<a href="mailto:xu1jian2wei3@163.com" target="_blank">xu1jian2wei3@163.com</a><br>
>             <mailto:<a href="mailto:xu1jian2wei3@163.com" target="_blank">xu1jian2wei3@163.com</a>> <mailto:<a href="mailto:xu1jian2wei3@163.com" target="_blank">xu1jian2wei3@163.com</a><br>
>             <mailto:<a href="mailto:xu1jian2wei3@163.com" target="_blank">xu1jian2wei3@163.com</a>>>><br>
>              > Date: Tue, Oct 1, 2024 at 8:29 PM<br>
>              > Subject: Re:Re: Compiling Problems with Tapenade<br>
>              > To: Shreyas Suni Gaikwad <<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a><br>
>             <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a>><br>
>              > <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a><br>
>             <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a>>>><br>
>              ><br>
>              ><br>
>              > Thanks Shreyas,<br>
>              ><br>
>              > I attach the new complied file. Please check.<br>
>              ><br>
>              > Haoran<br>
>              ><br>
>              ><br>
>              ><br>
>              ><br>
>              ><br>
>              > 在 2024-10-02 07:13:52,"Shreyas Suni Gaikwad"<br>
>              > <<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a><br>
>             <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a>><br>
>             <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a><br>
>             <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a>>>> 写道:<br>
>              ><br>
>              >     Hi Haoran,<br>
>              ><br>
>              >     Please let us know if you can run with the new<br>
>             genmake2 and get a<br>
>              >     more detailed log of the issue.<br>
>              ><br>
>              >     Thanks,<br>
>              >     Shreyas<br>
>              ><br>
>              >     On Mon, Sep 30, 2024 at 10:06 AM Shreyas Suni Gaikwad<br>
>              >     <<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a><br>
>             <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a>><br>
>             <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a><br>
>             <mailto:<a href="mailto:shreyas.gaikwad@utexas.edu" target="_blank">shreyas.gaikwad@utexas.edu</a>>>> wrote:<br>
>              ><br>
>              >         Hi Haoran,<br>
>              ><br>
>              >         I should have been clearer. Apologies. The flags<br>
>             have to be<br>
>              >         added inside genmake2 to the Tapenade<br>
>             differentiation command. I<br>
>              >         have modified genmake2 with the required changes.<br>
>             Please use<br>
>              >         this genmake2 and share your output with us.<br>
>              ><br>
>              >         Best,<br>
>              >         Shreyas<br>
>              ><br>
>              >         --<br>
>              >         ____________________________________________________<br>
>              >         Shreyas Sunil Gaikwad,<br>
>              >         Graduate Research Assistant (CRIOS<br>
>              >         <<a href="https://crios-ut.github.io/" rel="noreferrer" target="_blank">https://crios-ut.github.io/</a><br>
>             <<a href="https://crios-ut.github.io/" rel="noreferrer" target="_blank">https://crios-ut.github.io/</a>>>) | Senior Advisor (SIAM-UT<br>
>              >         <<a href="https://siam.oden.utexas.edu/" rel="noreferrer" target="_blank">https://siam.oden.utexas.edu/</a><br>
>             <<a href="https://siam.oden.utexas.edu/" rel="noreferrer" target="_blank">https://siam.oden.utexas.edu/</a>>>),<br>
>              >         Oden Institute for Computational Engineering and<br>
>             Sciences,<br>
>              >         The University of Texas at Austin<br>
>              > <a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">shreyas911.github.io</a> <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a>><br>
>             <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a> <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a>>><br>
>             | (925)-336-5931<br>
>              ><br>
>              ><br>
>              ><br>
>              >     --<br>
>              >     ____________________________________________________<br>
>              >     Shreyas Sunil Gaikwad,<br>
>              >     Graduate Research Assistant (CRIOS<br>
>             <<a href="https://crios-ut.github.io/" rel="noreferrer" target="_blank">https://crios-ut.github.io/</a> <<a href="https://crios-ut.github.io/" rel="noreferrer" target="_blank">https://crios-ut.github.io/</a>>>) |<br>
>              >     Senior Advisor (SIAM-UT<br>
>             <<a href="https://siam.oden.utexas.edu/" rel="noreferrer" target="_blank">https://siam.oden.utexas.edu/</a><br>
>             <<a href="https://siam.oden.utexas.edu/" rel="noreferrer" target="_blank">https://siam.oden.utexas.edu/</a>>>),<br>
>              >     Oden Institute for Computational Engineering and<br>
>             Sciences,<br>
>              >     The University of Texas at Austin<br>
>              > <a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">shreyas911.github.io</a> <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a>><br>
>             <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a> <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a>>><br>
>             | (925)-336-5931<br>
>              ><br>
>              ><br>
>              ><br>
>              > --<br>
>              > ____________________________________________________<br>
>              > Shreyas Sunil Gaikwad,<br>
>              > Graduate Research Assistant (CRIOS<br>
>             <<a href="https://crios-ut.github.io/" rel="noreferrer" target="_blank">https://crios-ut.github.io/</a> <<a href="https://crios-ut.github.io/" rel="noreferrer" target="_blank">https://crios-ut.github.io/</a>>>) |<br>
>              > Senior Advisor (SIAM-UT <<a href="https://siam.oden.utexas.edu/" rel="noreferrer" target="_blank">https://siam.oden.utexas.edu/</a><br>
>             <<a href="https://siam.oden.utexas.edu/" rel="noreferrer" target="_blank">https://siam.oden.utexas.edu/</a>>>),<br>
>              > Oden Institute for Computational Engineering and Sciences,<br>
>              > The University of Texas at Austin<br>
>              > <a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">shreyas911.github.io</a> <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a>><br>
>             <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a> <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a>>><br>
>             | (925)-336-5931<br>
> <br>
> <br>
> <br>
>         -- <br>
>         ____________________________________________________<br>
>         Shreyas Sunil Gaikwad,<br>
>         Graduate Research Assistant (CRIOS<br>
>         <<a href="https://crios-ut.github.io/" rel="noreferrer" target="_blank">https://crios-ut.github.io/</a>>) | Senior Advisor (SIAM-UT<br>
>         <<a href="https://siam.oden.utexas.edu/" rel="noreferrer" target="_blank">https://siam.oden.utexas.edu/</a>>),<br>
>         Oden Institute for Computational Engineering and Sciences,<br>
>         The University of Texas at Austin<br>
>         <a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">shreyas911.github.io</a> <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a>> | (925)-336-5931<br>
> <br>
> <br>
> <br>
> -- <br>
> ____________________________________________________<br>
> Shreyas Sunil Gaikwad,<br>
> Graduate Research Assistant (CRIOS <<a href="https://crios-ut.github.io/" rel="noreferrer" target="_blank">https://crios-ut.github.io/</a>>) | <br>
> Senior Advisor (SIAM-UT <<a href="https://siam.oden.utexas.edu/" rel="noreferrer" target="_blank">https://siam.oden.utexas.edu/</a>>),<br>
> Oden Institute for Computational Engineering and Sciences,<br>
> The University of Texas at Austin<br>
> <a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">shreyas911.github.io</a> <<a href="http://shreyas911.github.io" rel="noreferrer" target="_blank">http://shreyas911.github.io</a>> | (925)-336-5931<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr">____________________________________________________</div><div dir="ltr">Shreyas Sunil Gaikwad,</div><div dir="ltr">Graduate Research Assistant (<a href="https://crios-ut.github.io/" target="_blank">CRIOS</a>) | Senior Advisor (<a href="https://siam.oden.utexas.edu/" target="_blank">SIAM-UT</a>),</div><div dir="ltr"><div dir="ltr">Oden Institute for Computational Engineering and Sciences,</div><div dir="ltr">The University of Texas at Austin</div></div><div dir="ltr"><div><a href="http://shreyas911.github.io" target="_blank">shreyas911.github.io</a> | (925)-336-5931</div></div></div></div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr">____________________________________________________</div><div dir="ltr">Shreyas Sunil Gaikwad,</div><div dir="ltr">Graduate Research Assistant (<a href="https://crios-ut.github.io/" target="_blank">CRIOS</a>) | Senior Advisor (<a href="https://siam.oden.utexas.edu/" target="_blank">SIAM-UT</a>),</div><div dir="ltr"><div dir="ltr">Oden Institute for Computational Engineering and Sciences,</div><div dir="ltr">The University of Texas at Austin</div></div><div dir="ltr"><div><a href="http://shreyas911.github.io" target="_blank">shreyas911.github.io</a> | (925)-336-5931</div></div></div></div>