MM5 Model on PC with Intel Compilers
November 24, 2004:
MM5 works well with versions 1.4 and 2.0 of the PathScale EKOPath(tm)
Compiler Suite. We have tested versions 3.6.1 and 3.6.3 of MM5.
In order to build, we have had success with the following flags:
FC = pathf90
CC = pathcc
FCFLAGS = -I$(LIBINCLUDE) -O3 -OPT:Ofast -fno-math-errno
-DDEC_ALPHA
CFLAGS = -O3 -OPT:Ofast -fno-math-errno -DDEC_ALPHA
To handle byte-swapped I/O correctly for MM5, use the following
sequence of commands:
FILENV=$HOME/.assign
export FILENV
assign -F f77.mips -N be g:su
assign -I -F f77.mips -N be g:du
You only have to run the assign commands once, as they're stored
in a file, but you must ensure that the FILENV environment variable
is always set correctly before you run MM5.
We have verified that MM5 performs well on Opteron systems using
these optimization options.
The MPP variant of MM5 (version 3.6.3) has been tested using LAM-MPI
7.1.1 and MPICH 1.2.6 in conjunction with the PathScale 1.4 and
2.0 compilers. This worked well and gave good performance on a small
cluster of Opteron systems with Gigabit ethernet interconnect. A
number of small bug fixes to the MM5-MPP source code are required.
The most critical of these bug fixes is to the file MPP/mhz.c. It
turns out that the PathScale compiler, at high optimization level,
is able to completely optimize away the timing loops causing the
mhz estimation level to hang. This optimization can be defeated
with the following change:
164,165c164
< volatile int use_p_counter = 0;
< void use_p(int **p) { use_p_counter += (p != NULL); }
---
void use_p(int **p) {}
A patch of the necessary changes is available from support@pathscale.com
Thanks to Mark Debbage at Performance Engineer, PathScale
Inc
To build MM5 with IFC version 8.0 for ia32 (Xeon),
use these flags,
FC = /opt/intel_fc_80/bin/ifort
FCFLAGS = -I$(LIBINCLUDE) -pc 32 -rcd
-fpp -convert big_endian
On ia64 (Itanium), use,
FCFLAGS = -I$(LIBINCLUDE) -fpp -convert
big_endian -DDEC_ALPHA
Be sure to use the latest version and patch level of the compiler,
(l_fc_pc_8.0.039_pe043 as of this writing), as it contains some
bug fixes that are relevant to MM5.
Comments on ICC :
- When using IFC 8.0 and "-convert big_endian", the
"F_UFMTENDIAN" environment is not required.
- It is not necessary to make any changes to the source code (mp_stotndt.F
or otherwise).
- The optimizations, -axiMKW -tpp6 may not be appropriate for
all systems.
- The -ax "i" flag is no longer supported in IFC
8.0,
- The "-ax" argument is not available at all on
Itanium systems.
To build MM5 for amd64 (Opteron), use the PGI
compiler with -DDEC_ALPHA added to
FCFLAGS. When building with MPI, add it to the CFLAGS and CPPFLAGS
definitions
as well.
Thanks to Marc Rieffel at Paracel
Users interested in determining the best optimization options for
their specific target platforms are welcome to contact Paracel
at info@paracel.com or to visit Paracel's
Geosciences
|