forked from ufs-community/ufs-weather-model
-
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.
Merge pull request ufs-community#28 from climbfuji/final_pr_before_me…
…rging_to_develop_or_master_20200313 dtc/develop: final PR before merging to develop or master (support for hera.gnu, change rt.sh logic for parsing rt config files)
- Loading branch information
Showing
16 changed files
with
297 additions
and
987 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
This file was deleted.
Oops, something went wrong.
Submodule FV3
updated
11 files
+10 −6 | .gitmodules | |
+0 −14 | CODEOWNERS | |
+1 −1 | atmos_cubed_sphere | |
+11 −8 | atmos_model.F90 | |
+7 −1 | ccpp/build_ccpp.sh | |
+1 −1 | ccpp/framework | |
+1 −1 | ccpp/physics | |
+7 −0 | ccpp/set_compilers.sh | |
+42 −50 | gfsphysics/GFS_layer/GFS_physics_driver.F90 | |
+1 −1 | gfsphysics/GFS_layer/GFS_typedefs.F90 | |
+57 −31 | io/FV3GFS_io.F90 |
Submodule NEMS
updated
7 files
+0 −10 | LICENSE.md | |
+0 −4 | src/GNUmakefile | |
+0 −7 | src/incmake/component_CICE.mk | |
+0 −47 | src/incmake/component_CMEPS.mk | |
+0 −7 | src/incmake/component_MOM6.mk | |
+9 −452 | src/module_EARTH_GRID_COMP.F90 | |
+144 −199 | src/module_MEDIATOR.F90 |
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,35 @@ | ||
message("") | ||
message("Setting configuration for $ENV{CMAKE_Platform}") | ||
message("") | ||
|
||
get_filename_component (C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME) | ||
get_filename_component (CXX_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME) | ||
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME) | ||
message("C compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} (${C_COMPILER_NAME})") | ||
message("CXX compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} (${CXX_COMPILER_NAME})") | ||
message("Fortran compiler: ${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION} (${Fortran_COMPILER_NAME})") | ||
message("") | ||
|
||
option(DEBUG "Enable DEBUG mode" OFF) | ||
option(REPRO "Enable REPRO mode" OFF) | ||
option(VERBOSE "Enable VERBOSE mode" OFF) | ||
option(32BIT "Enable 32BIT (single precision arithmetic in dycore)" OFF) | ||
option(OPENMP "Enable OpenMP threading" ON) | ||
option(AVX2 "Enable AVX2 instruction set" OFF) | ||
|
||
option(INLINE_POST "Enable inline post" OFF) | ||
|
||
include( cmake/${CMAKE_Fortran_COMPILER_ID}.cmake ) | ||
|
||
set(NEMSIO_INC $ENV{NEMSIO_INC}) | ||
set(POST_INC $ENV{POST_INC}) | ||
set(NCEP_LIBS $ENV{POST_LIB} $ENV{NEMSIO_LIB} $ENV{G2_LIB4} $ENV{G2TMPL_LIB} $ENV{BACIO_LIB4} $ENV{SP_LIBd} $ENV{W3EMC_LIBd} $ENV{W3NCO_LIBd} $ENV{CRTM_LIB} $ENV{PNG_LIB} $ENV{JASPER_LIB} $ENV{Z_LIB}) | ||
|
||
set(ESMF_MOD ${ESMF_F90COMPILEPATHS}) | ||
set(ESMF_LIBS "${ESMF_F90ESMFLINKRPATHS} ${ESMF_F90ESMFLINKPATHS} ${ESMF_F90ESMFLINKLIBS}") | ||
|
||
set(NETCDF_INC_DIR $ENV{NETCDF}/include) | ||
set(NETCDF_LIBDIR $ENV{NETCDF}/lib) | ||
set(NETCDF_LIBS -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf) | ||
|
||
message("") |
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
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,175 @@ | ||
## NEMS configuration file | ||
## | ||
## Platform: Hera | ||
## Compiler: GNU with OpenMPI | ||
|
||
SHELL=/bin/sh | ||
|
||
################################################################################ | ||
## Include the common configuration parts | ||
|
||
ifdef InNemsMakefile | ||
include $(TOP)/conf/configure.nems.NUOPC | ||
endif | ||
|
||
############ | ||
# commands # | ||
############ | ||
FC = mpif90 | ||
CC = mpicc | ||
CXX = mpicxx | ||
LD = $(FC) | ||
|
||
######### | ||
# flags # | ||
######### | ||
# default is 64-bit OpenMP non-hydrostatic build using AVX2 | ||
DEBUG = | ||
REPRO = | ||
VERBOSE = | ||
OPENMP = Y | ||
AVX2 = Y | ||
HYDRO = N | ||
CCPP = N | ||
STATIC = N | ||
|
||
include $(ESMFMKFILE) | ||
ESMF_INC = $(ESMF_F90COMPILEPATHS) | ||
|
||
NEMSIOINC = -I$(NEMSIO_INC) | ||
NCEPLIBS = $(NEMSIO_LIB) $(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 | ||
NETCDF_INC = -I$(NETCDF_ROOT)/include | ||
ifneq ($(findstring netcdf/4,$(LOADEDMODULES)),) | ||
NETCDF_LIB += -L$(NETCDF)/lib -lnetcdff -lnetcdf | ||
else | ||
NETCDF_LIB += -L$(NETCDF)/lib -lnetcdff -lnetcdf | ||
endif | ||
|
||
FPPFLAGS := -cpp -Wp,-w $(INCLUDE) | ||
CFLAGS := $(INCLUDE) | ||
|
||
FFLAGS := $(INCLUDE) -fcray-pointer -ffree-line-length-none -fno-range-check -fbacktrace | ||
|
||
CPPDEFS += -Duse_libMPI -Duse_netCDF -DSPMD -DUSE_LOG_DIAG_FIELD_INFO -DUSE_GFSL63 -DGFS_PHYS -Duse_WRTCOMP | ||
CPPDEFS += -DNEW_TAUCTMAX -DINTERNAL_FILE_NML -DNO_INLINE_POST | ||
|
||
ifeq ($(HYDRO),Y) | ||
CPPDEFS += | ||
else | ||
CPPDEFS += -DMOIST_CAPPA -DUSE_COND | ||
endif | ||
|
||
ifeq ($(NAM_phys),Y) | ||
CPPDEFS += -DNAM_phys | ||
endif | ||
|
||
ifeq ($(32BIT),Y) | ||
CPPDEFS += -DOVERLOAD_R4 -DOVERLOAD_R8 | ||
FFLAGS += | ||
else | ||
FFLAGS += -fdefault-real-8 -fdefault-double-8 | ||
endif | ||
|
||
ifeq ($(AVX2),Y) | ||
FFLAGS += | ||
CFLAGS += | ||
else | ||
FFLAGS += | ||
CFLAGS += | ||
endif | ||
|
||
ifeq ($(MULTI_GASES),Y) | ||
CPPDEFS += -DMULTI_GASES | ||
endif | ||
|
||
FFLAGS_OPT = -O2 -fno-range-check | ||
FFLAGS_REPRO = -O2 -g -fbacktrace -fno-range-check | ||
FFLAGS_DEBUG = -g -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check -fbacktrace -fno-range-check -Wall | ||
|
||
TRANSCENDENTALS := | ||
FFLAGS_OPENMP = -fopenmp | ||
FFLAGS_VERBOSE = -v -V | ||
|
||
CFLAGS += -D__IFC | ||
|
||
CFLAGS_OPT = -O2 | ||
CFLAGS_REPRO = -O2 | ||
CFLAGS_OPENMP = -fopenmp | ||
CFLAGS_DEBUG = -O0 -g | ||
|
||
# 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 | ||
CFLAGS_TEST = -O2 | ||
|
||
LDFLAGS := | ||
LDFLAGS_OPENMP := -fopenmp | ||
LDFLAGS_VERBOSE := -Wl,-V,--verbose,-cref,-M | ||
|
||
# start with blank LIBS | ||
LIBS := | ||
|
||
ifeq ($(REPRO),Y) | ||
CPPDEFS += -DREPRO | ||
CFLAGS += $(CFLAGS_REPRO) | ||
FFLAGS += $(FFLAGS_REPRO) | ||
FAST := | ||
else ifeq ($(DEBUG),Y) | ||
CPPDEFS += -DDEBUG | ||
CFLAGS += $(CFLAGS_DEBUG) | ||
FFLAGS += $(FFLAGS_DEBUG) | ||
FAST := | ||
else ifeq ($(TEST),Y) | ||
CFLAGS += $(CFLAGS_TEST) | ||
FFLAGS += $(FFLAGS_TEST) | ||
FAST := | ||
else | ||
CFLAGS += $(CFLAGS_OPT) | ||
FFLAGS += $(FFLAGS_OPT) | ||
FAST := $(TRANSCENDENTALS) | ||
endif | ||
|
||
ifeq ($(OPENMP),Y) | ||
CPPDEFS += -DOPENMP | ||
CFLAGS += $(CFLAGS_OPENMP) | ||
FFLAGS += $(FFLAGS_OPENMP) | ||
LDFLAGS += $(LDFLAGS_OPENMP) | ||
endif | ||
|
||
ifeq ($(VERBOSE),Y) | ||
CFLAGS += $(CFLAGS_VERBOSE) | ||
FFLAGS += $(FFLAGS_VERBOSE) | ||
LDFLAGS += $(LDFLAGS_VERBOSE) | ||
endif | ||
|
||
ifeq ($(CCPP),Y) | ||
CPPDEFS += -DCCPP | ||
CFLAGS += -I$(PATH_CCPP)/include | ||
FFLAGS += -I$(PATH_CCPP)/include | ||
ifeq ($(STATIC),Y) | ||
CPPDEFS += -DSTATIC | ||
LDFLAGS += -L$(PATH_CCPP)/lib -lccppphys -lccpp $(NCEPLIBS) -lxml2 | ||
else | ||
LDFLAGS += -L$(PATH_CCPP)/lib -lccpp | ||
endif | ||
endif | ||
|
||
LDFLAGS += $(LIBS) | ||
|
||
ifdef InNemsMakefile | ||
FFLAGS += $(ESMF_INC) | ||
CPPFLAGS += -cpp -traditional | ||
EXTLIBS = $(NCEPLIBS) $(ESMF_LIB) $(LDFLAGS) $(NETCDF_LIB) | ||
endif |
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,42 @@ | ||
#%Module###################################################################### | ||
## | ||
## NEMS FV3 Prerequisites: Hera/GNU | ||
|
||
proc ModulesHelp {} { | ||
puts stderr "\tcit - loads modules required for building and running FV3 under NEMS on Hera/GNU" | ||
} | ||
|
||
module-whatis "loads NEMS FV3 prerequisites for Hera/GNU" | ||
|
||
# NOTE: the "module purge" and loading of the module command are | ||
# handled by the module-setup.sh (or .csh) script. | ||
setenv NCEPLIBS /scratch2/NCEPDEV/nwprod/NCEPLIBS | ||
## | ||
## load contrib environment | ||
## load slurm utils (arbitrary.pl layout.pl) | ||
## | ||
module load contrib sutils | ||
|
||
## | ||
## load programming environment | ||
## this typically includes compiler, MPI and job scheduler | ||
## | ||
module load gnu/9.2.0 | ||
module load openmpi/3.1.4 | ||
module load netcdf/4.7.2 | ||
|
||
## | ||
## use pre-compiled EMSF library and NCEP libraries for above compiler / MPI combination | ||
## | ||
module use -a /scratch1/BMC/gmtb/software/modulefiles/gnu-9.2.0/openmpi-3.1.4 | ||
module load NCEPlibs/1.0.0 | ||
|
||
## | ||
## load cmake | ||
## | ||
module use -a /scratch1/BMC/gmtb/software/modulefiles/generic | ||
module load cmake/3.16.3 | ||
setenv CMAKE_C_COMPILER mpicc | ||
setenv CMAKE_CXX_COMPILER mpicxx | ||
setenv CMAKE_Fortran_COMPILER mpif90 | ||
setenv CMAKE_Platform hera.gnu |
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.