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