MM5 Model on PC with Intel Compiler
Some pointers to follow when builing MM5 version 3 on a PC with
an Intel Compiler
1) MPICH must be build with IFC
2) In compiling with IFC version 6.0, you may get the following
error in mp_stotndt.F:
tkea_sav(i,j,mkx+1,inest) =
tkea(i,j,mkx+1)
Error 173 at (6757:mp_stotndt.f)
: Array element subscript is not within
array bounds
To fix this, edit include/pbltke.incl as follows:
Changed TKEA and TKEB from MKXG to MKX to make them
big enough
POINTER (ITKEA, TKEA(MIXG,MJXG,MKX+1)),
&
(ITKEB, TKEB(MIXG,MJXG,MKX+1))
3) Here are the flags that work for us:
RUNTIME_SYSTEM = "linux"
MPP_TARGET=$(RUNTIME_SYSTEM)
## edit the following definition for your system
LINUX_MPIHOME = /usr/rels/mpich-ch_p4
MFC = $(LINUX_MPIHOME)/bin/mpif90
MCC = $(LINUX_MPIHOME)/bin/mpicc
MLD = $(LINUX_MPIHOME)/bin/mpif90
CC =$(MCC)
FCFLAGS = -O3 -unroll -vec -ip -pc32 -prefetch
-axiMKW -tpp6 -rcd
LDOPTIONS = $(FCFLAGS)
LOCAL_LIBRARIES = -lfmpich -lmpich
#LOCAL_LIBRARIES = -L$(LINUX_MPIHOME)/lib -lfmpich
-lmpich
MAKE = make -r
AWK = awk
SED = sed
CAT = cat
CUT = cut
EXPAND = expand
M4 = m4
CPP = /lib/cpp -C -P
CPPFLAGS = -DMPI -Dlinux
CFLAGS = -DMPI -I$(LINUX_MPIHOME)/include
ARCH_OBJS = milliclock.o
IWORDSIZE = 4
RWORDSIZE = 4
LWORDSIZE = 4
4) Note, there is no automatic conversion from little-endian to
big-endian in a compiler flag.
You need to specify the fortran unit numbers
that will be converted using an
environment variable, F_UFMTENDIAN.
setenv F_UFMTENDIAN 11,12,13,21,22,23,41,42,43,9
Thanks to David Ovens, from the University of Washington
for sending long these tips
Thanks to John Taylor, from the Argonne Regional Climate
Center for the following comments (02/12/2003)
Listed below are the compilation flags that I use here at Argonne
on our jazz cluster using mpich over myrinet. I have compiled and
run successfully using both the Intel 6.0 and 7.0 compilers. The
ifc compilation leads to results consistent with my compilation
of MM5 using the Portland Group compilers on jazz. The -i_dynamic
requires that the intel shared libraries are installed on your computer.
The LINUX_MPIHOME variable must be set to point to your mpich build
using the intel compilers - this should be the only thing that you
need to change. My compilation only slightly differs from that of
David Ovens in that I use the -traditional flag as part of the CPP
call. Note also that the -aW -tpp7 flags are specific to Pentium
4 machines and should be set for your IA32 architecture in order
to optimize performance. Don't forget that you also need to set
the environment variables in order to read and write big-endian
data.
RUNTIME_SYSTEM = "linux"
MPP_TARGET=$(RUNTIME_SYSTEM)
## myrinet with mpich on jazz at ANL
LINUX_MPIHOME = /soft/apps/packages/mpich-gm-1.2.5..9-pre6-gm-1.6.3-intel-6.0.1.304
#LINUX_MPIHOME = /soft/apps/packages/mpich-gm-1.2.5..9-pre6-gm-1.6.3-intel-7.0
MFC = $(LINUX_MPIHOME)/bin/mpif90
MCC = $(LINUX_MPIHOME)/bin/mpicc
MLD = $(LINUX_MPIHOME)/bin/mpif90
FCFLAGS = -O3 -unroll -vec -ip -pc32 -prefetch -aW -tpp7
-rcd -i_dynamic
LDOPTIONS = $(FCFLAGS)
LOCAL_LIBRARIES = -L$(LINUX_MPIHOME)/lib
MAKE = make -i -r
AWK = awk
SED = sed
CAT = cat
CUT = cut
EXPAND = expand
M4 = m4
CPP = /lib/cpp -C -P -traditional
CPPFLAGS = -DMPI -Dlinux
CFLAGS = -DMPI -I$(LINUX_MPIHOME)/include
ARCH_OBJS = milliclock.o
IWORDSIZE = 4
RWORDSIZE = 4
LWORDSIZE = 4
|