replace (4 times)
make genmake_tc_1.o >> genmake_warnings 2>&1
with
COMM="$CC $CFLAGS -c genmake_tc_1.c"
echo $COMM >> genmake_warnings
$COMM >> genmake_warnings 2>&1
to make genmake2 always see the value of CC as specified in the
optfile. This change may break testreport or building the code on some
platforms where the default value of CC does not point to anything
useful. In that case, setting CC will fix the problem.

per Jean-Michel's request, this genmake2 contains an extra shell
variable FEXTRAFLAGS to be set in your build options file. FEXTRAFLAGS
is empty by default and can be used to pass flags to the fortran
compiler at build time of the "mitgcmuv" that would break most of the
neat tests in genmake2, particularly the flags of the sxf90 that are
required for inlining where I need to specify filenames of files where
it is supposed to look for the routines to be inlined (example in
SUPER-UX_SX8_sxf90+mpi_awi). This is a risky flag, not very general
but solves my immediate problem, until we find something better

o add "--embed-source" option to genmake2 which, when the supporting
tools can be compiled (as determined by genmake2) will turn on the
embed_files package which then embeds the entire MITgcm source code
(*.[fFhc] + Makefile) used for the build within the executable
- requested by CNH but off by default
- adds a paltry <9MB to the mitgcmuv executable in most cases
- only writes the output when useEMBEDSRC in eedata is true

Added support for enabling timing per timestep (-ts), PAPI MFlop/s per
timestep (-papis), variations of the above for TAF (add a "-foolad"),
PAPI (-papi) or HPMT (-hpmt) performance monitoring per timed section and
support for runtime floating point environment modification (-gsl). No
tests for establishing the locations of these libraries are provided.
Also added hooks for automatic trick to create the MPI header directory
for DIVA and patch mpif.h on AIX systems.

o add a signal handler so that a user can run "killall mitgcmuv"
and the model will, at the end of the current iteration, write out
all the normal checkpoint files and gracefully stop
- off by default so its very unlikely to hurt anything
- TODO: can be extended with an MPI global sum that will
allow it to work the same way in an MPI environment

o In response to JMC's bug report, genmake2 now ignores any soft-links
that it finds in the *current* directory when searching for files.
Soft-links found in any other source directories will still work as
they did before. And regular (non-soft-link) files will also work as
before.

o add HAVE_SETRLSTK define and useSETRLSTK flag (eedata) which calls
a C routine to unlimit the stack size
- very helpful on clusters of workstations since the ulimit/limit
behavior can (otherwise) only be inherited from parent processes
which is difficult with some MPI-over-ssh/rsh implementations

o fix for Ed's fix to genmake2:
- moved "RV1=$?" two lines up, so that it reports the status of the
'makedepend genmake_tc.f' line and not the 'test -f
$MAKEFILE".tst" && mv -f $MAKEFILE".tst" $MAKEFILE' line. Let's
hope that this was unintentional.

o give MNC the ability to create additional files rather than
exceeding a specified file size limit
- run-time configurable (in data.mnc) as "MNC_MAX_FSIZE"
- the default is just less than 2GB which is a practical limit
on many systems (eg. Baylor's and Helen's recent problems)
- tested and works on Linux/g77 -- needs testing elsewhere

o disable the mnc package if the test compile fails
- also remove the Nnetcdf test execution since some machines (eg.
the Itanium-hosted SX-6 that PH uses) are cross-compilers that
will _always_ fail to execute the non-native code

o MITgcm now builds and runs on cygwin
- Note that there is still a problem due to directories in
verification named "aux". Apparently, windows is such
broken crap that that you cannot use "aux" as a file or
dir name. In the mean time, check out the code using:
cvs co MITgcm_verif_basic
and you can avoid those directories.

o expand_pkg_groups now returns a state indicating whether it did an
expansion or not
o expand_pkg_groups is called repeatedly until all expansions are complete
o implemented -pkg in packages.conf (thought we were already doing this but
it didn't seem to be there)

o fixes for baroque-n CRAY systems
- replace all "echo -n" commands with the more portable "printf"
- add a "-bash /path/to/shell" option so that a Bourne- or
BASH-compatible shell can be explicitly specified within
the Makefile

o fixed -fc=* so that an appropriate optfile is used if it exists
o created place-holders for -mpi and -mpi=PATH functionality for when
the automatic MPI configuration is written
o -mpi now turns on MPI cpp flags
x these are still present in the optfiles and should be removed from them
but I'm deferring that until we tidy up the optfiles

o add automatic "discovery" of the -lnetcdf library
- Note that this will work if the NetCDF files are installed in
standard locations such as /usr/lib or /usr/local/lib. If the
NetCDF files are installed in a non-standard location, then the
user will have to specify the path ("-L /path/to/the/lib")
within the optfile.

o new version of MNC "internals" with per-file association of all
entities
o first version with NetCDF read support
o fixed the cleanup of internal lookup tables at file closure
o numerous small bug fixes

o Created mechanism for make makefile to use $TOOLSDIR variable of Makefile
- previously it recorded the actual invocation of genmake2 which meant
that editing TOOLSDIR was not sufficient to be able to move the set-up
o In addition to everything else, we now record the pkg configuration in
the Makefile
- previously the configuration was only recorded in PACKAGES_CONFIG.h
and gm_state
o Created targets for Makefile:
PACKAGES_CONFIG.h: this allows "make" to create the pkg config file
given the configuration state that is now recorded
in Makefile
AD_CONFIG.h: creates the appropriate null adj config file for
compiling the forward model
o The switching of AD_CONFIG.h is unchanged but the files used for comparison
of the state are now created only briefly by make and only for the duration
of the comparison
- previously these files were left in place and an inadvertent deletion
required a new invocation of genmake2
o Added new "generic" script for converting cmd-line cpp options to cpp
statements in a file
o Created a file in tools/adjoint_sed containing the sed commands needed
to patch back myThid in adjoint code. This file used to be created in
the CWD by genmake2
Comments:
o genmake2, make now works without the make depend phase
- this is necessary (and was an old feature) for occasions when makedepend
is not available and xmakedepend doesn't work or is too slow to be useful
o make clean now deletes all temporary files (except FC_NAMEMANGLE.h) so
that make CLEAN only leaves the Makefile and the Makefile now contains
sufficient information to rebuild everything. This was a capability of
the old genmake.

o add various compilation tests to genmake2 so that it acts more
like a typical autoconf-generated "./configure" script:
- HAVE_SYSTEM
- HAVE_FDATE
- FC_NAMEMANGLE.h
o small code modifications to use the above #define-s

o added the [#include "AD_CONFIG.h"] statement to all files that need
it for adjoint/tl #defines
o re-worked the build logic in genmake2 to support AD_CONFIG.h
o removed tools/genmake since it no longer works

o added a platform-detection mechanism to guess at the optfile to use
when none are specified
o changed some optfile names to reflect the new platform naming
convention--more work still needed in this area
o added parsing of MITGCM_* environment variables

o Bug fix for following scenario:
Compiling in verification/expt/code/ or working with a local real
file version of CPP_OPTIONS.h then genmake2 fails because it can not find
a copy of CPP_OPTIONS.h
o also change on screen comment corresponding to changed code
x Note! This breaks the functionality of the original genmake(1) because
it assumes that a CPP_OPTIONS.h should take priority over a ./CPP_OPTIONS.h

Small cleanups to genmake2 and its "optfiles". Initial check-in of
"testreport" which functions similarly to "testscript" but supports
more genmake2 options and emails results to a central address for
automated testing.

This is the first version of "genmake2" and "testscript2" (and support files)
that pass all the standard verification tests on faulks. Since they have new
names, they can be run side-by-side (no known conflicts) with the existing
genmake and testscript versions. If you get a chance, please try them on your
system and mail the output to <eh3@mit.edu>.

This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
select a symbolic revision name using the selection box, or choose
'Use Text Field' and enter a numeric revision.