[MITgcm-support] Compiling Problems with Tapenade

Shreyas Suni Gaikwad shreyas.gaikwad at utexas.edu
Wed Oct 16 19:11:07 EDT 2024


Hi Laurent and Haoran,

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.

Best,
Shreyas

On Wed, Oct 16, 2024 at 6:09 AM Haoran Xu <xu1jian2wei3 at 163.com> wrote:

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


-- 
____________________________________________________
Shreyas Sunil Gaikwad,
Graduate Research Assistant (CRIOS <https://crios-ut.github.io/>) | Senior
Advisor (SIAM-UT <https://siam.oden.utexas.edu/>),
Oden Institute for Computational Engineering and Sciences,
The University of Texas at Austin
shreyas911.github.io | (925)-336-5931
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20241016/abb58e90/attachment-0001.html>


More information about the MITgcm-support mailing list