Bug fix: 990813, T3E and Compaq Alpha

This page describes a fix of a serious (fatal) run time bug on the Cray T3E, and a fix for a less serious bug on the Compaq Alphas, and any other byte swapped platform (e.g. Intel PC). This patch is for MM5 V3.1 only.

Bug on Cray T3E

The C/Fortran interface is a more complicated on the T3E that other platforms as far as character arrays are concerned. Many vendors have some complexity where character strings are concerned, but this can usually be handled by converting the string to a character array in the Fortran program before calling the C routine, in this case, and RSL routines that are responsible for writing the new version 3 large and small headers (see http://www2.mmm.ucar.edu/mm5/mm5v3/v3-intro.html for more information on the new v3 data format). The result of this error will be a crash very early in the model run, the first time the model tries to write to MMOUT_DOMAIN1. A workaround has been incorporated which affects the file MPP/RSL/RSL/rsl_ioserve.c . CAVEAT: The patch assumes and also requires that output on the T3E is single precision and with 4-byte integers. This is the way most MM5 data files are distributed, but if you have a need for double precision output a different workaround will be necessary; please contact mesouser@ucar.edu .

Bug on Compaq Alpha, other little-endian

The integer and real arrays in the big-header record of the MMOUT_DOMAIN files are not correctly byte-ordered. Data fields and integer and real data in the small-header records are not affected.

Installing the fix in your code

You must install this patch if you wish to run the model on the T3E, the Compaq Alphas, or any other byte-swapped (little-endian) platform. You may install this patch on other platforms without affecting the code or model performance. As of this date (990813) the version of the MM5v3.1 code has not been updated to reflect this change; therefore, you must install this patch file to effect the fix. Be certain that you are using MM5 V3.1, and then please download the patch file from http://www2.mmm.ucar.edu/mm5/mpp/mpp_patch_990813.tar.

INSTALLING THE PATCH:

1.  Change directories (cd) to your top-level MM5 source directory.
    This is the directory that contains the MPP directory, configure.user
    file, and other subdirectories of the MM5 distribution.

2.  Untar the patch file:

        tar xf mpp_patch_990813.tar

    This will affect the files:

      MPP/RSL/RSL/rsl_ioserve.c              (Fix for 1099 08 13)
      MPP/FLIC/FLIC/handle_executable.c      (Fix for 1999 08 10)
      README.MPP                             (Added some information to this file)
      MPP/RSL/RSL/rsl_malloc.c               (Fixes performance bug on T3E)

3.  Completely rebuild the code.

      make uninstall
      make mpp

Please report any problems to mesouser@ucar.edu .

Thanks

Steffen Unger, GMD, for reporting the T3E errors, tracking them down, and helping to work a solution.

Jim Edwards and Leslie Hart, NOAA/FSL, for information on how to pass strings between C and Fortran on the T3E.


-Rotang, August 13 (Friday) 1999