forked from NCAR/ccpp-physics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TRUNK UPDATE: ticket NCAR#6: port fv3 to theia.
SURGE-slogin2 > svn st M . A + tests/Compile_theia.log M tests/default_vars.sh A + tests/RegressionTests_theia.log M tests/rt.sh A + tests/fv3_conf/fv3_qsub.IN_theia M tests/rt.conf A + conf/configure.fv3.theia M conf/configure.fv3.wcoss_cray A + conf/modules.fv3.theia A + compile M makefile
- Loading branch information
1 parent
72a0a86
commit 73d0b89
Showing
11 changed files
with
1,114 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
echo | ||
|
||
if [[ ! -f conf/configure.fv3 ]]; then | ||
echo "File conf/configure.fv3 not found!" | ||
echo "Running ./configure .... " | ||
./configure | ||
fi | ||
|
||
if [[ -f conf/modules.fv3 ]]; then | ||
echo -n "Loading modules .... " | ||
source conf/modules.fv3 | ||
echo "done." | ||
echo | ||
fi | ||
|
||
set -x | ||
|
||
echo "Running make" "$@" | ||
|
||
make -j 8 "$@" | ||
|
||
#make clean | ||
#make -j 8 "$@" | ||
#mv fv3.exe fv3_default.exe | ||
|
||
#make clean | ||
#make -j 8 HYDRO=Y "$@" | ||
#mv fv3.exe fv3_hydro.exe | ||
|
||
#make clean | ||
#make -j 8 32BIT=Y "$@" | ||
#mv fv3.exe fv3_32bit.exe | ||
|
||
#make clean | ||
#make -j 8 DEBUG=Y "$@" | ||
#mv fv3.exe fv3_debug.exe | ||
|
||
echo | ||
echo "Compilation finished successfully." | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
|
||
############ | ||
# commands # | ||
############ | ||
FC = mpiifort | ||
CC = mpiicc | ||
CXX = mpiicpc | ||
LD = mpiifort -mkl=sequential | ||
|
||
######### | ||
# flags # | ||
######### | ||
# default is 64-bit OpenMP non-hydrostatic build using AVX2 | ||
DEBUG = | ||
REPRO = | ||
VERBOSE = | ||
OPENMP = Y | ||
AVX2 = Y | ||
HYDRO = N | ||
|
||
include $(ESMFMKFILE) | ||
ESMF_INC = $(ESMF_F90COMPILEPATHS) | ||
|
||
NCEPLIBS = $(BACIO_LIB4) $(SP_LIBd) $(W3EMC_LIBd) $(W3NCO_LIBd) | ||
|
||
############################################## | ||
# Need to use at least GNU Make version 3.81 # | ||
############################################## | ||
need := 3.81 | ||
ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need)))) | ||
ifneq ($(need),$(ok)) | ||
$(error Need at least make version $(need). Load module gmake/3.81) | ||
endif | ||
|
||
NETCDF_ROOT = $(NETCDF) | ||
INCLUDE = -I$(NETCDF_ROOT)/include | ||
|
||
FPPFLAGS := -fpp -Wp,-w $(INCLUDE) | ||
CFLAGS := $(INCLUDE) | ||
|
||
FFLAGS := $(INCLUDE) -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte | ||
|
||
ifeq ($(HYDRO),Y) | ||
CPPDEFS += -Duse_libMPI -Duse_netCDF -DSPMD -DUSE_LOG_DIAG_FIELD_INFO -Duse_LARGEFILE -DUSE_GFSL63 -DGFS_PHYS | ||
else | ||
CPPDEFS += -Duse_libMPI -Duse_netCDF -DSPMD -DUSE_LOG_DIAG_FIELD_INFO -Duse_LARGEFILE -DUSE_GFSL63 -DGFS_PHYS -DMOIST_CAPPA -DUSE_COND | ||
endif | ||
|
||
CPPDEFS += -DNEW_TAUCTMAX | ||
|
||
ifeq ($(32BIT),Y) | ||
CPPDEFS += -DOVERLOAD_R4 | ||
FFLAGS += -i4 -real-size 32 | ||
else | ||
FFLAGS += -i4 -real-size 64 -no-prec-div -no-prec-sqrt | ||
endif | ||
|
||
ifeq ($(AVX2),Y) | ||
FFLAGS += -xCORE-AVX2 -qno-opt-dynamic-align | ||
CFLAGS += -xCORE-AVX2 -qno-opt-dynamic-align | ||
else | ||
FFLAGS += -xHOST -qno-opt-dynamic-align | ||
CFLAGS += -xHOST -qno-opt-dynamic-align | ||
endif | ||
|
||
FFLAGS_OPT = -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3 | ||
FFLAGS_REPRO = -O2 -debug minimal -fp-model source -qoverride-limits -g -traceback | ||
FFLAGS_DEBUG = -g -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -traceback -ftrapuv | ||
|
||
TRANSCENDENTALS := -fast-transcendentals | ||
FFLAGS_OPENMP = -qopenmp | ||
FFLAGS_VERBOSE = -v -V -what | ||
|
||
CFLAGS += -D__IFC -sox -fp-model source | ||
|
||
CFLAGS_OPT = -O2 -debug minimal | ||
CFLAGS_REPRO = -O2 -debug minimal | ||
CFLAGS_OPENMP = -qopenmp | ||
CFLAGS_DEBUG = -O0 -g -ftrapuv -traceback | ||
|
||
# Optional Testing compile flags. Mutually exclusive from DEBUG, REPRO, and OPT | ||
# *_TEST will match the production if no new option(s) is(are) to be tested. | ||
FFLAGS_TEST = -O3 -debug minimal -fp-model source -qoverride-limits | ||
CFLAGS_TEST = -O2 | ||
|
||
LDFLAGS := | ||
LDFLAGS_OPENMP := -qopenmp | ||
LDFLAGS_VERBOSE := -Wl,-V,--verbose,-cref,-M | ||
|
||
# start with blank LIBS | ||
LIBS := | ||
|
||
ifneq ($(REPRO),) | ||
CFLAGS += $(CFLAGS_REPRO) | ||
FFLAGS += $(FFLAGS_REPRO) | ||
FAST := | ||
else ifneq ($(DEBUG),) | ||
CFLAGS += $(CFLAGS_DEBUG) | ||
FFLAGS += $(FFLAGS_DEBUG) | ||
FAST := | ||
else ifneq ($(TEST),) | ||
CFLAGS += $(CFLAGS_TEST) | ||
FFLAGS += $(FFLAGS_TEST) | ||
FAST := | ||
else | ||
CFLAGS += $(CFLAGS_OPT) | ||
FFLAGS += $(FFLAGS_OPT) | ||
FAST := $(TRANSCENDENTALS) | ||
endif | ||
|
||
ifneq ($(OPENMP),) | ||
CFLAGS += $(CFLAGS_OPENMP) | ||
FFLAGS += $(FFLAGS_OPENMP) | ||
LDFLAGS += $(LDFLAGS_OPENMP) | ||
endif | ||
|
||
ifneq ($(VERBOSE),) | ||
CFLAGS += $(CFLAGS_VERBOSE) | ||
FFLAGS += $(FFLAGS_VERBOSE) | ||
LDFLAGS += $(LDFLAGS_VERBOSE) | ||
endif | ||
|
||
ifneq ($(findstring netcdf/4,$(LOADEDMODULES)),) | ||
LIBS += -L$(NETCDF)/lib -lnetcdff -lnetcdf | ||
else | ||
LIBS += -L$(NETCDF)/lib -lnetcdff -lnetcdf | ||
endif | ||
|
||
LDFLAGS += $(LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## | ||
## purge all currently loaded modules. | ||
## do not rely on user's environment | ||
## | ||
module purge | ||
|
||
## | ||
## load programming environment | ||
## this typically includes compiler, MPI and job scheduler | ||
## | ||
module load intel/15.1.133 | ||
module load impi/5.0.3.048 | ||
module load netcdf/4.3.0 | ||
module load esmf/7.0.0 | ||
|
||
## | ||
## load nwprod libraries | ||
## | ||
module use -a /scratch3/NCEPDEV/nwprod/lib/modulefiles | ||
module load bacio/v2.0.1 | ||
module load sp/v2.0.2 | ||
module load ip/v2.0.0 | ||
module load w3nco/v2.0.6 | ||
module load w3emc/v2.0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.