forked from twjuliano/WRF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.canonical_stanza
89 lines (85 loc) · 4.88 KB
/
README.canonical_stanza
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
###########################################################
#ARCH <os> (fortran) compiler with (C) compiler # serial smpar dmpar dm+sm
#
# (The last four words on the line above indicate what parallel modes are supported for this build.
# Presence of serial indicates the code can be built single-threaded and an option will be presented
# by the configure script for this. Likewise, presence of smpar indicates shared-memory parallel (OpenMP),
# dmpar indicates distributed memory parallel (MPI), and dm+sm indicates both. The comment character
# before the first word is not necessary but it makes the choices neater when the configure script
# displays them to the user)
#
# (The settings below should be all that are needed per architecture/installation. The rest of the
# configuration settings are based on these and are done in the postamble (arch/postamble) )
#
DMPARALLEL = # 1
OMPCPP = # -D_OPENMP
OMP = # (compiler dependent option for openmp, e.g. -mp for pgi; leave commented out)
SFC = (serial fortran compiler)
SCC = (serial C compiler)
DM_FC = (Fortran compile command for mpi, eg: mpif90 -f90=$(SFC))
DM_CC = (C compile comand for mpi, eg: mpicc -cc=$(SCC))
FC = CONFIGURE_FC (leave as is: to be filled in by configure depending on parallel option)
CC = CONFIGURE_CC (leave as is: to be filled in by configure depending on parallel option
LD = $(FC) (usually leave as is)
RWORDSIZE = CONFIGURE_RWORDSIZE # filled in by configure or hard coded to 8 (for var)
PROMOTION = (compiler specific option for promotion: e.g. -r$(RWORDSIZE) -i4)
ARCH_LOCAL = (local additions to ARCHFLAGS)
CFLAGS_LOCAL = (local additions to CFLAGS)
LDFLAGS_LOCAL = (local additions to LDFLAGS)
FCOPTIM = (optimization options to Fortran compiler)
FCREDUCEOPT = (optional: used by noop_exceptsions for certain routines that won't work with full opt on certain compilers)
FCNOOPT = (flag that turns off optimization)
FCDEBUG = (debug and no optimization options to Fortran compiler)
FORMAT_FIXED = (fortran compiler option for fixed format)
FORMAT_FREE = (fortran compiler option for free format)
FCSUFFIX = (tell the compiler what a fortran file's suffix looks like -- AIX needs)
BYTESWAPIO = (option to give bigendian unformatted fortran output, if needed)
FCBASEOPTS = $(FCDEBUG) $(FORMAT_FREE) $(BYTESWAPIO) (basic options to fortran compiler, but not optim.)
MODULE_SRCH_FLAG = (flag to compiler to tell it where to search for modules -- PGI needs)
TRADFLAG = (flag to cpp to tell it to act like it did before script kiddies got hold of it)
CPP = (cpp command)
AR = (ar command)
ARFLAGS = (flags to ar command, want ru capability)
M4 = (m4 command)
RANLIB = (ranlib command if needed)
CC_TOOLS = (the cc command that should be used for compiling in the tools directory. Often just cc or $(SCC) )
#optional (used for BG/L, for example, where the mpi args and paths have to be specified explicitly)
MPI_INC = (e.g. -I/bgl/BlueLight/ppcfloor/bglsys/include)
MPI_LIB = (e.g. -L/bgl/BlueLight/ppcfloor/bglsys/lib -lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts)
---
Here is an example:
###########################################################
#ARCH Linux x86_64, PGI compiler with gcc # serial smpar dmpar dm+sm
#
DMPARALLEL = # 1
OMPCPP = # -D_OPENMP
OMP = # -mp -Minfo=mp
SFC = pgf90
SCC = gcc
DM_FC = mpif90 -f90=$(SFC)
DM_CC = mpicc -cc=$(SCC)
FC = CONFIGURE_FC
CC = CONFIGURE_CC
LD = $(FC)
RWORDSIZE = CONFIGURE_RWORDSIZE
PROMOTION = -r$(RWORDSIZE) -i4
ARCH_LOCAL = -DNONSTANDARD_SYSTEM_SUBR # but for ifort compiler, it is -DNONSTANDARD_SYSTEM_FUNC
CFLAGS_LOCAL = -w -O3
LDFLAGS_LOCAL =
FCOPTIM = -fastsse -Mvect=noaltcode -Msmartalloc -Mprefetch=distance:8 -Mfprelaxed # -Minfo=all =Mneginfo=all
FCREDUCEDOPT = $(FCOPTIM)
FCNOOPT = -O0
FCDEBUG = # -g $(FCNOOPT)
FORMAT_FIXED = -Mfixed
FORMAT_FREE = -Mfree
FCSUFFIX =
BYTESWAPIO = -byteswapio
FCBASEOPTS = -w $(FCDEBUG) $(FORMAT_FREE) $(BYTESWAPIO)
MODULE_SRCH_FLAG = -module $(WRF_SRC_ROOT_DIR)/main
TRADFLAG = -traditional
CPP = /lib/cpp -C -P
AR = ar
ARFLAGS = ru
M4 = m4 -B 14000
RANLIB = ranlib
CC_TOOLS = $(SCC)