[MITgcm-devel] genmake2 problem

Patrick Heimbach heimbach at MIT.EDU
Thu Apr 6 16:53:09 EDT 2006


Hi Ed,

it's not too urgent, and I already did your suggestion #2
to temporarily disable the genmake2 exit.
We can see in a couple of weeks.

The issue arises for some legacy code that I'm hoping
to merge with the MITgcm
(for example, that code uses ALLOW_BULKFORMULA in many places
and interferes with ALLOW_BULKF package).

So hopefully we won't run into this issue very often.

Cheers
-p.



Option #1 seems a bit un-robust to me.
Quoting Ed Hill <ed at eh3.com>:

> On Thu, 2006-04-06 at 10:58 -0400, Patrick Heimbach wrote:
>>
>> there's a sublte problem with genmake2.
>> We now ommit #define of packages in CPP_OPTIONS.h
>> which is good.
>> However, a funny thing happens when you have
>> a CPP flag that's very similar to a package name,
>> but is not a package name.
>> For example,  if you add the flag
>> #define ALLOW_SEAICEFFF
>> in lab_sea/code/CPP_OPTIONS.h
>> genmake2 will choke
>>
>> Error: In ../code/CPP_OPTIONS.h there is an illegal line: #define
>> ALLOW_SEAICEFFF
>
>
> Hi Patrick,
>
> I can think of at least three ways to fix that and here they are (in my
> opinion) ordered from best to worst:
>
> 1) we all agree to use flags of the form ALLOW_${PKG_NAME}
>    only for packages -- or perhaps some other pattern such
>    as ENABLE_${PKG_NAME}
>
> 2) within genmake2, turn off the bit of code that tries to
>    dis-allow the manual setting of packages with #define
>    statements
>
> 3) I write a bit of code that is smart enough to enumerate
>    all the package names so that non-package ALLOW_* flags
>    won't get flagged as being an error -- and keep the
>    now-smarter error checking code [but I think this is a
>    really silly and fragile way to do things]
>
> So, which approach do you and others want to use?
>
> Ed
>
> --
> Edward H. Hill III, PhD
> office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
>             Cambridge, MA 02139-4307
> emails:  eh3 at mit.edu                ed at eh3.com
> URLs:    http://web.mit.edu/eh3/    http://eh3.com/
> phone:   617-253-0098
> fax:     617-253-4464
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>



--------------------------------------------------------
Patrick Heimbach   Massachusetts Institute of Technology
FON: +1/617/253-5259                  EAPS, Room 54-1518
FAX: +1/617/253-4464             77 Massachusetts Avenue
mailto:heimbach at mit.edu               Cambridge MA 02139
http://www.mit.edu/~heimbach/                        USA




More information about the MITgcm-devel mailing list