[MITgcm-devel] bug with #undef SEAICE_ALLOW_DYNAMICS and JFNK
Jean-Michel Campin
jmc at ocean.mit.edu
Wed Mar 27 19:06:38 EDT 2013
Hi Martin and Torge,
I think the simpler (and less prone to error/mistake)
is to always compile seaice_fgmres.F as soon as
SEAICE_ALLOW_JFNK is defined.
If one wants to exclude the compilation of this file
when SEAICE_ALLOW_DYNAMCIS is #undef, then we can come up with
something in the default SEAICE_OPTIONS.h
I also think that it's a general rule: if we can avoid complicated
logic with CPP options in the source code, it's safer.
And moving these conditional setting into the corresponding
{PKG}_OPTIONS.h makes it more clear (instead of having to search
through all the files).
Cheers,
Jean-Michel
On Wed, Mar 27, 2013 at 02:44:07PM -0700, Torge Martin wrote:
> Hi,
>
> while compiling my 1-D ITD test scenario on acesgrid I ran into the
> following error:
>
> in SEAICE_OPTIONS
> I disabled SEAICE_ALLOW_DYNAMCIS (since I am only running a 1-D scenario)
> but I kept SEAICE_CGRID enabled (because this is the default setting)
> which then by default also enables SEAICE_ALLOW_JFNK.
>
> However, all three of these must be enabled so that routine
> SEAICE_MAP_RS2VEC is included from seaice_fgmres.F.
> If I disable dynamics (but have JFNK enabled) SEAICE_MAP_RS2VEC is called
> in SEAICE_INIT_VARIA although it was not included due to the preprocessor
> option setting.
>
> I guess I have unintentionally created an unlikely scenario but this should
> be caught somewhere.
>
> Thanks,
> Torge
More information about the MITgcm-devel
mailing list