Settings for Cygwin, using the GNU gfortran compiler.

ESMF requires gfortran 4.3 or later.  The build procedures assume
that the gfortran-4 and g++-4 packages have been installed via the
cygwin setup installer.

Requires the following environment settings:

  ESMF_COMPILER gfortran


Windows Compute Cluster Server (CCS) 2003 notes:

ESMF has been tested on Windows CCS using the Microsoft MPI.  To
use MSMPI, set:

  ESMF_COMM msmpi.

Two issues need to be addressed, prior to compiling ESMF:

1.) Typically, the CCS MSMPI header and library files reside
in /cygdrive/c/"Program Files"/"Microsoft Compute Cluster Pack".
However the spaces in the path name can confuse the ESMF makefile
system.

To work around this problem, create a symbolic link from the
ESMF_DIR directory which points to the CCS directory:

  cd $ESMF_DIR
  ln -s /cygdrive/c/"Program Files"/"Microsoft Compute Cluster Pack" ccsdir

Then set the ESMF_MSMPIDIR environment variable to point to the
symbolic link:

  ESMF_MSMPIDIR $ESMF_DIR/ccsdir

2.) The Microsoft mpif.h header file contains conditional code
which is written for the Intel Fortran compiler.  Gfortran does
not know about the !DEC$ directives which are used to implement
the conditional code.  A local copy of mpif.h must be created
in this directory ($ESMF_DIR/build_config/Cygwin.gfortran.default)
with the necessary corrections.

  cp $ESMF_MSMPIDIR/Include/mpif.h .

Using the editor of your choice, find the following statements,
near line 308:

!DEC$ IF DEFINED(_WIN64)
       PARAMETER (MPI_ADDRESS_KIND=8)
!DEC$ ELSE
       PARAMETER (MPI_ADDRESS_KIND=4)
!DEC$ ENDIF

Comment out the first PARAMETER statement as follows:

!DEC$ IF DEFINED (_WIN64)
!      PARAMETER (MPI_ADDRESS_KIND=8)
!DEC$ ELSE
       PARAMETER (MPI_ADDRESS_KIND=4)
!DEC$ ENDIF

You may now proceed to building ESMF.
