[MITgcm-support] Custom CPP_OPTIONS.h ignored

Yuxin Zhou yzhou at ldeo.columbia.edu
Mon Jul 12 14:36:37 EDT 2021


Hi Martin,
After reading the Makefile, I realized that "make clean" and "make CLEAN"
are different things. "make CLEAN" did the trick!

Thanks,
Yuxin

On Mon, Jul 12, 2021 at 12:47 PM Martin Losch <Martin.Losch at awi.de> wrote:

> Try "make CLEAN" before “make depend”, to remove old links. After "make
> depend” this command:
> ls -l CPP_OPTIONS.h
> should give you
> ….. CPP_OPTIONS.h —> ../code/CPP_OPTIONS.h
>
> M
>
> > On 12. Jul 2021, at 18:00, Yuxin Zhou <yzhou at ldeo.columbia.edu> wrote:
> >
> > Hi Martin,
> > Thanks for the response. After I put the customized CPP_OPTIONS.h into
> "code", I do the following:
> > ../../../tools/genmake2 -mods ../code -omp -optfile
> ../../../tools/build_options/darwin_amd64_gfortran
> > make depend
> > make
> > cd ../run
> > run % ln -sf ../input/* .
> > run % ln -sf ../build/mitgcmuv .
> > ./mitgcmuv
> >
> > And then I get the error message.
> >
> > Best,
> > Yuxin
> >
> > On Mon, Jul 12, 2021 at 4:26 AM Martin Losch <Martin.Losch at awi.de>
> wrote:
> > Hi Yuxin,
> >
> > can you report your exact sequence of commands, after putting the
> customized CPP_OPTIONS.h file into “code”, to arrive at the error message?
> > It’s important that you rerun “genmake2” (or more conveniently run "make
> makefile”, which reruns genmake2 with the same options as the first time)
> ***after*** moving files around.
> >
> > Martin
> >
> > > On 12. Jul 2021, at 07:16, Yuxin Zhou <yzhou at ldeo.columbia.edu> wrote:
> > >
> > > Hi all,
> > > I'm trying to run "tutorial_global_oce_latlon" with a custom
> CPP_OPTIONS.h in ./code, so that I can enable the "NONLIN_FRSURF" flag.
> However, genmake2 seems to have ignored the new CPP_OPTIONS.h file, as I
> still get the following error:
> > >
> > > (TID 0001) CONFIG_CHECK: #undef NONLIN_FRSURF and
> > > (TID 0001) CONFIG_CHECK: nonlinFreeSurf is non-zero
> > > (TID 0001) CONFIG_CHECK: rStar is part of NonLin-FS
> > > (TID 0001) CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it
> > > (TID 0001) CONFIG_CHECK: detected  2 fatal error(s)
> > > (TID 0001) S/R ALL_PROC_DIE: ending the run
> > > STOP ABNORMAL END: S/R CONFIG_CHECK
> > >
> > > In fact, I tried writing gibberish in my CPP_OPTIONS.h file and
> genmake2 didn't complain as I thought it should. Any idea as to why this
> happens? Here is the full content of my CPP_OPTIONS.h:
> > >
> > > #ifndef CPP_OPTIONS_H
> > > #define CPP_OPTIONS_H
> > >
> > > C CPP flags controlling particular source code features
> > >
> > > C o Allow the use of Non-Linear Free-Surface formulation
> > > C   this implies that surface thickness (hFactors) vary with time
> > > #define NONLIN_FRSURF
> > >
> > > C o Execution environment support options
> > > #include "CPP_EEOPTIONS.h"
> > >
> > > #endif /* CPP_OPTIONS_H */
> > >
> > > Many thanks,
> > > Yuxin
> > > --
> > > Yuxin Zhou
> > > https://www.ldeo.columbia.edu/~yzhou/
> > > _______________________________________________
> > > MITgcm-support mailing list
> > > MITgcm-support at mitgcm.org
> > > http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
> >
> > _______________________________________________
> > MITgcm-support mailing list
> > MITgcm-support at mitgcm.org
> > http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
> >
> >
> > --
> > Yuxin Zhou
> > https://www.ldeo.columbia.edu/~yzhou/
> > _______________________________________________
> > MITgcm-support mailing list
> > MITgcm-support at mitgcm.org
> > http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>


-- 
Yuxin Zhou
https://www.ldeo.columbia.edu/~yzhou/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20210712/f353561d/attachment-0001.html>


More information about the MITgcm-support mailing list