From 763cce9aa6ae9f19733c917adc153d2ba302c405 Mon Sep 17 00:00:00 2001 From: Daniel Ricciuto Date: Thu, 21 Sep 2017 16:17:23 -0400 Subject: [PATCH 1/6] Efficiency updates for coupler bypass --- Depends.babbageKnc | 6 + Depends.bluewaters | 5 + Depends.corip1 | 5 + Depends.cray | 6 + Depends.gnu | 2 + Depends.intel | 40 + Depends.intel14 | 28 + Depends.intelmic | 6 + Depends.intelmic14 | 6 + Depends.mira | 22 + Depends.nag | 4 + Makefile | 858 ++++++++ README | 15 + config_batch.xml | 468 +++++ config_compilers.xml | 1073 ++++++++++ config_machines.xml | 1792 +++++++++++++++++ config_pio.xml | 344 ++++ mkDepends | 452 +++++ mkSrcfiles | 96 + nag_mpi_argument.txt | 4 + template.case.run | 78 + template.case.test | 73 + template.st_archive | 79 + userdefined_laptop_template/README.md | 131 ++ .../config_compilers.xml | 30 + .../config_machines.xml | 33 + userdefined_laptop_template/config_pes.xml | 31 + 27 files changed, 5687 insertions(+) create mode 100644 Depends.babbageKnc create mode 100755 Depends.bluewaters create mode 100644 Depends.corip1 create mode 100644 Depends.cray create mode 100644 Depends.gnu create mode 100644 Depends.intel create mode 100644 Depends.intel14 create mode 100644 Depends.intelmic create mode 100644 Depends.intelmic14 create mode 100644 Depends.mira create mode 100644 Depends.nag create mode 100644 Makefile create mode 100644 README create mode 100644 config_batch.xml create mode 100644 config_compilers.xml create mode 100644 config_machines.xml create mode 100644 config_pio.xml create mode 100755 mkDepends create mode 100755 mkSrcfiles create mode 100644 nag_mpi_argument.txt create mode 100755 template.case.run create mode 100755 template.case.test create mode 100755 template.st_archive create mode 100644 userdefined_laptop_template/README.md create mode 100644 userdefined_laptop_template/config_compilers.xml create mode 100644 userdefined_laptop_template/config_machines.xml create mode 100644 userdefined_laptop_template/config_pes.xml diff --git a/Depends.babbageKnc b/Depends.babbageKnc new file mode 100644 index 0000000000..f5a6f335cc --- /dev/null +++ b/Depends.babbageKnc @@ -0,0 +1,6 @@ + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< + +quadrature_mod.o: quadrature_mod.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -DIS_ACCELERATOR $< diff --git a/Depends.bluewaters b/Depends.bluewaters new file mode 100755 index 0000000000..e113298e08 --- /dev/null +++ b/Depends.bluewaters @@ -0,0 +1,5 @@ +# + ifeq ($(strip $(COMPILER)),pgi) + progseasalts_intr.o: progseasalts_intr.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -Mnovect $< +endif diff --git a/Depends.corip1 b/Depends.corip1 new file mode 100644 index 0000000000..81be8f3f16 --- /dev/null +++ b/Depends.corip1 @@ -0,0 +1,5 @@ +# Workaround for ICE in intel/2016.0.109 +ifeq (CPRINTEL,$(findstring CPRINTEL, $(FFLAGS))) +RtmMod.o: RtmMod.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) -O1 $< +endif diff --git a/Depends.cray b/Depends.cray new file mode 100644 index 0000000000..b6023391ea --- /dev/null +++ b/Depends.cray @@ -0,0 +1,6 @@ +NOOPTOBJS= ice_boundary.o dyn_comp.o unicon.o + +$(NOOPTOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< + + diff --git a/Depends.gnu b/Depends.gnu new file mode 100644 index 0000000000..2d53247217 --- /dev/null +++ b/Depends.gnu @@ -0,0 +1,2 @@ +geopk.o:geopk.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fcray-pointer $< diff --git a/Depends.intel b/Depends.intel new file mode 100644 index 0000000000..5369c3f714 --- /dev/null +++ b/Depends.intel @@ -0,0 +1,40 @@ +# +PERFOBJS=\ +prim_advection_mod.o \ +edge_mod.o \ +derivative_mod.o \ +bndry_mod.o \ +prim_advance_mod.o + +# CLM's SatellitePhenologyMod is compiled incorrectly with intel 15.0.0 at -O2 +REDUCED_OPT_OBJS=\ +SatellitePhenologyMod.o + +# shr_wv_sat_mod does not need to have better than ~0.1% precision, and benefits +# enormously from a lower precision in the vector functions. +REDUCED_PRECISION_OBJS=\ +shr_wv_sat_mod.o + +SHR_RANDNUM_FORT_OBJS=\ +kissvec_mod.o \ +mersennetwister_mod.o \ +dSFMT_interface.o \ +shr_RandNum_mod.o + +SHR_RANDNUM_C_OBJS=\ +dSFMT.o \ +dSFMT_utils.o \ +kissvec.o + +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -no-prec-div $< + $(REDUCED_OPT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O1 $< + $(REDUCED_PRECISION_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fimf-precision=low -fp-model fast $< + $(SHR_RANDNUM_FORT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -fp-model fast -no-prec-div -no-prec-sqrt -override-limits $< + $(SHR_RANDNUM_C_OBJS): %.o: %.c + $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) -O3 -fp-model fast $< +endif diff --git a/Depends.intel14 b/Depends.intel14 new file mode 100644 index 0000000000..32e4747d7a --- /dev/null +++ b/Depends.intel14 @@ -0,0 +1,28 @@ +# +# 12/03/2012 the intel compiler on yellowstone 12.1.5 20120612 +# does not converge the pH computation without the -CU flag +# root cause has not been determined. JPE +# this problem is resolved in intel 13.0.1 +#ecosys_mod.o: ecosys_mod.F90 +# $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -CU $< + + + +PERFOBJS=\ +prim_advection_mod_base.o \ +vertremap_mod_base.o \ +edge_mod_base.o \ +derivative_mod_base.o \ +bndry_mod_base.o \ +prim_advance_mod.o \ +uwshcu.o \ +wetdep.o + +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -no-prec-div $< + $(REDUCED_OPT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O1 $< + $(REDUCED_PRECISION_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fimf-precision=low -fp-model fast $< +endif diff --git a/Depends.intelmic b/Depends.intelmic new file mode 100644 index 0000000000..6f05aee44a --- /dev/null +++ b/Depends.intelmic @@ -0,0 +1,6 @@ + +#derivative_mod_base.o: derivative_mod_base.F90 +# $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) -O1 $< + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< diff --git a/Depends.intelmic14 b/Depends.intelmic14 new file mode 100644 index 0000000000..6f05aee44a --- /dev/null +++ b/Depends.intelmic14 @@ -0,0 +1,6 @@ + +#derivative_mod_base.o: derivative_mod_base.F90 +# $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) -O1 $< + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< diff --git a/Depends.mira b/Depends.mira new file mode 100644 index 0000000000..c786f6248a --- /dev/null +++ b/Depends.mira @@ -0,0 +1,22 @@ +# These routines have problems with stacksize when omp is invoked add -qsmallstack to resolve +SSOBJS = shr_reprosum_mod.o mo_sethet.o mo_drydep.o + +$(SSOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -qsmallstack $< + +time_management.o: time_management.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -qsmp=noauto:noomp $< + +# These routines benefit from -qnostrict without violating the bfb test +PERFOBJS=\ +prim_advection_mod.o \ +edge_mod.o \ +derivative_mod.o \ +bndry_mod.o \ +prim_advance_mod.o \ +uwshcu.o \ +wetdep.o +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -qnostrict $< +endif diff --git a/Depends.nag b/Depends.nag new file mode 100644 index 0000000000..d7e4894aa1 --- /dev/null +++ b/Depends.nag @@ -0,0 +1,4 @@ +wrap_mpi.o: wrap_mpi.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< +fft99.o: fft99.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..014088b01e --- /dev/null +++ b/Makefile @@ -0,0 +1,858 @@ +#=============================================================================== +# +# Common Makefile: a framework for building all CIME components and more +# +#=============================================================================== + +# Set up special characters +null := +comma := , + +# Load dependency search path. +dirs := . +dirs += $(shell cat Filepath) + +cpp_dirs := $(dirs) +# Add INCROOT to path for Depends and Include +MINCROOT := +ifdef INCROOT + cpp_dirs += $(INCROOT) + MINCROOT := $(INCROOT) +endif + +# Expand any tildes in directory names. Change spaces to colons. +VPATH := $(foreach dir,$(cpp_dirs),$(wildcard $(dir))) +VPATH := $(subst $(space),:,$(VPATH)) + +RM := rm +CP := cp + +exec_se: $(EXEC_SE) Depends +complib: $(COMPLIB) Depends + +# Determine whether to compile threaded or not +# Set the THREADDIR for the shared build +# based on the threaded build status +compile_threaded = false +ifeq ($(strip $(SMP)),TRUE) + compile_threaded = true + THREADDIR = threads +else + ifeq ($(strip $(BUILD_THREADED)),TRUE) + compile_threaded = true + THREADDIR = threads + else + THREADDIR = nothreads + endif +endif + +# set the debug directory based on the debug status +ifeq ($(strip $(DEBUG)),TRUE) + DEBUGDIR = debug +else + DEBUGDIR = nodebug +endif + +ifeq ($(strip $(USE_ESMF_LIB)), TRUE) + ESMFDIR = esmf +else + ESMFDIR = noesmf +endif + +# Determine whether any C++ code will be included in the build; +# currently, C++ code is included if and only if we're linking to the +# trilinos library. +ifeq ($(strip $(USE_TRILINOS)), TRUE) + USE_CXX = true +else + USE_CXX = false +endif + +ifndef MOD_SUFFIX + MOD_SUFFIX := mod +endif + +#=============================================================================== +# set CPP options (must use this before any flags or cflags settings) +#=============================================================================== + +CPPDEFS := $(USER_CPPDEFS) + +# Unless DEBUG mode is enabled, use NDEBUG to turn off assert statements. +ifneq ($(strip $(DEBUG)),TRUE) + CPPDEFS += -DNDEBUG +endif + +# USE_ESMF_LIB is currently only defined in env_build.xml +ifeq ($(USE_ESMF_LIB), TRUE) + CPPDEFS += -DUSE_ESMF_LIB +endif + +ifeq ($(strip $(MPILIB)),mpi-serial) + CPPDEFS += -DNO_MPI2 +else + CPPDEFS += -DHAVE_MPI +endif +ifeq ($(compile_threaded), true) + CPPDEFS += -DTHREADED_OMP +endif + +ifeq (,$(EXEROOT)) + EXEROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) EXEROOT --value) +endif +ifeq (,$(BUILD_THREADED)) + BUILD_THREADED = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) BUILD_THREADED --value) +endif + +ifeq (,$(LIBROOT)) + LIBROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) LIBROOT --value) +endif +ifeq (,$(SHAREDLIBROOT)) + SHAREDLIBROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) SHAREDLIBROOT --value) +endif +ifeq (,$(COMPILER)) + COMPILER = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) COMPILER --value) +endif +ifeq (,$(NINST_VALUE)) + NINST_VALUE = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) NINST_VALUE --value) +endif +ifeq (,$(MPILIB)) + MPILIB = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) MPILIB --value) +endif +ifeq ($(strip $(PIO_VERSION)),1) + CPPDEFS += -DPIO1 +endif + + + +ifeq (,$(SHAREDPATH)) + SHAREDPATH = $(COMPILER)/$(MPILIB)/$(DEBUGDIR)/$(THREADDIR) +endif +INSTALL_SHAREDPATH = $(EXEROOT)/$(SHAREDPATH) + +include $(CASEROOT)/Macros.make +# Decide whether to use a C++ or Fortran linker, based on whether we +# are using any C++ code and the compiler-dependent CXX_LINKER variable +ifeq ($(USE_CXX), true) + # The following is essentially an "if... elseif... else", but gmake + # 3.80 and earlier doesn't support elseif + ifeq ($(CXX_LINKER), CXX) + LD := $(MPICXX) + endif + ifeq ($(CXX_LINKER), FORTRAN) + LD := $(MPIFC) + endif +endif +# Use this if LD has not already been defined. +ifeq ($(origin LD), default) + ifeq ($(strip $(MPILIB)),mpi-serial) + LD := $(SFC) + else + LD := $(MPIFC) + endif +endif + + + +ifeq ($(USE_CXX), true) + ifeq ($(SUPPORTS_CXX), FALSE) + $(error Fatal attempt to include C++ code on a compiler/machine combo that has not been set up to support C++) + endif +endif + +# Not clear how to escape commas for libraries with their own configure +# script, and they don't need this defined anyway, so leave this out of +# FPPDEFS. +ifeq ($(HAS_F2008_CONTIGUOUS),TRUE) + CONTIGUOUS_FLAG := -DUSE_CONTIGUOUS=contiguous, +else + CONTIGUOUS_FLAG := -DUSE_CONTIGUOUS= +endif + +ifdef CPRE + CONTIGUOUS_FLAG := $(subst $(comma),\\$(comma),$(CONTIGUOUS_FLAG)) + CONTIGUOUS_FLAG := $(patsubst -D%,$(CPRE)%,$(CONTIGUOUS_FLAG)) +endif + +ifndef AR + AR := ar +endif + +ifdef NETCDF_C_PATH + ifndef NETCDF_FORTRAN_PATH + $(error "NETCDF_C_PATH specified without NETCDF_FORTRAN_PATH") + endif + NETCDF_SEPARATE:=true + ifndef INC_NETCDF_C + INC_NETCDF_C:=$(NETCDF_C_PATH)/include + endif + ifndef INC_NETCDF_FORTRAN + INC_NETCDF_FORTRAN:=$(NETCDF_FORTRAN_PATH)/include + endif + ifndef LIB_NETCDF_C + LIB_NETCDF_C:=$(NETCDF_C_PATH)/lib + endif + ifndef LIB_NETCDF_FORTRAN + LIB_NETCDF_FORTRAN:=$(NETCDF_C_PATH)/lib + endif + else ifdef NETCDF_FORTRAN_PATH + $(error "NETCDF_FORTRAN_PATH specified without NETCDF_C_PATH") + else ifdef NETCDF_PATH + NETCDF_SEPARATE:=false + ifndef INC_NETCDF + INC_NETCDF:=$(NETCDF_PATH)/include + endif + ifndef LIB_NETCDF + LIB_NETCDF:=$(NETCDF_PATH)/lib + endif +else + # No Netcdf is an error unless target is clean or DEP + ifneq ($(MAKECMDGOALS), db_files) + ifneq ($(MAKECMDGOALS), db_flags) + ifeq (,$(findstring clean,$(MAKECMDGOALS))) + $(error NETCDF not found: Define NETCDF_PATH or NETCDF_C_PATH and NETCDF_FORTRAN_PATH in config_machines.xml or config_compilers.xml) + endif + endif + endif +endif + + +ifeq ($(MPILIB),mpi-serial) + ifdef PNETCDF_PATH + undefine PNETCDF_PATH + endif +else + ifdef PNETCDF_PATH + ifndef $(INC_PNETCDF) + INC_PNETCDF:=$(PNETCDF_PATH)/include + endif + ifndef LIB_PNETCDF + LIB_PNETCDF:=$(PNETCDF_PATH)/lib + endif + endif +endif +ifeq ($(strip $(USE_TRILINOS)), TRUE) + ifdef TRILINOS_PATH + ifndef INC_TRILINOS + INC_TRILINOS:=$(TRILINOS_PATH)/include + endif + ifndef LIB_TRILINOS + LIB_TRILINOS:=$(TRILINOS_PATH)/lib + endif + else + $(error TRILINOS_PATH must be defined when USE_TRILINOS is TRUE) + endif + + # get a bunch of variables related to this trilinos installation; + # these variables begin with "Trilinos_" + include $(INC_TRILINOS)/Makefile.export.Trilinos +endif + + +# Set HAVE_SLASHPROC on LINUX systems which are not bluegene or Darwin (OSx) + +ifeq ($(findstring -DLINUX,$(CPPDEFS)),-DLINUX) + ifneq ($(findstring DBG,$(CPPDEFS)),DBG) + ifneq ($(findstring Darwin,$(CPPDEFS)),Darwin) + CPPDEFS += -DHAVE_SLASHPROC + endif + endif +endif + +ifdef CPRE + FPPDEFS := $(subst $(comma),\\$(comma),$(CPPDEFS)) + FPPDEFS := $(patsubst -D%,$(CPRE)%,$(FPPDEFS)) +else + FPPDEFS := $(CPPDEFS) +endif + + +#=============================================================================== +# Set config args for pio and mct to blank and then enable serial +#=============================================================================== +ifndef CONFIG_ARGS + CONFIG_ARGS := +endif + +ifeq ($(findstring pio,$(MODEL)),pio) + CONFIG_ARGS+= --enable-timing + ifeq ($DEBUG,TRUE) + CONFIG_ARGS+= --enable-debug + endif +endif + +#=============================================================================== +# User-specified INCLDIR +#=============================================================================== + +INCLDIR := -I. +ifdef USER_INCLDIR + INCLDIR += $(USER_INCLDIR) +endif + +#=============================================================================== +# MPI-serial library (part of MCT) +#=============================================================================== + +ifeq ($(strip $(MPILIB)), mpi-serial) + CC := $(SCC) + FC := $(SFC) + CXX := $(SCXX) + MPIFC := $(SFC) + MPICC := $(SCC) + MPICXX := $(SCXX) + CONFIG_ARGS += MCT_PATH=$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial +else + CC := $(MPICC) + FC := $(MPIFC) + CXX := $(MPICXX) + ifdef MPI_PATH + INC_MPI := $(MPI_PATH)/include + LIB_MPI := $(MPI_PATH)/lib + endif +endif +CSM_SHR_INCLUDE:=$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/include +# This is needed so that dependancies are found +VPATH+=$(CSM_SHR_INCLUDE) +#=============================================================================== +# Set include paths (needed after override for any model specific builds below) +#=============================================================================== +INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CSM_SHR_INCLUDE) + +ifeq ($(NETCDF_SEPARATE), false) + INCLDIR += -I$(INC_NETCDF) +else ifeq ($(NETCDF_SEPARATE), true) + INCLDIR += -I$(INC_NETCDF_C) -I$(INC_NETCDF_FORTRAN) +endif +ifdef MOD_NETCDF + INCLDIR += -I$(MOD_NETCDF) +endif +ifdef INC_MPI + INCLDIR += -I$(INC_MPI) +endif +ifdef INC_PNETCDF + INCLDIR += -I$(INC_PNETCDF) +endif +ifdef INC_TRILINOS + INCLDIR += -I$(INC_TRILINOS) +endif + +ifndef MCT_LIBDIR + MCT_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef PIO_LIBDIR + PIO_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef GPTL_LIBDIR + GPTL_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef GLC_DIR + GLC_DIR=$(EXEROOT)/glc +endif +ifndef CISM_LIBDIR + CISM_LIBDIR=$(GLC_DIR)/lib +endif + +INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CIMEROOT)/src/share/util \ + -I$(CIMEROOT)/src/share/include -I$(CIMEROOT)/src/share/RandNum/include + +ifeq ($(MODEL),driver) + INCLDIR += -I$(EXEROOT)/atm/obj -I$(EXEROOT)/ice/obj -I$(EXEROOT)/ocn/obj -I$(EXEROOT)/glc/obj -I$(EXEROOT)/rof/obj -I$(EXEROOT)/wav/obj -I$(EXEROOT)/esp/obj +# nagfor and gcc have incompatible LDFLAGS. +# nagfor requires the weird "-Wl,-Wl,," syntax. +# If done in config_compilers.xml, we break MCT. + ifeq ($(strip $(COMPILER)),nag) + ifeq ($(NETCDF_SEPARATE), false) + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_PATH)/lib + else ifeq ($(NETCDF_SEPARATE), true) + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_C_PATH)/lib + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_FORTRAN_PATH)/lib + endif + endif +else + ifeq ($(strip $(COMPILER)),nag) + ifeq ($(DEBUG), TRUE) + ifeq ($(strip $(MACH)),hobart) + # GCC needs to be able to link to + # nagfor runtime to get autoconf + # tests to work. + CFLAGS += -Wl,--as-needed,--allow-shlib-undefined + SLIBS += -L$(COMPILER_PATH)/lib/NAG_Fortran -lf60rts + endif + endif + endif +endif + +# +# Use the MCT dir for the cache for all configure calls because it is the first one +# +CFLAGS+=$(CPPDEFS) +CXXFLAGS := $(CFLAGS) + +CONFIG_ARGS += CC="$(CC)" FC="$(FC)" MPICC="$(MPICC)" \ + MPIFC="$(MPIFC)" FCFLAGS="$(FFLAGS) $(FREEFLAGS) $(INCLDIR)" \ + CPPDEFS="$(CPPDEFS)" CFLAGS="$(CFLAGS) -I.. $(INCLDIR)" LDFLAGS="$(LDFLAGS)" + +ifeq ($(NETCDF_SEPARATE), false) + CONFIG_ARGS += NETCDF_PATH=$(NETCDF_PATH) +else ifeq ($(NETCDF_SEPARATE), true) + # The mct library needs the NetCDF_C library + CONFIG_ARGS += NETCDF_PATH=$(NETCDF_C_PATH) +endif + +ifeq ($(COMPILER),nag) + CONFIG_ARGS += LIBS="$(SLIBS)" +endif + +FFLAGS += $(FPPDEFS) +FFLAGS_NOOPT += $(FPPDEFS) + + +ifeq ($(findstring -cosp,$(CAM_CONFIG_OPTS)),-cosp) + # The following is for the COSP simulator code: + COSP_LIBDIR:=$(EXEROOT)/atm/obj/cosp +endif + +ifeq ($(MODEL),cam) + # These RRTMG files take an extraordinarily long time to compile with optimization. + # Until mods are made to read the data from files, just remove optimization from + # their compilation. +rrtmg_lw_k_g.o: rrtmg_lw_k_g.f90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< +rrtmg_sw_k_g.o: rrtmg_sw_k_g.f90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< + + +ifdef COSP_LIBDIR +INCLDIR+=-I$(COSP_LIBDIR) -I$(COSP_LIBDIR)/../ +$(COSP_LIBDIR)/libcosp.a: cam_abortutils.o + $(MAKE) -C $(COSP_LIBDIR) F90='$(FC)' F90FLAGS='$(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS) $(FC_AUTO_R8)' \ + F90FLAGS_noauto='$(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS)' \ + F90FLAGS_fixed='$(INCLDIR) $(INCS) $(FIXEDFLAGS) $(FFLAGS) $(FC_AUTO_R8)' + +cospsimulator_intr.o: $(COSP_LIBDIR)/libcosp.a +endif + +endif + +# Set esmf.mk location with ESMF_LIBDIR having precedent over ESMFMKFILE +CCSM_ESMFMKFILE := undefined_CCSM_ESMFMKFILE +ifdef ESMFMKFILE + CCSM_ESMFMKFILE := $(ESMFMKFILE) +endif +ifdef ESMF_LIBDIR + CCSM_ESMFMKFILE := $(ESMF_LIBDIR)/esmf.mk +endif + + +# System libraries (netcdf, mpi, pnetcdf, esmf, trilinos, etc.) + +ifeq ($(NETCDF_SEPARATE), false) + SLIBS += -L$(LIB_NETCDF) -lnetcdff -lnetcdf +else ifeq ($(NETCDF_SEPARATE), true) + SLIBS += -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf +endif + +ifdef LIB_PNETCDF + SLIBS += -L$(LIB_PNETCDF) -lpnetcdf +endif +ifdef LAPACK_LIBDIR + SLIBS += -L$(LAPACK_LIBDIR) -llapack -lblas +endif +ifdef LIB_MPI + ifndef MPI_LIB_NAME + SLIBS += -L$(LIB_MPI) -lmpi + else + SLIBS += -L$(LIB_MPI) -l$(MPI_LIB_NAME) + endif +endif + +# For compiling and linking with external ESMF. +# If linking to external ESMF library then include esmf.mk +# ESMF_F90COMPILEPATHS +# ESMF_F90LINKPATHS +# ESMF_F90LINKRPATHS +# ESMF_F90ESMFLINKLIBS +ifeq ($(USE_ESMF_LIB), TRUE) + -include $(CCSM_ESMFMKFILE) + FFLAGS += $(ESMF_F90COMPILEPATHS) + SLIBS += $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) $(ESMF_F90ESMFLINKLIBS) +endif + +# Add trilinos libraries; too be safe, we include all libraries included in the trilinos build, +# as well as all necessary third-party libraries +ifeq ($(strip $(USE_TRILINOS)), TRUE) + SLIBS += -L$(LIB_TRILINOS) $(Trilinos_LIBRARIES) $(Trilinos_TPL_LIBRARY_DIRS) $(Trilinos_TPL_LIBRARIES) +endif + +# Add libraries and flags that we need on the link line when C++ code is included +# We need to do these additions after CONFIG_ARGS is set, because they can sometimes break configure for mct, etc., +# if they are added to LDFLAGS in CONFIG_ARGS. +ifeq ($(USE_CXX), true) + ifdef CXX_LIBS + SLIBS += $(CXX_LIBS) + endif + + ifdef CXX_LDFLAGS + LDFLAGS += $(CXX_LDFLAGS) + endif +endif + +# Machine stuff to appear last on the link step +ifndef MLIBS + MLIBS := +endif + +#------------------------------------------------------------------------------ +# Drive configure scripts for support libraries (mct) +#------------------------------------------------------------------------------ + +$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/Makefile.conf: + @echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \ + $(CONFIG_SHELL) $(CIMEROOT)/src/externals/mct/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/src/externals/mct + +$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial/Makefile.conf: + @echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \ + $(CONFIG_SHELL) $(CIMEROOT)/src/externals/mct/mpi-serial/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/src/externals/mct/mpi-serial + +ifeq ($(PIO_VERSION),2) +# This is a pio2 library + PIOLIB = $(PIO_LIBDIR)/libpiof.a $(PIO_LIBDIR)/libpioc.a + PIOLIBNAME = -lpiof -lpioc + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio2 +else +# This is a pio1 library + PIOLIB = $(PIO_LIBDIR)/libpio.a + PIOLIBNAME = -lpio + ifneq ("$(wildcard $(CIMEROOT)/src/externals/pio1/pio)", "") + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio1 + else + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio1/pio + endif +endif + +MCTLIBS = $(MCT_LIBDIR)/libmct.a $(MCT_LIBDIR)/libmpeu.a + +GPTLLIB = $(GPTL_LIBDIR)/libgptl.a + +ULIBS += -L$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/lib -lcsm_share -L$(INSTALL_SHAREDPATH)/lib $(PIOLIBNAME) -lgptl -lmct -lmpeu + +#------------------------------------------------------------------------------ +# Drive cmake script for cism and pio +#------------------------------------------------------------------------------ + +ifndef CMAKE_OPTS + CMAKE_OPTS := +endif +# note that the fortran flags include neither the FREEFLAGS nor the +# FIXEDFLAGS, so that both free & fixed code can be built (cmake +# doesn't seem to be able to differentiate between free & fixed +# fortran flags) +CMAKE_OPTS += -D CMAKE_Fortran_FLAGS:STRING="$(FFLAGS) $(INCLDIR)" \ + -D CMAKE_C_FLAGS:STRING="$(CFLAGS) $(INCLDIR)" \ + -D CMAKE_CXX_FLAGS:STRING="$(CXXFLAGS) $(INCLDIR)" \ + -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -D GPTL_PATH:STRING=$(INSTALL_SHAREDPATH) \ + -D PIO_ENABLE_TESTS:BOOL=OFF \ + -D USER_CMAKE_MODULE_PATH:LIST="$(CIMEROOT)/src/CMake;$(CIMEROOT)/src/externals/pio2/cmake" \ + +# Allow for separate installations of the NetCDF C and Fortran libraries +ifeq ($(NETCDF_SEPARATE), false) + CMAKE_OPTS += -D NetCDF_PATH:PATH=$(NETCDF_PATH) +else ifeq ($(NETCDF_SEPARATE), true) + CMAKE_OPTS += -D NetCDF_C_PATH:PATH=$(NETCDF_C_PATH) \ + -D NetCDF_Fortran_DIR:PATH=$(NETCDF_FORTRAN_PATH) +endif + +ifdef PNETCDF_PATH + CMAKE_OPTS += -D PnetCDF_PATH:STRING="$(PNETCDF_PATH)" +else + CMAKE_OPTS += -D WITH_PNETCDF:LOGICAL=FALSE -D PIO_USE_MPIIO:LOGICAL=FALSE +endif + +# NAG doesn't get along too nicely with PnetCDF Fortran interfaces. +ifeq ($(COMPILER),nag) + ifeq ($(PIO_VERSION),1) + CMAKE_OPTS += -D WITH_PNETCDF:LOGICAL=FALSE -D PIO_USE_MPIIO:LOGICAL=FALSE + endif +endif + +ifdef PIO_FILESYSTEM_HINTS + CMAKE_OPTS += -D PIO_FILESYSTEM_HINTS:STRING="$(PIO_FILESYSTEM_HINTS)" +endif + +# This captures the many cism-specific options to cmake +CMAKE_OPTS += $(USER_CMAKE_OPTS) + +# CMake doesn't seem to like it when you define compilers via -D +# CMAKE_C_COMPILER, etc., when you rerun cmake with an existing +# cache. So doing this via environment variables instead. +ifndef CMAKE_ENV_VARS + CMAKE_ENV_VARS := +endif +CMAKE_ENV_VARS += CC=$(CC) \ + CXX=$(CXX) \ + FC=$(FC) \ + LDFLAGS="$(LDFLAGS)" + + +# We declare $(GLC_DIR)/Makefile to be a phony target so that cmake is +# always rerun whenever invoking 'make $(GLC_DIR)/Makefile'; this is +# desirable to pick up any new source files that may have been added +.PHONY: $(GLC_DIR)/Makefile +$(GLC_DIR)/Makefile: + cd $(GLC_DIR); \ + $(CMAKE_ENV_VARS) cmake $(CMAKE_OPTS) $(CIMEROOT)/../components/cism/glimmer-cism + +$(PIO_LIBDIR)/Makefile: + cd $(PIO_LIBDIR); \ + $(CMAKE_ENV_VARS) cmake $(CMAKE_OPTS) $(PIO_SRC_DIR) + +#------------------------------------------------------------------------------- +# Build & include dependency files +#------------------------------------------------------------------------------- + +touch_filepath: + touch Filepath + +# Get list of files and build dependency file for all .o files +# using perl scripts mkSrcfiles and mkDepends +# if a source is of form .F90.in strip the .in before creating the list of objects +SOURCES := $(shell cat Srcfiles) +BASENAMES := $(basename $(basename $(SOURCES))) +OBJS := $(addsuffix .o, $(BASENAMES)) +INCS := $(foreach dir,$(cpp_dirs),-I$(dir)) + +CASETOOLS := $(CASEROOT)/Tools + +Depends: Srcfiles Deppath + $(CASETOOLS)/mkDepends $(USER_MKDEPENDS_OPTS) Deppath Srcfiles > $@ + +Deppath: Filepath + $(CP) -f Filepath $@ + @echo "$(MINCROOT)" >> $@ + +Srcfiles: Filepath + $(CASETOOLS)/mkSrcfiles + +Filepath: + @echo "$(VPATH)" > $@ + + +#------------------------------------------------------------------------------- +# echo file names, paths, compile flags, etc. used during build +#------------------------------------------------------------------------------- + +db_files: + @echo " " + @echo "* MACFILE := $(MACFILE)" + @echo "* VPATH := $(VPATH)" + @echo "* INCS := $(INCS)" + @echo "* OBJS := $(OBJS)" +db_flags: + @echo " " + @echo "* cc := $(CC) $(CFLAGS) $(INCS) $(INCLDIR)" + @echo "* .F.o := $(FC) $(FFLAGS) $(FIXEDFLAGS) $(INCS) $(INCLDIR)" + @echo "* .F90.o := $(FC) $(FFLAGS) $(FREEFLAGS) $(INCS) $(INCLDIR)" + ifeq ($(USE_CXX), true) + @echo "* .cpp.o := $(CXX) $(CXXFLAGS) $(INCS) $(INCLDIR)" + endif + +#------------------------------------------------------------------------------- +# Rules used for the tests run by "configure -test" +#------------------------------------------------------------------------------- + +test_fc: test_fc.o + $(LD) -o $@ test_fc.o $(LDFLAGS) +ifeq ($(NETCDF_SEPARATE), false) +test_nc: test_nc.o + $(LD) -o $@ test_nc.o -L$(LIB_NETCDF) -lnetcdff -lnetcdf $(LDFLAGS) +else ifeq ($(NETCDF_SEPARATE), true) +test_nc: test_nc.o + $(LD) -o $@ test_nc.o -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf $(LDFLAGS) +endif +test_mpi: test_mpi.o + $(LD) -o $@ test_mpi.o $(LDFLAGS) +test_esmf: test_esmf.o + $(LD) -o $@ test_esmf.o $(LDFLAGS) + +#------------------------------------------------------------------------------- +# create list of component libraries +#------------------------------------------------------------------------------ +CLMVER = $(filter $(CLM_CONFIG_OPTS), clm5_0 clm4_5) +ifeq ($(CLMVER),$(null)) + LNDOBJDIR = $(EXEROOT)/lnd/obj + LNDLIBDIR=$(LIBROOT) + LNDLIB := liblnd.a + INCLDIR += -I$(LNDOBJDIR) +else + LNDOBJDIR = $(SHAREDLIBROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/clm/obj + LNDLIBDIR = $(EXEROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/lib + LNDLIB := libclm.a + INCLDIR += -I$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/include + ifeq ($(MODEL),clm) + INCLUDE_DIR = $(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/include + endif +endif + + +ifeq ($(ULIBDEP),$(null)) + ifneq ($(LIBROOT),$(null)) + ULIBDEP += $(LIBROOT)/libatm.a + ULIBDEP += $(LIBROOT)/libice.a + ULIBDEP += $(LNDLIBDIR)/$(LNDLIB) + ULIBDEP += $(LIBROOT)/libocn.a + ULIBDEP += $(LIBROOT)/librof.a + ULIBDEP += $(LIBROOT)/libglc.a + ULIBDEP += $(LIBROOT)/libwav.a + ULIBDEP += $(LIBROOT)/libesp.a + ifeq ($(COMP_GLC), cism) + ULIBDEP += $(CISM_LIBDIR)/libglimmercismfortran.a + ifeq ($(CISM_USE_TRILINOS), TRUE) + ULIBDEP += $(CISM_LIBDIR)/libglimmercismcpp.a + endif + endif + ifeq ($(OCN_SUBMODEL),moby) + ULIBDEP += $(LIBROOT)/libmoby.a + endif + endif +endif + +ifdef COSP_LIBDIR + ULIBDEP += $(COSP_LIBDIR)/libcosp.a +endif + + +ifndef CLIBS + ifdef ULIBDEP + # For each occurrence of something like /path/../foo/libbar.a in ULIBDEP, + # CLIBS will contain -L/path/../foo -lbar + CLIBS := $(foreach LIBDEP,$(strip $(ULIBDEP)), -L$(dir $(LIBDEP)) $(patsubst lib%.a,-l%,$(notdir $(LIBDEP)))) + endif +endif + +# libcsm_share.a is in ULIBDEP, but -lcsm_share is in ULIBS rather than CLIBS, +# so this needs to be added after creating CLIBS above +CSMSHARELIB = $(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/lib/libcsm_share.a +ULIBDEP += $(CSMSHARELIB) + +#------------------------------------------------------------------------------- +# build rules: +#------------------------------------------------------------------------------- + +.SUFFIXES: +.SUFFIXES: .F90 .F .f90 .f .c .cpp .o .in + +ifeq ($(MPILIB),mpi-serial) + MPISERIAL = $(INSTALL_SHAREDPATH)/lib/libmpi-serial.a + MLIBS += $(MPISERIAL) + CMAKE_OPTS += -DMPI_C_INCLUDE_PATH=$(INSTALL_SHAREDPATH)/include \ + -DMPI_Fortran_INCLUDE_PATH=$(INSTALL_SHAREDPATH)/include \ + -DMPI_C_LIBRARIES=$(INSTALL_SHAREDPATH)/lib/libmpi-serial.a \ + -DMPI_Fortran_LIBRARIES=$(INSTALL_SHAREDPATH)/lib/libmpi-serial.a +endif + +$(MCTLIBS) : $(MPISERIAL) + +$(PIOLIB) : $(MPISERIAL) $(GPTLLIB) + +$(CSMSHARELIB): $(MCTLIBS) $(PIOLIB) $(GPTLLIB) +ifneq ($(MODEL),csm_share) + $(OBJS): $(CSMSHARELIB) +endif + +$(EXEC_SE): $(OBJS) $(ULIBDEP) $(CSMSHARELIB) $(MCTLIBS) $(PIOLIB) $(GPTLLIB) + $(LD) -o $(EXEC_SE) $(OBJS) $(CLIBS) $(ULIBS) $(SLIBS) $(MLIBS) $(LDFLAGS) + +ifdef INCLUDE_DIR + $(COMPLIB): $(OBJS) + $(AR) -r $(COMPLIB) $(OBJS) + $(CP) *.$(MOD_SUFFIX) *.h $(INCLUDE_DIR) +else + $(COMPLIB): $(OBJS) + $(AR) -r $(COMPLIB) $(OBJS) +endif + +.c.o: + $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) $< +.F.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FIXEDFLAGS) $< +.f.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FIXEDFLAGS) $< +.f90.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $< +.F90.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) $< + +.cpp.o: + $(CXX) -c $(INCLDIR) $(INCS) $(CXXFLAGS) $< + +%.F90: %.F90.in + $(CIMEROOT)/src/externals/genf90/genf90.pl $< > $@ + +cleanatm: + $(RM) -f $(LIBROOT)/libatm.a + $(RM) -fr $(EXEROOT)/atm/obj + +cleancpl: + $(RM) -fr $(EXEROOT)/cpl/obj + +cleanocn: + $(RM) -f $(LIBROOT)/libocn.a + $(RM) -fr $(EXEROOT)/ocn/obj + +cleanwav: + $(RM) -f $(LIBROOT)/libwav.a + $(RM) -fr $(EXEROOT)/wav/obj + +cleanglc: + $(RM) -f $(LIBROOT)/libglc.a + $(RM) -fr $(EXEROOT)/glc + +cleanesp: + $(RM) -f $(LIBROOT)/libesp.a + $(RM) -fr $(EXEROOT)/esp/obj + +cleanice: + $(RM) -f $(LIBROOT)/libice.a + $(RM) -fr $(EXEROOT)/ice/obj + +cleanrof: + $(RM) -f $(LIBROOT)/librof.a + $(RM) -fr $(EXEROOT)/rof/obj + +cleanlnd: + $(RM) -f $(LNDLIBDIR)/$(LNDLIB) + $(RM) -fr $(LNDOBJDIR) + +cleancsmshare: + $(RM) -f $(CSMSHARELIB) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/csm_share + +cleanpio: + $(RM) -f $(PIO_LIBDIR)/libpio* + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/pio + +cleanmct: + $(RM) -f $(MCTLIBS) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/mct + +cleangptl: + $(RM) -f $(GPTLLIB) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/gptl + +clean: cleanatm cleanocn cleanwav cleanglc cleanesp cleanice cleanrof cleanlnd + +realclean: clean cleancsmshare cleanpio cleanmct cleangptl + +# the if-tests prevent DEPS files from being created when they're not needed +ifneq ($(MAKECMDGOALS), db_files) +ifneq ($(MAKECMDGOALS), db_flags) +ifeq (,$(findstring clean,$(MAKECMDGOALS))) + -include Depends $(CASEROOT)/Depends.$(COMPILER) $(CASEROOT)/Depends.$(MACH) +endif +endif +endif diff --git a/README b/README new file mode 100644 index 0000000000..3bafbe274e --- /dev/null +++ b/README @@ -0,0 +1,15 @@ +config_pes_pop.xml +current assumptions: + prognostic: pop, cice + data: datm, drof + stub: slnd, sglc +DATM.+XLND.+CICE.+POP.+DROF.+SGLC +The current attributes that are supported are + lcompset_matchN= (where N can be any number) + pecount=[S,M,L,XL] + +Please refer to the documentation in the config_machines.xml and config_compilers.xml files. + + + + diff --git a/config_batch.xml b/config_batch.xml new file mode 100644 index 0000000000..afbfadb93e --- /dev/null +++ b/config_batch.xml @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + + + + qstat + qsub + + (\d+) + --dependencies + %H:%M:%s + -M + + + + + + + + + + + + + + + qstat + qsub + #COBALT + (\d+) + --dependencies + -M + + + + + + + + + + + + + bjobs + bsub + < + #BSUB + <(\d+)> + -w 'done(jobid)' + %H:%M + -u + + + + + + + + + -n {{ total_tasks }} + -R "span[ptile={{ tasks_per_node }}]" + -N + -a {{ poe }} + -o {{ output_error_path }}.%J + -e {{ output_error_path }}.%J + -J {{ job_id }} + + + + + qstat + qsub + #PBS + ^(\S+)$ + -W depend=afterok:jobid + %H:%M:%S + -M + -m + , bea, b, e, a + + + + + + + -N {{ job_id }} + -r {{ rerunnable }} + + -j oe + -V + + + + + squeue + #SBATCH + (\d+)$ + --dependency=afterok:jobid + %H:%M:%S + --mail-user + --mail-type + none, all, begin, end, fail + + + + + + + --job-name={{ job_id }} + --nodes={{ num_nodes }} + --ntasks-per-node={{ tasks_per_node }} + --output={{ output_error_path }} + --exclusive + + + + + + + -S {{ shell }} + + + + + + + -S {{ shell }} + + + + + + + -S {{ shell }} + + + batch + + + + + + + -l nodes={{ num_nodes }}:ppn={{ tasks_per_node }}:xe + -S {{ shell }} + + + regular + debug + + + + + + + -S {{ shell }} + + + + + + ^(\d+) + + -A $PROJECT + -l mppwidth={{ mppwidth }} + -l nodes={{ num_nodes }} + -S {{ shell }} + + + + + + + -S {{ shell }} + + + + + + + -A cpo + -l {{ partition }} + -l size={{ mppsize }} + -E + -d $RUNDIR + -o $RUNDIR/$CASE.out + -S /bin/bash + + + debug + batch + + + + + + + -l nodes={{ num_nodes }}:ppn={{ tasks_per_node }} + -S {{ shell }} + + + short + medium + long + overnight + monster + + + + + + sbatch + #MSUB + + -A ees + -l gres=lscratchd + + + + + + -S {{ shell }} + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} + + + regular + + + + + + -S {{ shell }} + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} + + + regular + + + + + + default + + + + + + default + + + + + sbatch + + queue + + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=bro + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=has + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=ivy + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=san + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + sbatch + + ec + + + + + + sbatch + #MSUB + + + -A ees + -l nodes={{ num_nodes }} + -l gres=lscratchd + + + + + sbatch + + batch + + + + + sbatch + + -C haswell + + + regular + + + + + + sbatch + + -C knl,quad,cache + -S 2 + + + regular + + + + + + sbatch + + regular + debug + + + + + ssh stampede.tacc.utexas.edu cd $CASEROOT ; sbatch + + normal + development + + + + + sbatch + + default + + + + + + + -S {{ shell }} + + + + + sbatch + + + + + caldera + regular + capability + premium + + + + + + + + $BUILD_COMPLETE and not $TEST + + + + $BUILD_COMPLETE and $TEST + + + + 1 + + case.run or case.test + $DOUT_S + + + + diff --git a/config_compilers.xml b/config_compilers.xml new file mode 100644 index 0000000000..d77e399b2c --- /dev/null +++ b/config_compilers.xml @@ -0,0 +1,1073 @@ + + + + + + + -DOS + -D_USE_FLOW_CONTROL + + FALSE + + + + + -h noomp + -g -O0 + -O2 + + + + -DFORTRANUNDERSCORE -DNO_R16 -DCPRCRAY + -DDIR=NOOP + -DDIR=NOOP + + + -s real64 + + + -f free -N 255 -h byteswapio -x dir + -h noomp + -g -O0 -K trap=fp -m1 + -O2,ipa2 -em + + + -O1,fp2,ipa0,scalar0,vector0 + + TRUE + + -Wl,--allow-multiple-definition -h byteswapio + + + + + + -std=gnu99 + -fopenmp + -g -Wall -Og -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds + -O + + + + -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU + + FORTRAN + + -fdefault-real-8 + + + + -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none + -fopenmp + + -g -Wall -Og -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds + -O + + + -O0 + + + -ffixed-form + + + -ffree-form + + FALSE + + -fopenmp + + mpicc + mpicxx + mpif90 + gcc + g++ + gfortran + TRUE + + + + + -g -qfullpath -qmaxmem=-1 + -O3 + -qsmp=omp + -qsmp=omp:noopt + + + + -DFORTRAN_SAME -DCPRIBM + + -WF,-D + + -qrealsize=8 + + + -g -qfullpath -qmaxmem=-1 + -O2 -qstrict -qinline=auto + -qsmp=omp + -qinitauto=7FF7FFFF -qflttrap=ov:zero:inv:en + -qsmp=omp:noopt + -C + + + -qsuffix=f=f -qfixed=132 + + + -qsuffix=f=f90:cpp=F90 + + TRUE + + -qsmp=omp + -qsmp=omp:noopt + + + + + + -qno-opt-dynamic-align -fp-model precise -std=gnu99 + -qopenmp + -O2 -debug minimal + -O0 -g + + + + -DFORTRANUNDERSCORE -DCPRINTEL + + + -cxxlib + + FORTRAN + + -r8 + + + -qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source + -qopenmp + -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created + -O2 -debug minimal + + + -O0 + -qopenmp + + + -fixed -132 + + + -free + + TRUE + + -qopenmp + + mpicc + mpicxx + mpif90 + icc + icpc + ifort + + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl + + TRUE + + + + + -std=gnu99 + -g + + + -DFORTRANUNDERSCORE -DNO_CRAY_POINTERS -DNO_SHR_VMATH -DCPRNAG + + + -r8 + + + + + -Wp,-macro=no_com -convert=BIG_ENDIAN -indirect $ENV{CIMEROOT}/config/cesm/machines/nag_mpi_argument.txt + + -ieee=full -O2 + + + -C=all -g -time -f2003 -ieee=stop + -gline + + -mismatch_all + + + -Wp,-macro=no_com -convert=BIG_ENDIAN -indirect $ENV{CIMEROOT}/config/cesm/machines/nag_mpi_argument.txt + -ieee=full + + + + -g -time -f2003 -ieee=stop + -gline + + + -fixed + + + -free + + FALSE + mpicc + mpif90 + gcc + nagfor + + + + + -gopt -time + -mp + + + + + + + + + + + + + + + + + + + + + + + + + + + + -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16 -DCPRPGI + + CXX + + -r8 + + + -i4 -gopt -time -Mextend -byteswapio -Mflushz -Kieee + -mp + -O0 -g -Ktrap=fp -Mbounds -Kieee + -Mnovect + -Mnovect + -Mnovect + -Mnovect + -Mnovect + -Mnovect + + + -O0 -g -Ktrap=fp -Mbounds -Kieee + -mp + + + -Mfixed + + + -Mfree + + + + FALSE + + -time -Wl,--allow-multiple-definition + -mp + + mpicc + mpicxx + mpif90 + pgcc + pgc++ + pgf95 + + + + + -qarch=auto -qtune=auto -qcache=auto + + /usr/bin/bash + + -qarch=auto -qtune=auto -qcache=auto -qsclk=micro + -qspill=6000 + + + -qsigtrap=xl__trcedump + -bdatapsize:64K -bstackpsize:64K -btextpsize:32K + + mpcc_r + mpxlf2003_r + cc_r + xlf2003_r + + -lmassv -lessl + -lmass + + + + + + --build=powerpc-bgp-linux --host=powerpc64-suse-linux + + + -DLINUX + + + -g -qfullpath -qmaxmem=-1 -qspillsize=2500 -qextname=flush + -O3 -qstrict -qinline=auto + -qsmp=omp + -qsmp=omp:noopt + + + -Wl,--relax -Wl,--allow-multiple-definition + + + + + + -DCMAKE_SYSTEM_NAME=Catamount + + + -DLINUX + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + cc + CC + ftn + $ENV{NETCDF_DIR} + lustre + $ENV{PARALLEL_NETCDF_DIR} + cc + CC + ftn + + + + + -DSYSDARWIN + + + + + + -heap-arrays + + + + + + -DHAVE_PAPI + + lustre + + + + + -O2 + -nofma + + + -lmpichf90_pgi $ENV{PGI_PATH}/linux86-64/$ENV{PGI_VERSION}/lib/f90main.o + + + -O2 + -nofma + + TRUE + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi -L$ENV{MKL_PATH} -lmkl_rt + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + --host=Linux + + + -xCORE-AVX2 + + + -xCORE-AVX2 + + + -L$(NETCDF_DIR) -lnetcdff -Wl,--as-needed,-L$(NETCDF_DIR)/lib -lnetcdff -lnetcdf + + + -DHAVE_PAPI -DHAVE_SLASHPROC + + + -mkl + + + FALSE + + + + + + --host=Linux + + + -xMIC-AVX512 + + + -xMIC-AVX512 + + + -L$(NETCDF_DIR) -lnetcdff -Wl,--as-needed,-L$(NETCDF_DIR)/lib -lnetcdff -lnetcdf + + + -DHAVE_SLASHPROC + + + -mkl -lmemkind -zmuldefs + + + FALSE + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 + -nomp + + + --host=Linux + + + -DLINUX + + + -O2 + -nomp + + + -nomp + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 + + + --host=Linux + + + -DHAVE_PAPI + + + -O2 + + + -L$ENV{NETCDF_DIR} -lnetcdff -Wl,--as-needed,-L$ENV{NETCDF_DIR}/lib -lnetcdff -lnetcdf + + + + + + -O2 + + + -O2 + + + -Wl,-rpath /usr/local/tools/netcdf-pgi-4.1.3/lib + + mpich + /usr/local/tools/mvapich2-pgi-1.7/ + /usr/local/tools/netcdf-pgi-4.1.3 + + $SHELL{/usr/local/tools/netcdf-pgi-4.1.3/bin/nc-config --flibs} + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + /usr/lib64 + mpich + $ENV{NETCDF_PATH} + + -L$NETCDF_PATH/lib -lnetcdff -lnetcdf + + + + + + -lifcore + + + -lifcore + -mcmodel medium + + + -lquadmath + -Wl,-rpath,${NETCDF_PATH}/lib + -Wl,-rpath,$ENV{COMPILER_PATH}/lib/intel64 + -Wl,-rpath,$ENV{COMPILER_PATH}/mkl/lib/intel64 + -Wl,-rpath,$ENV{MPI_PATH}/lib + -lifcore + + + -mkl=cluster + + /fs/cgd/csm/tools/pFUnit/pFUnit3.2.8_hobart_Intel15.0.2_noMPI_noOpenMP + + + + + + -DNO_C_SIZEOF + + + -lpthread + + + -L/usr/local/nag/lib/NAG_Fortran + + + + + + -O0 + + + -O0 + + + -lgomp + -Wl,-R${NETCDF_PATH}/lib + -Wl,-R$ENV{COMPILER_PATH}/lib + -Wl,-R$ENV{COMPILER_PATH}/libso + + + + + + -lm + -ldl + + + + + mpixlc_r + mpixlf2003_r + /bgsys/local/netcdf/ + gpfs + /bgsys/local/parallel-netcdf/v1.3.1 + mpixlc_r + mpixlf2003_r + + -L/bgsys/local/netcdf/lib -lnetcdf -L/bgsys/drivers/ppcfloor/comm/lib + + + + + /projects/install/rhel6-x86_64/ACME/AlbanyTrilinos/Albany/build/install + + -O2 + + + --host=Linux + + + -lstdc++ -lmpi_cxx + + + -O2 + + $ENV{NETCDFROOT} + $ENV{PNETCDFROOT} + + $SHELL{${NETCDF_PATH}/bin/nf-config --flibs} -lblas -llapack + + + + + + -qfloat=nomaf + + + -qfloat=nomaf + + $ENV{HDF5} + + + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf77_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlc_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf2003_r + /soft/libraries/netcdf/4.3.3-f4.4.1/cnk-xl/current/ + gpfs + /soft/libraries/pnetcdf/1.6.1/cnk-xl/current/ + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlc_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf2003_r + + -L${NETCDF_PATH}/lib -lnetcdff -lnetcdf -L$ENV{HDF5}/lib -lhdf5_hl -lhdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -L/soft/libraries/alcf/current/xl/LAPACK/lib -llapack -L/soft/libraries/alcf/current/xl/BLAS/lib -lblas -L/bgsys/drivers/ppcfloor/comm/sys/lib + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_LIB}/.. + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 -xCORE-AVX2 + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xCORE-AVX2 + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xAVX + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xAVX + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -Wl,-rpath /usr/local/tools/netcdf-pgi-4.1.3/lib + + mpich + /usr/local/tools/mvapich2-pgi-1.7/ + /usr/local/tools/netcdf-pgi-4.1.3 + + $SHELL{/usr/local/tools/netcdf-pgi-4.1.3/bin/nc-config --flibs} + + + + + + -O2 + + + --host=Linux + + /projects/ccsm/esmf-6.3.0rp1/lib/libO/Linux.intel.64.openmpi.default + + -O2 + + $ENV{NETCDFROOT} + lustre + $ENV{PNETCDFROOT} + + -L${NETCDF_PATH}/lib -lnetcdff -L/projects/ccsm/BLAS-intel -lblas_LINUX + + + + + + -DHAVE_NANOTIME + + $ENV{TACC_NETCDF_DIR} + lustre + $ENV{TACC_PNETCDF_DIR} + + + + + -xHost + + + -xHost + -mcmodel medium + + + -L$ENV{TACC_HDF5_LIB} -lhdf5 + + + $SHELL{${NETCDF_PATH}/bin/nf-config --flibs} -L$ENV{TACC_HDF5_LIB} -lhdf5 + + $ENV{TRILINOS_PATH} + + + + + -xMIC-AVX512 + + + -xMIC-AVX512 + + + --host=Linux + + + -L$(NETCDF_DIR)/lib -lnetcdff -L$(NETCDF_DIR)/lib -lnetcdf -Wl,-rpath -Wl,$(NETCDF_DIR)/lib + + + + + + /soft/libraries/hdf5/1.8.10/cnk-xl/current/ + + + mpixlf77_r + mpixlc_r + mpixlf2003_r + /soft/libraries/netcdf/4.3.0-f4.2/cnk-xl/V1R2M0-20131211/ + gpfs + /soft/libraries/pnetcdf/1.3.1/cnk-xl/current/ + mpixlc_r + mpixlf2003_r + + -L${NETCDF_PATH}/lib -lnetcdff -lnetcdf -L/soft/libraries/hdf5/1.8.10/cnk-xl/current/lib -lhdf5_hl -lhdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -L/soft/libraries/alcf/current/xl/LAPACK/lib -llapack -L/soft/libraries/alcf/current/xl/BLAS/lib -lblas -L/bgsys/drivers/ppcfloor/comm/sys/lib + + + + + + + + + + + + + + USERDEFINED_MUST_EDIT_THIS + + + # USERDEFINED $SHELL{${NETCDF_PATH}/bin/nc-config --flibs} + + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + + -DNO_MPIMOD + + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + -qopt-report -xCORE_AVX2 -no-fma + + + -qopt-report -xCORE_AVX2 -no-fma + + + -DPIO_ENABLE_LOGGING=ON + + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_noMPI_noOpenMP + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_MPI_openMP + + FALSE + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + -vec-report + + + -vec-report + + + -DPIO_ENABLE_LOGGING=ON + + + + + /glade/apps/opt/lib + gcc + gfortran + + + + + -xHost + + + -DINTEL_MKL -DHAVE_SSE2 + + + -xHost + + mpiicpc + /glade/apps/opt/papi/5.3.0/intel/12.1.5/include/ + /glade/apps/opt/papi/5.3.0/intel/12.1.5/lib64 + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.1_yellowstone_Intel15.0.1_noMPI_noOpenMP + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.1_Intel15.0.1_MPI + + icc + ifort + ${MPICC} + ${MPIFC} + + -Wl,-rpath ${PAPI_LIB} -L${PAPI_LIB} -lpapi + + $ENV{TRILINOS_PATH} + + + + + -O + + + -O + + + -llapack -lblas + + pgcc + pgfortran + + + diff --git a/config_machines.xml b/config_machines.xml new file mode 100644 index 0000000000..0960de8e9d --- /dev/null +++ b/config_machines.xml @@ -0,0 +1,1792 @@ + + + + + + + + ORNL XE6, os is CNL, 32 pes/node, batch system is PBS + h2o + CNL + pgi,cray,gnu + mpich + /scratch/sciteam/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/inputdata/atm/datm7 + /scratch/sciteam/$USER/archive/$CASE + $ENV{CESMDATAROOT}/ccsm_baselines + $ENV{CESMDATAROOT}/tools/ccsm_cprnc/cprnc + 8 + pbs + cseg + 32 + 16 + TRUE + + aprun + + -n $TOTALPES + + -N $PES_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/3.2.10.3/bin/modulecmd perl + /opt/modules/3.2.10.3/bin/modulecmd python + module + module + + PrgEnv-pgi + PrgEnv-cray + PrgEnv-gnu + pgi + cray + + + PrgEnv-pgi + pgi pgi/16.3.0 + + + PrgEnv-gnu/4.2.84 + gcc gcc/4.8.2 + + + PrgEnv-cray + cce cce/8.4.6 + + + papi/5.3.2 + cray-mpich cray-mpich/7.3.3 + cray-libsci cray-libsci/16.03.1 + torque/6.0.2 + + + cray-netcdf-hdf5parallel/4.4.0 + cray-parallel-netcdf/1.7.0 + + + cray-netcdf/4.4.0 + + + cmake/3.1.3 + darshan + /sw/modulefiles/CESM + CESM-ENV + + + + 64M + + + + + Brutus Linux Cluster ETH (pgi(9.0-1)/intel(10.1.018) with openi(1.4.1)/mvapich2(1.4rc2), 16 pes/node, batch system LSF, added by UB + LINUX + pgi,intel + openmpi,mpich + /cluster/work/uwis/$USER + /cluster/work/uwis/ccsm/inputdata + /cluster/work/uwis/ccsm/inputdata/atm/datm7 + /cluster/work/uwis/$USER/archive/$CASE + /cluster/work/uwis/ccsm/ccsm_baselines + /cluster/work/uwis/ccsm/tools/cprnc/cprnc + 1 + lsf + tcraig -at- ucar.edu + 16 + 16 + + mpirun + + -hostfile $ENV{PBS_JOBID} + -ppn $PES_PER_NODE + -n $TOTALPES + + + + ompirun + + + + + /etc/profile.d/modules.perl + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + + /usr/bin/modulecmd perl + module + module + + + + + intel/10.1.018 + + + pgi/9.0-1 + + + mvapich2/1.4rc2 + + + open_mpi/1.4.1 + + + netcdf/4.0.1 + + + + 64M + + + + + NCAR SGI platform, os is Linux, 36 pes/node, batch system is PBS + .*.cheyenne.ucar.edu + LINUX + intel,gnu + mpt,openmpi + /glade/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/cesm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc.cheyenne + 8 + pbs + cseg + + 36 + 36 + TRUE + + mpiexec_mpt + + -np $TOTALPES + -p "%g:" + + omplace -tm open64 + + + + mpirun + + -np $TOTALPES + + + + + /opt/sgi/mpt/mpt-2.15/bin/mpirun $ENV{UNIT_TEST_HOST} -np 1 + + + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/perl + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/env_modules_python.py + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/csh + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/sh + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/libexec/lmod perl + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.2 + + + intel/17.0.1 + esmf_libs + mkl + + + esmf-7.0.0-defio-mpi-g + + + esmf-7.0.0-defio-mpi-O + + + esmf-7.0.0-ncdfio-uni-g + + + esmf-7.0.0-ncdfio-uni-O + + + gnu/6.3.0 + openblas/0.2.14 + + + mpt/2.15f + netcdf-mpi/4.4.1.1 + pnetcdf/1.8.0 + + + openmpi/2.1.0 + netcdf/4.4.1.1 + + + ncarcompilers/0.4.1 + + + netcdf/4.4.1.1 + + + + 256M + /glade/scratch/$USER + 16 + + + + false + + + -1 + + + + + PNL Haswell cluster, OS is Linux, batch system is SLURM + LINUX + intel,pgi + mvapich2,openmpi,intelmpi,mvapich + /pic/scratch/$USER + /pic/scratch/tcraig/IRESM/inputdata + /pic/scratch/tcraig/IRESM/inputdata/atm/datm7 + /pic/scratch/$USER/cases/archive/$CASE + /pic/scratch/tcraig/IRESM/ccsm_baselines + /people/tcraig/bin/cprnc + 8 + slurm + tcraig -at- ucar.edu + 24 + 24 + FALSE + + srun + + --mpi=none + --ntasks=$TOTALPES + --cpu_bind=sockets --cpu_bind=verbose + --kill-on-bad-exit + + + + srun + + --ntasks=$TOTALPES + --cpu_bind=sockets --cpu_bind=verbose + --kill-on-bad-exit + + + + mpirun + + -n $TOTALPES + + + + mpirun + + -n $TOTALPES + + + + /share/apps/modules/Modules/3.2.10/init/perl.pm + /etc/profile.d/modules.csh + /etc/profile.d/modules.sh + /share/apps/modules/Modules/3.2.10/bin/modulecmd perl + module + module + + + + + perl/5.20.0 + cmake/2.8.12 + + + intel/15.0.1 + netcdf/4.3.2 + mkl/15.0.1 + + + pgi/14.10 + netcdf/4.3.2 + + + mvapich2/2.1 + + + mvapich2/2.1 + + + intelmpi/5.0.1.035 + + + openmpi/1.8.3 + + + + 64M + + + $MLIB_LIB + /share/apps/netcdf/4.3.2/intel/15.0.1 + + + /share/apps/netcdf/4.3.2/pgi/14.10 + + + + + + + NERSC XC40 Haswell, os is CNL, 32 pes/node, batch system is Slurm + cori + CNL + intel,gnu,cray + mpt + $ENV{SCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.corip1/cprnc + 8 + slurm + cseg + 64 + 32 + + srun + + --label + -n $TOTALPES + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-sandybridge + craype-ivybridge + craype + + + + PrgEnv-intel + intel intel/17.0.1.132 + /global/project/projectdirs/ccsm1/modulefiles/cori + + + esmf/6.3.0rp1-defio-intel2016-mpi-O + + + esmf/6.3.0rp1-defio-intel2016-mpiuni-O + + + + PrgEnv-cray + cce cce/8.5.7 + + + PrgEnv-gnu + gcc gcc/6.2.0 + + + cray-memkind + papi/5.4.1.3 + craype craype/2.5.7 + + + cray-libsci/16.09.1 + + + cray-mpich/7.4.4 + + + cray-hdf5/1.10.0 + cray-netcdf/4.4.1 + + + cray-netcdf-hdf5parallel/4.3.3.1 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + cmake/3.5.2 + + + + 256M + + + + + + + NERSC XC* KNL, os is CNL, 68 pes/node, batch system is Slurm + CNL + intel,gnu,cray + mpt + $ENV{SCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.corip1/cprnc + 8 + slurm + cseg + 256 + 64 + + srun + + --label + -n $TOTALPES + -c 4 --cpu_bind=cores + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + craype-mic-knl + craype-haswell + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + + + PrgEnv-intel + intel intel/17.0.3.191 + /global/project/projectdirs/ccsm1/modulefiles/cori + + + esmf/6.3.0rp1-defio-intel2016-mpi-O + + + esmf/6.3.0rp1-defio-intel2016-mpiuni-O + + + + PrgEnv-cray + cce cce/8.5.8 + + + PrgEnv-gnu + gcc gcc/6.2.0 + + + cray-memkind + craype-mic-knl + craype craype/2.5.7 + + + cray-libsci/16.11.1 + + + cray-mpich/7.4.4 + + + cray-hdf5/1.10.0 + cray-netcdf/4.4.1 + + + cray-netcdf-hdf5parallel/4.3.3.1 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + cmake/3.5.2 + + + + 256M + + + + + PNL IBM Xeon cluster, os is Linux (pgi), batch system is SLURM + LINUX + pgi,intel + mvapich2,mvapich + /lustre/$USER + /lustre/tcraig/IRESM/inputdata + /lustre/tcraig/IRESM/inputdata/atm/datm7 + /lustre/$USER/archive/$CASE + /lustre/tcraig/IRESM/ccsm_baselines + /lustre/tcraig/IRESM/tools/cprnc/cprnc + 8 + slurm + tcraig -at- ucar.edu + 12 + 12 + + srun + + --ntasks=$TOTALPES + --cpu_bind=sockets + --cpu_bind=verbose + --kill-on-bad-exit + + + + srun + + --mpi=none + --ntasks=$TOTALPES + --cpu_bind=sockets + --cpu_bind=verbose + --kill-on-bad-exit + + + + /etc/profile.d/modules.perl + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /share/apps/modules/Modules/3.2.7/bin/modulecmd perl + module + module + + + perl/5.20.7 + cmake/3.0.0 + pgi/15.5 + mpi/mvapich2/1.5.1p1/pgi11.3 + netcdf/4.1.2/pgi + + + + 64M + + + + + NERSC XC30, os is CNL, 24 pes/node, batch system is SLURM + edison + CNL + intel,gnu,cray + mpt + $ENV{CSCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.edison/cprnc + 8 + slurm + cseg + 48 + 24 + + srun + + --label + -n $TOTALPES + -c $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-sandybridge + craype-ivybridge + craype + + + + PrgEnv-intel + intel intel/16.0.3.210 + cray-libsci + /global/project/projectdirs/ccsm1/modulefiles/edison + + + esmf/6.3.0rp1-defio-intel15.0-mpi-O + + + esmf/6.3.0rp1-defio-intel15.0-mpiuni-O + + + PrgEnv-cray + cce cce/8.5.1 + cray-libsci/16.07.1 + + + PrgEnv-gnu + gcc gcc/6.1.0 + cray-libsci/16.07.1 + + + papi/5.4.3.2 + craype craype/2.5.5 + craype-ivybridge + + + cray-mpich/7.6.0 + + + cray-hdf5/1.8.16 + cray-netcdf/4.4.0 + + + cray-netcdf-hdf5parallel/4.4.0 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + + + 64M + + + + + NOAA XE6, os is CNL, 24 pes/node, batch system is PBS + CNL + pgi + mpich + /lustre/fs/scratch/Julio.T.Bacmeister + /lustre/fs/scratch/Julio.T.Bacmeister/inputdata + /lustre/fs/scratch/Julio.T.Bacmeister/inputdata + /lustre/fs/scratch/Julio.T.Bacmeister/archive/$CASE + UNSET + UNSET + 8 + pbs + julio -at- ucar.edu + 24 + 24 + + aprun + + -j {{ hyperthreading }} + -n $TOTALPES + -S {{ tasks_per_numa }} + -N $PES_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/csh + /opt/modules/default/init/sh + /opt/modules/default/bin/modulecmd perl + module + module + + PrgEnv-pgi + PrgEnv-cray + PrgEnv-gnu + pgi + cray + + + PrgEnv-pgi + pgi pgi/12.5.0 + + + PrgEnv-gnu + torque + + + PrgEnv-cray/4.0.36 + cce/8.0.2 + + + torque/4.1.3 + netcdf-hdf5parallel/4.2.0 + parallel-netcdf/1.2.0 + + + + 64M + 1 + + + + + NCAR CGD Linux Cluster 48 pes/node, batch system is PBS + ^hob.* + LINUX + intel,pgi,nag,gnu + mvapich2,openmpi + /scratch/cluster/$USER + /fs/cgd/csm/inputdata + /project/tss + /scratch/cluster/$USER/archive/$CASE + /fs/cgd/csm/ccsm_baselines + /fs/cgd/csm/tools/cprnc_hobart/cprnc + gmake --output-sync + 4 + pbs + cseg + 48 + 48 + + mpiexec + + --machinefile $ENV{PBS_NODEFILE} + -n $TOTALPES + + + + mpiexec + + -n $TOTALPES + + + + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/python.py + /usr/share/Modules/init/csh + /usr/share/Modules/init/sh + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + + + compiler/intel/15.0.2.164 + + + tool/parallel-netcdf/1.7.0/intel/mvapich2 + + + compiler/pgi/17.04 + + + tool/parallel-netcdf/1.6.1/pgi/mvapich2 + + + compiler/nag/6.1 + + + compiler/gnu/5.4.0 + tool/parallel-netcdf/1.8.1/gnu-5.4.0/openmpi + + + + 64M + + + + + + + Customize these fields as appropriate for your system, + particularly changing MAX_TASKS_PER_NODE and PES_PER_NODE to the + number of cores on your machine. You may also want to change + instances of '$ENV{HOME}/projects' to your desired directory + organization. You can use this in either of two ways: (1) + Without making any changes, by adding `--machine homebrew` to + create_newcase or create_test (2) Copying this into a + config_machines.xml file in your personal .cime directory and + then changing the machine name (MACH="homebrew") to + your machine name and the NODENAME_REGEX to something matching + your machine's hostname. In this case, you should not need the + `--machine` argument, because the machine should be determined + automatically. + + + something.matching.your.machine.hostname + Darwin + gnu + mpich + $ENV{HOME}/projects/scratch + $ENV{HOME}/projects/cesm-inputdata + $ENV{HOME}/projects/ptclm-data + $ENV{HOME}/projects/scratch/archive/$CASE + $ENV{HOME}/projects/baselines + $CIMEROOT/tools/cprnc/build/cprnc + make + 4 + none + __YOUR_NAME_HERE__ + 4 + 4 + + mpirun + + -np $TOTALPES + -prepend-rank + + + + + /usr/local + + + + + + NCAR SGI test platform, os is Linux, 36 pes/node, batch system is PBS + .*.laramie.ucar.edu + LINUX + intel,gnu + mpt + /picnic/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/cesm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc + 8 + pbs + cseg + + 36 + 36 + TRUE + + mpiexec_mpt + + -p "%g:" + omplace + + + + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/perl + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/env_modules_python.py + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/csh + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/sh + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/libexec/lmod perl + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.0 + + + intel/16.0.3 + mkl + + + gnu/6.2.0 + + + mpt/2.15 + ncarcompilers/0.3.2 + + + netcdf/4.4.1 + + + netcdf-mpi/4.4.1 + pnetcdf/1.7.x + + + + 256M + 16 + + + + + Linux workstation for Jenkins testing + (melvin|watson) + LINUX + sonproxy.sandia.gov:80 + gnu + openmpi + /sems-data-store/ACME/timings + $ENV{HOME}/acme/scratch + /sems-data-store/ACME/inputdata + /sems-data-store/ACME/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /sems-data-store/ACME/baselines + /sems-data-store/ACME/cprnc/build/cprnc + make + 32 + acme_developer + none + jgfouca at sandia dot gov + 64 + 64 + + mpirun + + -np $TOTALPES + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + sems-gcc/5.1.0 + sems-openmpi/1.8.7 + sems-cmake/2.8.12 + sems-netcdf/4.3.2/parallel + + + + $ENV{SEMS_NETCDF_ROOT} + + + $ENV{SEMS_NETCDF_ROOT} + + + + + + ANL IBM BG/Q, os is BGP, 16 pes/node, batch system is cobalt + .*.fst.alcf.anl.gov + BGQ + ibm + ibm + /projects/$PROJECT/usr/$ENV{USER} + /projects/ccsm/inputdata + /projects/ccsm/inputdata/atm/datm7 + /projects/$PROJECT/usr/$USER/archive/$CASE + /projects/ccsm/ccsm_baselines/ + /projects/ccsm/tools/cprnc/cprnc + 4 + cobalt + cseg + 64 + 8 + TRUE + + /usr/bin/runjob + + --label short + + --ranks-per-node $PES_PER_NODE + + --np $TOTALPES + --block $COBALT_PARTNAME --envs OMP_WAIT_POLICY=active --envs BG_SMP_FAST_WAKEUP=yes $LOCARGS + --envs BG_THREADLAYOUT=1 + --envs OMP_STACKSIZE=32M + --envs OMP_NUM_THREADS=$ENV{OMP_NUM_THREADS} + + + + /etc/profile.d/00softenv.csh + /etc/profile.d/00softenv.sh + soft + soft + + +mpiwrapper-xl + @ibm-compilers-2015-02 + +cmake + +python + + + + 10000 + FALSE + 64M + /soft/libraries/hdf5/1.8.14/cnk-xl/current + + + + + PNL cluster, os is Linux (pgi), batch system is SLURM + LINUX + pgi + mpich + /pic/scratch/$USER + /pic/scratch/tcraig/IRESM/inputdata + /pic/scratch/tcraig/IRESM/inputdata/atm/datm7 + /pic/scratch/$USER/archive/$CASE + /pic/scratch/tcraig/IRESM/ccsm_baselines + /pic/scratch/tcraig/IRESM/tools/cprnc/cprnc + 8 + slurm + tcraig -at- ucar.edu + 32 + 32 + FALSE + + mpiexec_mpt + + --mpi=none + -n=$TOTALPES + --kill-on-bad-exit + + + + /share/apps/modules/Modules/3.2.7/init/perl.pm + /share/apps/modules/Modules/3.2.7/init/csh + /share/apps/modules/Modules/3.2.7/init/sh + /share/apps/modules/Modules/3.2.7/bin/modulecmd perl + module + module + + + precision/i4 + pgi/11.8 + mvapich2/1.7 + netcdf/4.1.3 + + + + 64M + + + + + NASA/AMES Linux Cluster, Linux (ia64), 2.4 GHz Broadwell Intel Xeon E5-2680v4 processors, 28 pes/node (two 14-core processors) and 128 GB of memory/node, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 28 + 28 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), 2.5 GHz Haswell Intel Xeon E5-2680v3 processors, 24 pes/node (two 12-core processors) and 128 GB of memory/node, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 24 + 24 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), Altix ICE, 2.6 GHz Sandy Bridge processors, 16 cores/node and 32 GB of memory, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 16 + 16 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), Altix ICE, 2.8 GHz Ivy Bridge processors, 20 cores/node and 3.2 GB of memory per core, batch system is PBS + LINUX + intel + mpich + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 20 + 20 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + CSCS Cray XE6, os is CNL, 32 pes/node, batch system is SLURM + CNL + pgi,cray,gnu + mpich + /scratch/rosa/$USER + /project/s433/cesm_inputdata + /project/s433/cesm_inputdata/atm/datm7 + /project/s433/$USER/archive/$CASE + /project/s433/ccsm_baselines + /project/s433/cesm_tools/ccsm_cprnc/cprnc + 12 + slurm + edouard.davin -at- env.ethz.ch + 32 + 32 + + aprun + + -n $TOTALPES + -N $PES_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + + 64M + + + + + + Linux workstation at Sandia on SRN with SEMS TPL modules + (s999964|climate|penn) + LINUX + wwwproxy.sandia.gov:80 + gnu + openmpi + /sems-data-store/ACME/timings + $ENV{HOME}/acme/scratch + /sems-data-store/ACME/inputdata + /sems-data-store/ACME/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /sems-data-store/ACME/baselines + /sems-data-store/ACME/cprnc/build/cprnc + make + 32 + acme_developer + none + jgfouca at sandia dot gov + 64 + 64 + + mpirun + + -np $TOTALPES + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + sems-gcc/5.1.0 + sems-openmpi/1.8.7 + sems-cmake/2.8.12 + sems-netcdf/4.3.2/parallel + + + + $ENV{SEMS_NETCDF_ROOT} + $ENV{SEMS_NETCDF_ROOT} + + + + + SNL clust + skybridge-login + LINUX + wwwproxy.sandia.gov:80 + intel + openmpi + /projects/ccsm/timings + /gscratch/$USER/acme_scratch/skybridge + /projects/ccsm/inputdata + /projects/ccsm/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /projects/ccsm/ccsm_baselines + /projects/ccsm/cprnc/build/cprnc_wrap + 8 + acme_integration + slurm + jgfouca at sandia dot gov + 16 + 16 + TRUE + + + mpirun + + -np $TOTALPES + -npernode $PES_PER_NODE + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + gnu/4.9.2 + intel/intel-15.0.3.187 + libraries/intel-mkl-15.0.2.164 + libraries/intel-mkl-15.0.2.164 + + + openmpi-intel/1.8 + sems-hdf5/1.8.12/parallel + sems-netcdf/4.3.2/parallel + sems-hdf5/1.8.12/base + sems-netcdf/4.3.2/base + + + + $ENV{SEMS_NETCDF_ROOT} + 64M + + + $ENV{SEMS_NETCDF_ROOT} + + + + + TACC DELL, os is Linux, 16 pes/node, batch system is SLURM + .*stampede + LINUX + intel + mvapich2,impi + $ENV{SCRATCH} + /scratch/projects/xsede/CESM/inputdata + /scratch/projects/xsede/CESM/inputdata/lmwg + $WORK/archive/$CASE + /scratch/projects/xsede/CESM/ccsm_baselines + /scratch/projects/xsede/CESM/tools/cprnc/cprnc + 4 + slurm + cseg + 16 + 16 + + + ibrun + + + ibrun + + + /opt/apps/lmod/lmod/init/perl + /opt/apps/lmod/lmod/init/env_modules_python.py + /opt/apps/lmod/lmod/init/sh + /opt/apps/lmod/lmod/init/csh + /opt/apps/lmod/lmod/libexec/lmod perl + /opt/apps/lmod/lmod/libexec/lmod python + module + module + + + TACC + python/2.7.12 + intel/15.0.2 + perl/5.16.2 + cmake/3.1.0 + + + mvapich2 + pnetcdf/1.6.1 + parallel-netcdf/4.3.3.1 + + + mvapich2 + impi + pnetcdf/1.6.0 + parallel-netcdf/4.3.3.1 + + + netcdf/4.3.3.1 + + + + 256M + /scratch/projects/xsede/CESM/perl5/lib/perl5/x86_64-linux-thread-multi:/scratch/projects/xsede/CESM/perl5/lib/perl5 + + + + + ALCF Cray XC* KNL, os is CNL, 64 pes/node, batch system is cobalt + theta.* + CNL + intel,gnu,cray + mpt + EarlyPerf_theta + /projects/EarlyPerf_theta/cesm/scratch/$USER + /projects/EarlyPerf_theta/cesm/inputdata + /projects/EarlyPerf_theta/cesm/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /projects/EarlyPerf_theta/cesm/baselines + /projects/EarlyPerf_theta/cesm/tools/cprnc/cprnc + 8 + cobalt_theta + cseg + 64 + 64 + TRUE + + aprun + + -n $TOTALPES + -N $PES_PER_NODE + --cc depth -d $OMP_NUM_THREADS + -e OMP_STACKSIZE=64M + -e OMP_NUM_THREADS=$OMP_NUM_THREADS + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-hdf5-parallel + pmi + cray-libsci + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-mic-knl + craype + + + + PrgEnv-intel/6.0.3 + intel intel/17.0.0.098 + cray-libsci + + + + PrgEnv-cray/6.0.3 + cce cce/8.5.4 + + + PrgEnv-gnu/6.0.3 + gcc gcc/6.2.0 + + + papi/5.4.3.3 + craype craype/2.5.7 + + + cray-libsci/16.09.1 + + + cray-mpich/7.4.4 + + + cray-netcdf-hdf5parallel/4.4.1 + cray-hdf5-parallel/1.10.0 + cray-parallel-netcdf/1.7.0 + + + + + + NCAR IBM, os is Linux, 16 pes/node, batch system is LSF + .*yellowstone + LINUX + intel,pgi,gnu,intel15 + mpich2,pempi + /glade/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/ccsm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc + /glade/apps/opt/perlmods/lib64/perl5:/glade/apps/opt/perlmods/share/perl5 + 8 + lsf + cseg + 30 + 15 + TRUE + + + mpirun.lsf + + + TARGET_PROCESSOR_LIST=AUTO_SELECT mpirun.lsf $ENV{CESMDATAROOT}/tools/bin/launch + + + unset MP_PE_AFFINITY; unset MP_TASK_AFFINITY; unset MP_CPU_BIND_LIST; mpirun.lsf $ENV{CESMDATAROOT}/tools/bin/hybrid_launch + + + mpirun.lsf + + + /glade/apps/opt/lmod/lmod/init/perl + /glade/apps/opt/lmod/lmod/init/env_modules_python.py + /glade/apps/opt/lmod/lmod/init/csh + /glade/apps/opt/lmod/lmod/init/sh + /glade/apps/opt/lmod/lmod/libexec/lmod perl + /glade/apps/opt/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.0 + ncarbinlibs/1.1 + perlmods + gmake/4.1 + python + all-python-libs + git + + + intel/15.0.3 + mkl/11.1.2 + trilinos/11.10.2 + esmf + + + esmf-7.0.0-ncdfio-mpi-g + + + esmf-7.0.0-defio-mpi-O + + + esmf-7.0.0-ncdfio-uni-g + + + esmf-7.0.0-ncdfio-uni-O + + + pgi/15.10 + + + gnu/5.2.0 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + ncarcompilers/1.0 + cmake/3.0.2 + all-python-libs + + + + 256M + yes + 2 + yes + us + unordered + yes + + + 0 + + + $MPILIB + + + + ${EXEROOT}/cesm.exe + >> cesm.log.$LID 2>&1 + + + diff --git a/config_pio.xml b/config_pio.xml new file mode 100644 index 0000000000..801da1efda --- /dev/null +++ b/config_pio.xml @@ -0,0 +1,344 @@ + + + + + + + + + + + $PES_PER_NODE + 60 + + + + + + + + + + pnetcdf + netcdf + + + + + + $PIO_VERSION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + netcdf + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mkDepends b/mkDepends new file mode 100755 index 0000000000..d9bcbdd87b --- /dev/null +++ b/mkDepends @@ -0,0 +1,452 @@ +#!/usr/bin/env perl + +# Generate dependencies in a form suitable for inclusion into a Makefile. +# The source filenames are provided in a file, one per line. Directories +# to be searched for the source files and for their dependencies are provided +# in another file, one per line. Output is written to STDOUT. +# +# For CPP type dependencies (lines beginning with #include), or for Fortran +# include dependencies, the dependency search is recursive. Only +# dependencies that are found in the specified directories are included. +# So, for example, the standard include file stdio.h would not be included +# as a dependency unless /usr/include were one of the specified directories +# to be searched. +# +# For Fortran module USE dependencies (lines beginning with a case +# insensitive "USE", possibly preceded by whitespace) the Fortran compiler +# must be able to access the .mod file associated with the .o file that +# contains the module. In order to correctly generate these dependencies +# the following restriction must be observed. +# +# ** All modules that are to be contained in the dependency list must be +# ** contained in one of the source files in the list provided on the command +# ** line. +# +# The reason for this restriction is that the modules have a nominal dependence +# on the .o files. If a module is being used for which the source code is not +# available (e.g., a module from a library), then adding a .o dependency for +# that module is a mistake because make will attempt to build that .o file, and +# will fail if the source code is not available. +# +# Original version: B. Eaton +# Climate Modelling Section, NCAR +# Feb 2001 +# +# ChangeLog: +# ----------------------------------------------------------------------------- +# Modifications to Brian Eaton's original to relax the restrictions on +# source file name matching module name and only one module per source +# file. Also added a new "-d depfile" option which allows an additional +# file to be added to every dependence. +# +# +# Tom Henderson +# Global Systems Division, NOAA/OAR +# Mar 2011 +# ----------------------------------------------------------------------------- +# Several updates: +# +# - Remove limitation that modules cannot be named "procedure". +# +# - Allow optional "::" in use statement (Fortran 2003). +# +# - Instead of having .o files depend on other .o files directly, +# have them depend indirectly through the .mod files. This allows +# the compiler to have discretion over whether to update a .mod, +# and prevents cascading recompilation when it does not. +# +# +# Sean Santos +# CESM Software Engineering Group, NCAR +# Mar 2013 +# ----------------------------------------------------------------------------- +# More updates: +# +# - Restore ability to recognize .mod files in the path, if there's no source +# file that provides the same module. +# +# - Allow "non_intrinsic" keyword (Fortran 2003). +# +# Sean Santos +# CESM Software Engineering Group, NCAR +# Mar 2013 +# ----------------------------------------------------------------------------- + + +use Getopt::Std; +use File::Basename; + +# Check for usage request. +@ARGV >= 2 or usage(); + +# Process command line. +my %opt = (); +getopts( "t:wd:m:", \%opt ) or usage(); +my $filepath_arg = shift() or usage(); +my $srcfile_arg = shift() or usage(); +@ARGV == 0 or usage(); # Check that all args were processed. + +my $obj_dir = ""; +if ( defined $opt{'t'} ) { $obj_dir = $opt{'t'}."/"; } + +my $additional_file = ""; +if ( defined $opt{'d'} ) { $additional_file = $opt{'d'}; } + +my $mangle_scheme = "lower"; +if ( defined $opt{'m'} ) { $mangle_scheme = $opt{'m'}; } + +open(FILEPATH, $filepath_arg) or die "Can't open $filepath_arg: $!\n"; +open(SRCFILES, $srcfile_arg) or die "Can't open $srcfile_arg: $!\n"; + +# Make list of paths to use when looking for files. +# Prepend "." so search starts in current directory. This default is for +# consistency with the way GNU Make searches for dependencies. +my @file_paths = ; +close(FILEPATH); +chomp @file_paths; +unshift(@file_paths,'.'); +foreach $dir (@file_paths) { # (could check that directories exist here) + $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name + ($dir) = glob $dir; # Expand tildes in path names. +} + +# Make list of files containing source code. +my @src = ; +close(SRCFILES); +chomp @src; + +my %module_files = (); + +# Attempt to parse each file for /^\s*module/ and extract module names +# for each file. +my ($f, $name, $path, $suffix, $mod); +my @suffixes = ('\.[fF]90', '\.[fF]','\.F90\.in' ); +foreach $f (@src) { + ($name, $path, $suffix) = fileparse($f, @suffixes); + # find the file in the list of directorys (in @file_paths) + my $file_path = find_file($f); + open(FH, $file_path) or die "Can't open $file_path: $!\n"; + while ( ) { + # Search for module definitions. + if ( /^\s*MODULE\s+(\w+)\s*(\!.*)?$/i ) { + ($mod = $1) =~ tr/A-Z/a-z/; + if ( defined $module_files{$mod} ) { + die "Duplicate definitions of module $mod in $module_files{$mod} and $name: $!\n"; + } + $module_files{$mod} = $name; + } + } + close( FH ); +} + +# Now make a list of .mod files in the file_paths. If a source dependency +# can't be found based on the module_files list above, then maybe a .mod +# module dependency can if the mod file is visible. +my %trumod_files = (); +my ($dir); +my ($f, $name, $path, $suffix, $mod); +# This might not be clear: we want to mangle a "\" so that it will escape +# the "." in .mod or .MOD +my @suffixes = (mangle_modfile("\\")); +foreach $dir (@file_paths) { + # Similarly, this gets us $dir/*.mod or $dir/*.MOD + @filenames = (glob("$dir/".mangle_modfile("*"))); + foreach $f (@filenames) { + ($name, $path, $suffix) = fileparse($f, @suffixes); + ($mod = $name) =~ tr/A-Z/a-z/; + $trumod_files{$mod} = $name; + } +} + +#print STDERR "\%module_files\n"; +#while ( ($k,$v) = each %module_files ) { +# print STDERR "$k => $v\n"; +#} + +# Find module and include dependencies of the source files. +my ($file_path, $rmods, $rincs); +my %file_modules = (); +my %file_includes = (); +my @check_includes = (); +my %modules_used = (); +foreach $f ( @src ) { + + # Find the file in the seach path (@file_paths). + unless ($file_path = find_file($f)) { + if (defined $opt{'w'}) {print STDERR "$f not found\n";} + next; + } + + # Find the module and include dependencies. + ($rmods, $rincs) = find_dependencies( $file_path ); + + # Remove redundancies (a file can contain multiple procedures that have + # the same dependencies). + $file_modules{$f} = rm_duplicates($rmods); + $file_includes{$f} = rm_duplicates($rincs); + + # Make a list of all include files. + push @check_includes, @{$file_includes{$f}}; +} + +print STDERR "\%file_modules\n"; +while ( ($k,$v) = each %file_modules ) { + print STDERR "$k => @$v\n"; +} +print STDERR "\%file_includes\n"; +while ( ($k,$v) = each %file_includes ) { + print STDERR "$k => @$v\n"; +} +print STDERR "\@check_includes\n"; +print STDERR "@check_includes\n"; + +# Find include file dependencies. +my %include_depends = (); +while (@check_includes) { + $f = shift @check_includes; + if (defined($include_depends{$f})) { next; } + + # Mark files not in path so they can be removed from the dependency list. + unless ($file_path = find_file($f)) { + $include_depends{$f} = -1; + next; + } + + # Find include file dependencies. + ($rmods, $include_depends{$f}) = find_dependencies($file_path); + + # Add included include files to the back of the check_includes list so + # that their dependencies can be found. + push @check_includes, @{$include_depends{$f}}; + + # Add included modules to the include_depends list. + if ( @$rmods ) { push @{$include_depends{$f}}, @$rmods; } +} + +#print STDERR "\%include_depends\n"; +#while ( ($k,$v) = each %include_depends ) { +# print STDERR (ref $v ? "$k => @$v\n" : "$k => $v\n"); +#} + +# Remove include file dependencies that are not in the Filepath. +my $i, $ii; +foreach $f (keys %include_depends) { + + unless (ref $include_depends{$f}) { next; } + $rincs = $include_depends{$f}; + unless (@$rincs) { next; } + $ii = 0; + $num_incs = @$rincs; + for ($i = 0; $i < $num_incs; ++$i) { + if ($include_depends{$$rincs[$ii]} == -1) { + splice @$rincs, $ii, 1; + next; + } + ++$ii; + } +} + +# Substitute the include file dependencies into the %file_includes lists. +foreach $f (keys %file_includes) { + my @expand_incs = (); + + # Initialize the expanded %file_includes list. + my $i; + unless (@{$file_includes{$f}}) { next; } + foreach $i (@{$file_includes{$f}}) { + push @expand_incs, $i unless ($include_depends{$i} == -1); + } + unless (@expand_incs) { + $file_includes{$f} = []; + next; + } + + # Expand + for ($i = 0; $i <= $#expand_incs; ++$i) { + push @expand_incs, @{ $include_depends{$expand_incs[$i]} }; + } + + $file_includes{$f} = rm_duplicates(\@expand_incs); +} + +#print STDERR "expanded \%file_includes\n"; +#while ( ($k,$v) = each %file_includes ) { +# print STDERR "$k => @$v\n"; +#} + +# Print dependencies to STDOUT. + +print "# Declare all module files used to build each object.\n"; + +foreach $f (sort keys %file_modules) { + my $file; + if($f =~ /\.F90\.in$/){ + $f =~ /(.+)\.F90\.in/; + $file = $1; + }else{ + $f =~ /(.+)\./; + $file = $1; + } + $target = $obj_dir."$file.o"; + print "$target : $f @{$file_modules{$f}} @{$file_includes{$f}} $additional_file \n"; +} + +print "# The following section relates each module to the corresponding file.\n"; +$target = mangle_modfile("%"); +print "$target : \n"; +print "\t\@\:\n"; + +foreach $mod (sort keys %modules_used) { + my $mod_fname = $obj_dir.mangle_modfile($mod); + my $obj_fname = $obj_dir.$module_files{$mod}.".o"; + print "$mod_fname : $obj_fname\n"; + +} + +#-------------------------------------------------------------------------------------- + +sub find_dependencies { + + # Find dependencies of input file. + # Use'd Fortran 90 modules are returned in \@mods. + # Files that are "#include"d by the cpp preprocessor are returned in \@incs. + + # Check for circular dependencies in \@mods. This type of dependency + # is a consequence of having multiple modules defined in the same file, + # and having one of those modules depend on the other. + + my( $file ) = @_; + my( @mods, @incs ); + + open(FH, $file) or die "Can't open $file: $!\n"; + + # Construct the makefile target associated with this file. This is used to + # check for circular dependencies. + my ($name, $path, $suffix, $target); + my @suffixes = ('\.[fF]90', '\.[fF]','\.F90\.in' ); + ($name, $path, $suffix) = fileparse($file, @suffixes); + $target = "$name.o"; + my $include; + while ( ) { + # Search for "#include" and strip filename when found. + if ( /^#include\s+[<"](.*)[>"]/ ) { + $include = $1; + } + # Search for Fortran include dependencies. + elsif ( /^\s*include\s+['"](.*)['"]/ ) { #" for emacs fontlock + $include = $1; + } + if(defined($include)){ + if($include =~ /shr_assert.h/){ + push @mods, "$obj_dir".mangle_modfile("shr_assert_mod"); + } + push @incs, $include; + undef $include; + } + # Search for module dependencies. + elsif ( /^\s*USE(?:\s+|\s*\:\:\s*|\s*,\s*non_intrinsic\s*\:\:\s*)(\w+)/i ) { + # Return dependency in the form of a .mod file + ($module = $1) =~ tr/A-Z/a-z/; + if ( defined $module_files{$module} ) { + # Check for circular dependency + unless ("$module_files{$module}.o" eq $target) { + $modules_used{$module} = (); + push @mods, "$obj_dir".mangle_modfile($module); + } + } + # If we already have a .mod file around. + elsif ( defined $trumod_files{$module} ) { + push @mods, "$obj_dir".mangle_modfile($trumod_files{$module}); + } + } + } + close( FH ); + return (\@mods, \@incs); +} + +#-------------------------------------------------------------------------------------- + +sub find_file { + +# Search for the specified file in the list of directories in the global +# array @file_paths. Return the first occurance found, or the null string if +# the file is not found. + + my($file) = @_; + my($dir, $fname); + + foreach $dir (@file_paths) { + $fname = "$dir/$file"; + if ( -f $fname ) { return $fname; } + } + return ''; # file not found +} + +#-------------------------------------------------------------------------------------- + +sub rm_duplicates { + +# Return a list with duplicates removed. + + my ($in) = @_; # input arrary reference + my @out = (); + my $i; + my %h = (); + foreach $i (@$in) { + $h{$i} = ''; + } + @out = keys %h; + return \@out; +} + +#-------------------------------------------------------------------------------------- + +sub mangle_modfile { + +# Return the name of the module file corresponding +# to a given module. + + my ($mod) = @_; + my $fname; + + if ($mangle_scheme eq "lower") { + ($fname = $mod) =~ tr/A-Z/a-z/; + $fname .= ".mod"; + } elsif ($mangle_scheme eq "upper") { + ($fname = $mod) =~ tr/a-z/A-Z/; + $fname .= ".MOD"; + } else { + die "Unrecognized mangle_scheme!\n"; + } + + return $fname; + +} + +#-------------------------------------------------------------------------------------- + +sub usage { + ($ProgName = $0) =~ s!.*/!!; # name of program + die <; + close( FILEPATH ); +} else { + @paths = (); +} +chomp @paths; +unshift(@paths, '.'); +foreach $dir (@paths) { # (could check that directories exist here) + $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name + ($dir) = glob $dir; # Expand tildes in path names. +} + +# Loop through the directories and add each filename as a hash key. This +# automatically eliminates redunancies. +%src = (); +foreach $dir (@paths) { + @filenames = (glob("$dir/*.[Ffc]"), glob("$dir/*.[Ff]90"), glob("$dir/*.cpp")); + foreach $filename (@filenames) { + $filename =~ s!.*/!!; # remove part before last slash + $src{$filename} = 1; + } + @templates = glob("$dir/*.F90.in"); + foreach $filename (@templates) { + $filename =~ s!.*/!!; # remove part before last slash + my $dfile = $filename; + $dfile =~ s/\.in//; + delete $src{$dfile} if(defined $src{$dfile}); + $src{$filename} = 1; + } +} + +my @srcfiles; +my $foundcnt=0; +my $writenew=1; +if(-e "Srcfiles"){ # file already exists, do not update if no changes are required + open(SRC,"Srcfiles"); + @srcfiles = ; + close(SRC); + $writenew=0; + foreach $file (@srcfiles){ + chomp $file; + if($src{$file}){ + $src{$file}=0; + }else{ + $writenew=1; # A srcfile was removed + last; + } + + } + foreach $file (keys %src){ + if($src{$file} == 1){ + $writenew=1; # A srcfile was added + last; + } + } +} + +if($writenew==1){ + open(SRC,"> Srcfiles") or die "Can't open Srcfiles\n"; + + foreach $file ( sort keys %src ) { + print SRC "$file\n"; + } + + close( SRC ); +} +#-------------------------------------------------------------------------------------- + +sub usage { + ($ProgName = $0) =~ s!.*/!!; # name of program + die < {0} +""".format(os.path.basename(args[0])), + description=description, + formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("--caseroot", + help="Case directory to build") + + parser.add_argument("--skip-preview-namelist", action="store_true", + help="Skip calling preview-namelist during case.run") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + if args.skip_preview_namelist is None: + args.skip_preview_namelist = False + + return args.caseroot, args.skip_preview_namelist + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + caseroot, skip_pnl = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_run(case, skip_pnl=skip_pnl) + + sys.exit(0 if success else 1) + +if __name__ == "__main__": + _main_func(__doc__) diff --git a/template.case.test b/template.case.test new file mode 100755 index 0000000000..6bc4320693 --- /dev/null +++ b/template.case.test @@ -0,0 +1,73 @@ +#!/usr/bin/env python +{{ batchdirectives }} +""" +This is the system test submit script for CIME. This should only ever be called +by case.submit when on batch system. This script only exists as a way of providing +batch directives. Use case.submit from the command line to run your case. +""" +import os, sys +os.chdir( '{{ caseroot }}') + +_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * + +from CIME.case_test import case_test +from CIME.case import Case + +import argparse, doctest + +############################################################################### +def parse_command_line(args, description): +############################################################################### + parser = argparse.ArgumentParser( + usage="""\n%s [] [--verbose] +OR +%s --help +OR +%s --test + +\033[1mEXAMPLES:\033[0m + \033[1;32m# case.test SMS\033[0m + > %s +""" % ((os.path.basename(args[0]), ) * 4), + +description=description, + +formatter_class=argparse.ArgumentDefaultsHelpFormatter +) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("testname", nargs="?",default=None, + help="Name of the test to run, default is set in TESTCASE in env_test.xml") + + parser.add_argument("--caseroot", + help="Case directory to build") + + parser.add_argument("--reset", action="store_true", + help="Reset the case to its original state as defined by config_tests.xml") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + return args.caseroot, args.testname, args.reset + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + caseroot, testname, reset = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_test(case, testname, reset) + + sys.exit(0 if success else 1) + +if (__name__ == "__main__"): + _main_func(__doc__) diff --git a/template.st_archive b/template.st_archive new file mode 100755 index 0000000000..4ed2f2023c --- /dev/null +++ b/template.st_archive @@ -0,0 +1,79 @@ +#!/usr/bin/env python +# Batch system directives +{{ batchdirectives }} + +""" +template to create a case short term archiving script. This should only ever be called +by case.submit when on batch system. This script only exists as a way of providing +batch directives. Use case.submit from the command line to run your case. +""" + +import sys, os, time +os.chdir( '{{ caseroot }}') + +_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * +from CIME.case import Case +from CIME.case_st_archive import case_st_archive + +logger = logging.getLogger(__name__) + + +############################################################################### +def parse_command_line(args, description): +############################################################################### + + parser = argparse.ArgumentParser( + usage="""\n{0} [--verbose] +OR +{0} --help +OR +{0} --test + +\033[1mEXAMPLES:\033[0m + \033[1;32m# case.run SMS\033[0m + > {0} +""".format(os.path.basename(args[0])), + +description=description, + +formatter_class=argparse.ArgumentDefaultsHelpFormatter +) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("--caseroot", default=os.getcwd(), + help="Case directory to build") + + parser.add_argument("--no-incomplete-logs", default=False, action="store_true", + help="Whether to archive logs which have been completed or not") + + parser.add_argument("--copy-only", default=False, action="store_true", + help="Copy instead of move the files to be archived") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + return args.caseroot, args.no_incomplete_logs, args.copy_only + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + caseroot, no_incomplete_logs, copy_only = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_st_archive(case, archive_incomplete_logs=not no_incomplete_logs, copy_only=copy_only) + + sys.exit(0 if success else 1) + +############################################################################### + +if __name__ == "__main__": + _main_func(__doc__) diff --git a/userdefined_laptop_template/README.md b/userdefined_laptop_template/README.md new file mode 100644 index 0000000000..1a0e03b663 --- /dev/null +++ b/userdefined_laptop_template/README.md @@ -0,0 +1,131 @@ +Building CIME on an UNSUPPORTED local machine +--------------------------------------------- + +These directions are for a Mac OS X 10.9 or 10.10 laptop using +homebrew or macports to install the required software. The procedure +is similar for a linux workstation or cluster, you will just use +different package management tools to install the third party +libraries. + +Setup +===== + + - install xcode, including the command line tools. Failure to + install the command line tools is the most likely cause if you + get an error about the compilers not being able to create + executables. + + - install third party libraries from homebrew or macports. + + - home brew + + Install science tap : + + brew install gcc --without-multilib cmake mpich hdf5 --enable-fortran netcdf --enable-fortran + + + - macports + + sudo port install mpich +gcc48 hdf5-18 +mpich netcdf-fortran +gcc48 +mpich cmake + + Note: If you see an error while running create_newcase that + indicates perl can't find XML::LibXML, you may need to install + p5-xml-libxml as well. + + + - Some of the shell scripts used by cesm hard code "gmake" instead + of using the GMAKE variable from env_build.xml. To work around + this, you should install gnu make, or simply create a link from + make to gmake in you path. + + mkdir -p ${HOME}/local/bin + ln -s `whereis make` ${HOME}/local/bin/gmake + cat >> ${HOME}/.bashrc < + + + + + + -DFORTRANUNDERSCORE -DNO_R16 + + + -fopenmp + + + /usr/local/bin/gfortran + /usr/bin/cc + /usr/bin/c++ + /usr/local/bin/mpif90 + /usr/local/bin/mpicc + /usr/local/bin/mpicxx + FORTRAN + TRUE + /usr/local + + $(shell $(NETCDF_PATH)/bin/nf-config --flibs) -framework Accelerate + + + + + diff --git a/userdefined_laptop_template/config_machines.xml b/userdefined_laptop_template/config_machines.xml new file mode 100644 index 0000000000..72409c5b81 --- /dev/null +++ b/userdefined_laptop_template/config_machines.xml @@ -0,0 +1,33 @@ + + + + + __USEFUL_DESCRIPTION__ + something.matching.your.machine.hostname + Darwin + gnu + mpich + $ENV{HOME}/projects/scratch + $ENV{HOME}/projects/cesm-inputdata + $ENV{HOME}/projects/ptclm-data + $ENV{HOME}/projects/scratch/archive/$CASE + $ENV{HOME}/projects/baselines + $CIMEROOT/tools/cprnc/build/cprnc + 4 + none + __YOUR_NAME_HERE__ + 4 + 4 + + mpiexec_mpt + + -np $TOTALPES + --prepend-rank + + + + + + diff --git a/userdefined_laptop_template/config_pes.xml b/userdefined_laptop_template/config_pes.xml new file mode 100644 index 0000000000..0464137703 --- /dev/null +++ b/userdefined_laptop_template/config_pes.xml @@ -0,0 +1,31 @@ + + + + + + $MAX_TASKS_PER_NODE 1 0 + + + + 1 1 0 + + + + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + + + 2 1 + 2 + + + + From a35045c1261a4867a8fa993faa21a004a66fb6b4 Mon Sep 17 00:00:00 2001 From: Azamat Mametjanov Date: Mon, 6 Nov 2017 12:05:29 -0800 Subject: [PATCH 2/6] Update Slurm task-to-core affinities --- Depends.babbageKnc | 6 + Depends.bluewaters | 5 + Depends.corip1 | 5 + Depends.cray | 6 + Depends.gnu | 2 + Depends.intel | 40 + Depends.intel14 | 28 + Depends.intelmic | 6 + Depends.intelmic14 | 6 + Depends.mira | 22 + Depends.nag | 4 + Makefile | 858 +++++++ README | 15 + config_batch.xml | 491 ++++ config_compilers.xml | 1113 ++++++++++ config_machines.xml | 1965 +++++++++++++++++ config_pio.xml | 344 +++ mkDepends | 452 ++++ mkSrcfiles | 96 + nag_mpi_argument.txt | 4 + template.case.run | 80 + template.case.test | 75 + template.st_archive | 79 + userdefined_laptop_template/README.md | 131 ++ .../config_compilers.xml | 30 + .../config_machines.xml | 33 + userdefined_laptop_template/config_pes.xml | 31 + 27 files changed, 5927 insertions(+) create mode 100644 Depends.babbageKnc create mode 100755 Depends.bluewaters create mode 100644 Depends.corip1 create mode 100644 Depends.cray create mode 100644 Depends.gnu create mode 100644 Depends.intel create mode 100644 Depends.intel14 create mode 100644 Depends.intelmic create mode 100644 Depends.intelmic14 create mode 100644 Depends.mira create mode 100644 Depends.nag create mode 100644 Makefile create mode 100644 README create mode 100644 config_batch.xml create mode 100644 config_compilers.xml create mode 100644 config_machines.xml create mode 100644 config_pio.xml create mode 100755 mkDepends create mode 100755 mkSrcfiles create mode 100644 nag_mpi_argument.txt create mode 100755 template.case.run create mode 100755 template.case.test create mode 100755 template.st_archive create mode 100644 userdefined_laptop_template/README.md create mode 100644 userdefined_laptop_template/config_compilers.xml create mode 100644 userdefined_laptop_template/config_machines.xml create mode 100644 userdefined_laptop_template/config_pes.xml diff --git a/Depends.babbageKnc b/Depends.babbageKnc new file mode 100644 index 0000000000..f5a6f335cc --- /dev/null +++ b/Depends.babbageKnc @@ -0,0 +1,6 @@ + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< + +quadrature_mod.o: quadrature_mod.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -DIS_ACCELERATOR $< diff --git a/Depends.bluewaters b/Depends.bluewaters new file mode 100755 index 0000000000..e113298e08 --- /dev/null +++ b/Depends.bluewaters @@ -0,0 +1,5 @@ +# + ifeq ($(strip $(COMPILER)),pgi) + progseasalts_intr.o: progseasalts_intr.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -Mnovect $< +endif diff --git a/Depends.corip1 b/Depends.corip1 new file mode 100644 index 0000000000..81be8f3f16 --- /dev/null +++ b/Depends.corip1 @@ -0,0 +1,5 @@ +# Workaround for ICE in intel/2016.0.109 +ifeq (CPRINTEL,$(findstring CPRINTEL, $(FFLAGS))) +RtmMod.o: RtmMod.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) -O1 $< +endif diff --git a/Depends.cray b/Depends.cray new file mode 100644 index 0000000000..b6023391ea --- /dev/null +++ b/Depends.cray @@ -0,0 +1,6 @@ +NOOPTOBJS= ice_boundary.o dyn_comp.o unicon.o + +$(NOOPTOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< + + diff --git a/Depends.gnu b/Depends.gnu new file mode 100644 index 0000000000..2d53247217 --- /dev/null +++ b/Depends.gnu @@ -0,0 +1,2 @@ +geopk.o:geopk.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fcray-pointer $< diff --git a/Depends.intel b/Depends.intel new file mode 100644 index 0000000000..5369c3f714 --- /dev/null +++ b/Depends.intel @@ -0,0 +1,40 @@ +# +PERFOBJS=\ +prim_advection_mod.o \ +edge_mod.o \ +derivative_mod.o \ +bndry_mod.o \ +prim_advance_mod.o + +# CLM's SatellitePhenologyMod is compiled incorrectly with intel 15.0.0 at -O2 +REDUCED_OPT_OBJS=\ +SatellitePhenologyMod.o + +# shr_wv_sat_mod does not need to have better than ~0.1% precision, and benefits +# enormously from a lower precision in the vector functions. +REDUCED_PRECISION_OBJS=\ +shr_wv_sat_mod.o + +SHR_RANDNUM_FORT_OBJS=\ +kissvec_mod.o \ +mersennetwister_mod.o \ +dSFMT_interface.o \ +shr_RandNum_mod.o + +SHR_RANDNUM_C_OBJS=\ +dSFMT.o \ +dSFMT_utils.o \ +kissvec.o + +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -no-prec-div $< + $(REDUCED_OPT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O1 $< + $(REDUCED_PRECISION_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fimf-precision=low -fp-model fast $< + $(SHR_RANDNUM_FORT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -fp-model fast -no-prec-div -no-prec-sqrt -override-limits $< + $(SHR_RANDNUM_C_OBJS): %.o: %.c + $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) -O3 -fp-model fast $< +endif diff --git a/Depends.intel14 b/Depends.intel14 new file mode 100644 index 0000000000..32e4747d7a --- /dev/null +++ b/Depends.intel14 @@ -0,0 +1,28 @@ +# +# 12/03/2012 the intel compiler on yellowstone 12.1.5 20120612 +# does not converge the pH computation without the -CU flag +# root cause has not been determined. JPE +# this problem is resolved in intel 13.0.1 +#ecosys_mod.o: ecosys_mod.F90 +# $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -CU $< + + + +PERFOBJS=\ +prim_advection_mod_base.o \ +vertremap_mod_base.o \ +edge_mod_base.o \ +derivative_mod_base.o \ +bndry_mod_base.o \ +prim_advance_mod.o \ +uwshcu.o \ +wetdep.o + +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -no-prec-div $< + $(REDUCED_OPT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O1 $< + $(REDUCED_PRECISION_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fimf-precision=low -fp-model fast $< +endif diff --git a/Depends.intelmic b/Depends.intelmic new file mode 100644 index 0000000000..6f05aee44a --- /dev/null +++ b/Depends.intelmic @@ -0,0 +1,6 @@ + +#derivative_mod_base.o: derivative_mod_base.F90 +# $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) -O1 $< + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< diff --git a/Depends.intelmic14 b/Depends.intelmic14 new file mode 100644 index 0000000000..6f05aee44a --- /dev/null +++ b/Depends.intelmic14 @@ -0,0 +1,6 @@ + +#derivative_mod_base.o: derivative_mod_base.F90 +# $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) -O1 $< + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< diff --git a/Depends.mira b/Depends.mira new file mode 100644 index 0000000000..c786f6248a --- /dev/null +++ b/Depends.mira @@ -0,0 +1,22 @@ +# These routines have problems with stacksize when omp is invoked add -qsmallstack to resolve +SSOBJS = shr_reprosum_mod.o mo_sethet.o mo_drydep.o + +$(SSOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -qsmallstack $< + +time_management.o: time_management.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -qsmp=noauto:noomp $< + +# These routines benefit from -qnostrict without violating the bfb test +PERFOBJS=\ +prim_advection_mod.o \ +edge_mod.o \ +derivative_mod.o \ +bndry_mod.o \ +prim_advance_mod.o \ +uwshcu.o \ +wetdep.o +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -qnostrict $< +endif diff --git a/Depends.nag b/Depends.nag new file mode 100644 index 0000000000..d7e4894aa1 --- /dev/null +++ b/Depends.nag @@ -0,0 +1,4 @@ +wrap_mpi.o: wrap_mpi.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< +fft99.o: fft99.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..1b0e4defed --- /dev/null +++ b/Makefile @@ -0,0 +1,858 @@ +#=============================================================================== +# +# Common Makefile: a framework for building all CIME components and more +# +#=============================================================================== + +# Set up special characters +null := +comma := , + +# Load dependency search path. +dirs := . +dirs += $(shell cat Filepath) + +cpp_dirs := $(dirs) +# Add INCROOT to path for Depends and Include +MINCROOT := +ifdef INCROOT + cpp_dirs += $(INCROOT) + MINCROOT := $(INCROOT) +endif + +# Expand any tildes in directory names. Change spaces to colons. +VPATH := $(foreach dir,$(cpp_dirs),$(wildcard $(dir))) +VPATH := $(subst $(space),:,$(VPATH)) + +RM := rm +CP := cp + +exec_se: $(EXEC_SE) Depends +complib: $(COMPLIB) Depends + +# Determine whether to compile threaded or not +# Set the THREADDIR for the shared build +# based on the threaded build status +compile_threaded = false +ifeq ($(strip $(SMP)),TRUE) + compile_threaded = true + THREADDIR = threads +else + ifeq ($(strip $(BUILD_THREADED)),TRUE) + compile_threaded = true + THREADDIR = threads + else + THREADDIR = nothreads + endif +endif + +# set the debug directory based on the debug status +ifeq ($(strip $(DEBUG)),TRUE) + DEBUGDIR = debug +else + DEBUGDIR = nodebug +endif + +ifeq ($(strip $(USE_ESMF_LIB)), TRUE) + ESMFDIR = esmf +else + ESMFDIR = noesmf +endif + +# Determine whether any C++ code will be included in the build; +# currently, C++ code is included if and only if we're linking to the +# trilinos library. +ifeq ($(strip $(USE_TRILINOS)), TRUE) + USE_CXX = true +else + USE_CXX = false +endif + +ifndef MOD_SUFFIX + MOD_SUFFIX := mod +endif + +#=============================================================================== +# set CPP options (must use this before any flags or cflags settings) +#=============================================================================== + +CPPDEFS := $(USER_CPPDEFS) + +# Unless DEBUG mode is enabled, use NDEBUG to turn off assert statements. +ifneq ($(strip $(DEBUG)),TRUE) + CPPDEFS += -DNDEBUG +endif + +# USE_ESMF_LIB is currently only defined in env_build.xml +ifeq ($(USE_ESMF_LIB), TRUE) + CPPDEFS += -DUSE_ESMF_LIB +endif + +ifeq ($(strip $(MPILIB)),mpi-serial) + CPPDEFS += -DNO_MPI2 +else + CPPDEFS += -DHAVE_MPI +endif +ifeq ($(compile_threaded), true) + CPPDEFS += -DTHREADED_OMP +endif + +ifeq (,$(EXEROOT)) + EXEROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) EXEROOT --value) +endif +ifeq (,$(BUILD_THREADED)) + BUILD_THREADED = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) BUILD_THREADED --value) +endif + +ifeq (,$(LIBROOT)) + LIBROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) LIBROOT --value) +endif +ifeq (,$(SHAREDLIBROOT)) + SHAREDLIBROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) SHAREDLIBROOT --value) +endif +ifeq (,$(COMPILER)) + COMPILER = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) COMPILER --value) +endif +ifeq (,$(NINST_VALUE)) + NINST_VALUE = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) NINST_VALUE --value) +endif +ifeq (,$(MPILIB)) + MPILIB = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) MPILIB --value) +endif +ifeq ($(strip $(PIO_VERSION)),1) + CPPDEFS += -DPIO1 +endif + + + +ifeq (,$(SHAREDPATH)) + SHAREDPATH = $(COMPILER)/$(MPILIB)/$(DEBUGDIR)/$(THREADDIR) +endif +INSTALL_SHAREDPATH = $(EXEROOT)/$(SHAREDPATH) + +include $(CASEROOT)/Macros.make +# Decide whether to use a C++ or Fortran linker, based on whether we +# are using any C++ code and the compiler-dependent CXX_LINKER variable +ifeq ($(USE_CXX), true) + # The following is essentially an "if... elseif... else", but gmake + # 3.80 and earlier doesn't support elseif + ifeq ($(CXX_LINKER), CXX) + LD := $(MPICXX) + endif + ifeq ($(CXX_LINKER), FORTRAN) + LD := $(MPIFC) + endif +endif +# Use this if LD has not already been defined. +ifeq ($(origin LD), default) + ifeq ($(strip $(MPILIB)),mpi-serial) + LD := $(SFC) + else + LD := $(MPIFC) + endif +endif + + + +ifeq ($(USE_CXX), true) + ifeq ($(SUPPORTS_CXX), FALSE) + $(error Fatal attempt to include C++ code on a compiler/machine combo that has not been set up to support C++) + endif +endif + +# Not clear how to escape commas for libraries with their own configure +# script, and they don't need this defined anyway, so leave this out of +# FPPDEFS. +ifeq ($(HAS_F2008_CONTIGUOUS),TRUE) + CONTIGUOUS_FLAG := -DUSE_CONTIGUOUS=contiguous, +else + CONTIGUOUS_FLAG := -DUSE_CONTIGUOUS= +endif + +ifdef CPRE + CONTIGUOUS_FLAG := $(subst $(comma),\\$(comma),$(CONTIGUOUS_FLAG)) + CONTIGUOUS_FLAG := $(patsubst -D%,$(CPRE)%,$(CONTIGUOUS_FLAG)) +endif + +ifndef AR + AR := ar +endif + +ifdef NETCDF_C_PATH + ifndef NETCDF_FORTRAN_PATH + $(error "NETCDF_C_PATH specified without NETCDF_FORTRAN_PATH") + endif + NETCDF_SEPARATE:=true + ifndef INC_NETCDF_C + INC_NETCDF_C:=$(NETCDF_C_PATH)/include + endif + ifndef INC_NETCDF_FORTRAN + INC_NETCDF_FORTRAN:=$(NETCDF_FORTRAN_PATH)/include + endif + ifndef LIB_NETCDF_C + LIB_NETCDF_C:=$(NETCDF_C_PATH)/lib + endif + ifndef LIB_NETCDF_FORTRAN + LIB_NETCDF_FORTRAN:=$(NETCDF_C_PATH)/lib + endif + else ifdef NETCDF_FORTRAN_PATH + $(error "NETCDF_FORTRAN_PATH specified without NETCDF_C_PATH") + else ifdef NETCDF_PATH + NETCDF_SEPARATE:=false + ifndef INC_NETCDF + INC_NETCDF:=$(NETCDF_PATH)/include + endif + ifndef LIB_NETCDF + LIB_NETCDF:=$(NETCDF_PATH)/lib + endif +else + # No Netcdf is an error unless target is clean or DEP + ifneq ($(MAKECMDGOALS), db_files) + ifneq ($(MAKECMDGOALS), db_flags) + ifeq (,$(findstring clean,$(MAKECMDGOALS))) + $(error NETCDF not found: Define NETCDF_PATH or NETCDF_C_PATH and NETCDF_FORTRAN_PATH in config_machines.xml or config_compilers.xml) + endif + endif + endif +endif + + +ifeq ($(MPILIB),mpi-serial) + ifdef PNETCDF_PATH + undefine PNETCDF_PATH + endif +else + ifdef PNETCDF_PATH + ifndef $(INC_PNETCDF) + INC_PNETCDF:=$(PNETCDF_PATH)/include + endif + ifndef LIB_PNETCDF + LIB_PNETCDF:=$(PNETCDF_PATH)/lib + endif + endif +endif +ifeq ($(strip $(USE_TRILINOS)), TRUE) + ifdef TRILINOS_PATH + ifndef INC_TRILINOS + INC_TRILINOS:=$(TRILINOS_PATH)/include + endif + ifndef LIB_TRILINOS + LIB_TRILINOS:=$(TRILINOS_PATH)/lib + endif + else + $(error TRILINOS_PATH must be defined when USE_TRILINOS is TRUE) + endif + + # get a bunch of variables related to this trilinos installation; + # these variables begin with "Trilinos_" + include $(INC_TRILINOS)/Makefile.export.Trilinos +endif + + +# Set HAVE_SLASHPROC on LINUX systems which are not bluegene or Darwin (OSx) + +ifeq ($(findstring -DLINUX,$(CPPDEFS)),-DLINUX) + ifneq ($(findstring DBG,$(CPPDEFS)),DBG) + ifneq ($(findstring Darwin,$(CPPDEFS)),Darwin) + CPPDEFS += -DHAVE_SLASHPROC + endif + endif +endif + +ifdef CPRE + FPPDEFS := $(subst $(comma),\\$(comma),$(CPPDEFS)) + FPPDEFS := $(patsubst -D%,$(CPRE)%,$(FPPDEFS)) +else + FPPDEFS := $(CPPDEFS) +endif + + +#=============================================================================== +# Set config args for pio and mct to blank and then enable serial +#=============================================================================== +ifndef CONFIG_ARGS + CONFIG_ARGS := +endif + +ifeq ($(findstring pio,$(MODEL)),pio) + CONFIG_ARGS+= --enable-timing + ifeq ($DEBUG,TRUE) + CONFIG_ARGS+= --enable-debug + endif +endif + +#=============================================================================== +# User-specified INCLDIR +#=============================================================================== + +INCLDIR := -I. +ifdef USER_INCLDIR + INCLDIR += $(USER_INCLDIR) +endif + +#=============================================================================== +# MPI-serial library (part of MCT) +#=============================================================================== + +ifeq ($(strip $(MPILIB)), mpi-serial) + CC := $(SCC) + FC := $(SFC) + CXX := $(SCXX) + MPIFC := $(SFC) + MPICC := $(SCC) + MPICXX := $(SCXX) + CONFIG_ARGS += MCT_PATH=$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial +else + CC := $(MPICC) + FC := $(MPIFC) + CXX := $(MPICXX) + ifdef MPI_PATH + INC_MPI := $(MPI_PATH)/include + LIB_MPI := $(MPI_PATH)/lib + endif +endif +CSM_SHR_INCLUDE:=$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/include +# This is needed so that dependancies are found +VPATH+=$(CSM_SHR_INCLUDE) +#=============================================================================== +# Set include paths (needed after override for any model specific builds below) +#=============================================================================== +INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CSM_SHR_INCLUDE) + +ifeq ($(NETCDF_SEPARATE), false) + INCLDIR += -I$(INC_NETCDF) +else ifeq ($(NETCDF_SEPARATE), true) + INCLDIR += -I$(INC_NETCDF_C) -I$(INC_NETCDF_FORTRAN) +endif +ifdef MOD_NETCDF + INCLDIR += -I$(MOD_NETCDF) +endif +ifdef INC_MPI + INCLDIR += -I$(INC_MPI) +endif +ifdef INC_PNETCDF + INCLDIR += -I$(INC_PNETCDF) +endif +ifdef INC_TRILINOS + INCLDIR += -I$(INC_TRILINOS) +endif + +ifndef MCT_LIBDIR + MCT_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef PIO_LIBDIR + PIO_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef GPTL_LIBDIR + GPTL_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef GLC_DIR + GLC_DIR=$(EXEROOT)/glc +endif +ifndef CISM_LIBDIR + CISM_LIBDIR=$(GLC_DIR)/lib +endif + +INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CIMEROOT)/src/share/util \ + -I$(CIMEROOT)/src/share/include -I$(CIMEROOT)/src/share/RandNum/include + +ifeq ($(MODEL),driver) + INCLDIR += -I$(EXEROOT)/atm/obj -I$(EXEROOT)/ice/obj -I$(EXEROOT)/ocn/obj -I$(EXEROOT)/glc/obj -I$(EXEROOT)/rof/obj -I$(EXEROOT)/wav/obj -I$(EXEROOT)/esp/obj +# nagfor and gcc have incompatible LDFLAGS. +# nagfor requires the weird "-Wl,-Wl,," syntax. +# If done in config_compilers.xml, we break MCT. + ifeq ($(strip $(COMPILER)),nag) + ifeq ($(NETCDF_SEPARATE), false) + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_PATH)/lib + else ifeq ($(NETCDF_SEPARATE), true) + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_C_PATH)/lib + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_FORTRAN_PATH)/lib + endif + endif +else + ifeq ($(strip $(COMPILER)),nag) + ifeq ($(DEBUG), TRUE) + ifeq ($(strip $(MACH)),hobart) + # GCC needs to be able to link to + # nagfor runtime to get autoconf + # tests to work. + CFLAGS += -Wl,--as-needed,--allow-shlib-undefined + SLIBS += -L$(COMPILER_PATH)/lib/NAG_Fortran -lf60rts + endif + endif + endif +endif + +# +# Use the MCT dir for the cache for all configure calls because it is the first one +# +CFLAGS+=$(CPPDEFS) +CXXFLAGS := $(CFLAGS) + +CONFIG_ARGS += CC="$(CC)" FC="$(FC)" MPICC="$(MPICC)" \ + MPIFC="$(MPIFC)" FCFLAGS="$(FFLAGS) $(FREEFLAGS) $(INCLDIR)" \ + CPPDEFS="$(CPPDEFS)" CFLAGS="$(CFLAGS) -I.. $(INCLDIR)" LDFLAGS="$(LDFLAGS)" + +ifeq ($(NETCDF_SEPARATE), false) + CONFIG_ARGS += NETCDF_PATH=$(NETCDF_PATH) +else ifeq ($(NETCDF_SEPARATE), true) + # The mct library needs the NetCDF_C library + CONFIG_ARGS += NETCDF_PATH=$(NETCDF_C_PATH) +endif + +ifeq ($(COMPILER),nag) + CONFIG_ARGS += LIBS="$(SLIBS)" +endif + +FFLAGS += $(FPPDEFS) +FFLAGS_NOOPT += $(FPPDEFS) + + +ifeq ($(findstring -cosp,$(CAM_CONFIG_OPTS)),-cosp) + # The following is for the COSP simulator code: + COSP_LIBDIR:=$(abspath $(EXEROOT)/atm/obj/cosp) +endif + +ifeq ($(MODEL),cam) + # These RRTMG files take an extraordinarily long time to compile with optimization. + # Until mods are made to read the data from files, just remove optimization from + # their compilation. +rrtmg_lw_k_g.o: rrtmg_lw_k_g.f90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< +rrtmg_sw_k_g.o: rrtmg_sw_k_g.f90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< + + +ifdef COSP_LIBDIR +INCLDIR+=-I$(COSP_LIBDIR) -I$(COSP_LIBDIR)/../ -I../$(INSTALL_SHAREDPATH)/include -I../$(CSM_SHR_INCLUDE) +$(COSP_LIBDIR)/libcosp.a: cam_abortutils.o + $(MAKE) -C $(COSP_LIBDIR) F90='$(FC)' F90FLAGS='$(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS) $(FC_AUTO_R8)' \ + F90FLAGS_noauto='$(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS)' \ + F90FLAGS_fixed='$(INCLDIR) $(INCS) $(FIXEDFLAGS) $(FFLAGS) $(FC_AUTO_R8)' + +cospsimulator_intr.o: $(COSP_LIBDIR)/libcosp.a +endif + +endif + +# Set esmf.mk location with ESMF_LIBDIR having precedent over ESMFMKFILE +CCSM_ESMFMKFILE := undefined_CCSM_ESMFMKFILE +ifdef ESMFMKFILE + CCSM_ESMFMKFILE := $(ESMFMKFILE) +endif +ifdef ESMF_LIBDIR + CCSM_ESMFMKFILE := $(ESMF_LIBDIR)/esmf.mk +endif + + +# System libraries (netcdf, mpi, pnetcdf, esmf, trilinos, etc.) + +ifeq ($(NETCDF_SEPARATE), false) + SLIBS += -L$(LIB_NETCDF) -lnetcdff -lnetcdf +else ifeq ($(NETCDF_SEPARATE), true) + SLIBS += -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf +endif + +ifdef LIB_PNETCDF + SLIBS += -L$(LIB_PNETCDF) -lpnetcdf +endif +ifdef LAPACK_LIBDIR + SLIBS += -L$(LAPACK_LIBDIR) -llapack -lblas +endif +ifdef LIB_MPI + ifndef MPI_LIB_NAME + SLIBS += -L$(LIB_MPI) -lmpi + else + SLIBS += -L$(LIB_MPI) -l$(MPI_LIB_NAME) + endif +endif + +# For compiling and linking with external ESMF. +# If linking to external ESMF library then include esmf.mk +# ESMF_F90COMPILEPATHS +# ESMF_F90LINKPATHS +# ESMF_F90LINKRPATHS +# ESMF_F90ESMFLINKLIBS +ifeq ($(USE_ESMF_LIB), TRUE) + -include $(CCSM_ESMFMKFILE) + FFLAGS += $(ESMF_F90COMPILEPATHS) + SLIBS += $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) $(ESMF_F90ESMFLINKLIBS) +endif + +# Add trilinos libraries; too be safe, we include all libraries included in the trilinos build, +# as well as all necessary third-party libraries +ifeq ($(strip $(USE_TRILINOS)), TRUE) + SLIBS += -L$(LIB_TRILINOS) $(Trilinos_LIBRARIES) $(Trilinos_TPL_LIBRARY_DIRS) $(Trilinos_TPL_LIBRARIES) +endif + +# Add libraries and flags that we need on the link line when C++ code is included +# We need to do these additions after CONFIG_ARGS is set, because they can sometimes break configure for mct, etc., +# if they are added to LDFLAGS in CONFIG_ARGS. +ifeq ($(USE_CXX), true) + ifdef CXX_LIBS + SLIBS += $(CXX_LIBS) + endif + + ifdef CXX_LDFLAGS + LDFLAGS += $(CXX_LDFLAGS) + endif +endif + +# Machine stuff to appear last on the link step +ifndef MLIBS + MLIBS := +endif + +#------------------------------------------------------------------------------ +# Drive configure scripts for support libraries (mct) +#------------------------------------------------------------------------------ + +$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/Makefile.conf: + @echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \ + $(CONFIG_SHELL) $(CIMEROOT)/src/externals/mct/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/src/externals/mct + +$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial/Makefile.conf: + @echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \ + $(CONFIG_SHELL) $(CIMEROOT)/src/externals/mct/mpi-serial/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/src/externals/mct/mpi-serial + +ifeq ($(PIO_VERSION),2) +# This is a pio2 library + PIOLIB = $(PIO_LIBDIR)/libpiof.a $(PIO_LIBDIR)/libpioc.a + PIOLIBNAME = -lpiof -lpioc + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio2 +else +# This is a pio1 library + PIOLIB = $(PIO_LIBDIR)/libpio.a + PIOLIBNAME = -lpio + ifneq ("$(wildcard $(CIMEROOT)/src/externals/pio1/pio)", "") + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio1 + else + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio1/pio + endif +endif + +MCTLIBS = $(MCT_LIBDIR)/libmct.a $(MCT_LIBDIR)/libmpeu.a + +GPTLLIB = $(GPTL_LIBDIR)/libgptl.a + +ULIBS += -L$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/lib -lcsm_share -L$(INSTALL_SHAREDPATH)/lib $(PIOLIBNAME) -lgptl -lmct -lmpeu + +#------------------------------------------------------------------------------ +# Drive cmake script for cism and pio +#------------------------------------------------------------------------------ + +ifndef CMAKE_OPTS + CMAKE_OPTS := +endif +# note that the fortran flags include neither the FREEFLAGS nor the +# FIXEDFLAGS, so that both free & fixed code can be built (cmake +# doesn't seem to be able to differentiate between free & fixed +# fortran flags) +CMAKE_OPTS += -D CMAKE_Fortran_FLAGS:STRING="$(FFLAGS) $(INCLDIR)" \ + -D CMAKE_C_FLAGS:STRING="$(CFLAGS) $(INCLDIR)" \ + -D CMAKE_CXX_FLAGS:STRING="$(CXXFLAGS) $(INCLDIR)" \ + -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -D GPTL_PATH:STRING=$(INSTALL_SHAREDPATH) \ + -D PIO_ENABLE_TESTS:BOOL=OFF \ + -D USER_CMAKE_MODULE_PATH:LIST="$(CIMEROOT)/src/CMake;$(CIMEROOT)/src/externals/pio2/cmake" \ + +# Allow for separate installations of the NetCDF C and Fortran libraries +ifeq ($(NETCDF_SEPARATE), false) + CMAKE_OPTS += -D NetCDF_PATH:PATH=$(NETCDF_PATH) +else ifeq ($(NETCDF_SEPARATE), true) + CMAKE_OPTS += -D NetCDF_C_PATH:PATH=$(NETCDF_C_PATH) \ + -D NetCDF_Fortran_DIR:PATH=$(NETCDF_FORTRAN_PATH) +endif + +ifdef PNETCDF_PATH + CMAKE_OPTS += -D PnetCDF_PATH:STRING="$(PNETCDF_PATH)" +else + CMAKE_OPTS += -D WITH_PNETCDF:LOGICAL=FALSE -D PIO_USE_MPIIO:LOGICAL=FALSE +endif + +# NAG doesn't get along too nicely with PnetCDF Fortran interfaces. +ifeq ($(COMPILER),nag) + ifeq ($(PIO_VERSION),1) + CMAKE_OPTS += -D WITH_PNETCDF:LOGICAL=FALSE -D PIO_USE_MPIIO:LOGICAL=FALSE + endif +endif + +ifdef PIO_FILESYSTEM_HINTS + CMAKE_OPTS += -D PIO_FILESYSTEM_HINTS:STRING="$(PIO_FILESYSTEM_HINTS)" +endif + +# This captures the many cism-specific options to cmake +CMAKE_OPTS += $(USER_CMAKE_OPTS) + +# CMake doesn't seem to like it when you define compilers via -D +# CMAKE_C_COMPILER, etc., when you rerun cmake with an existing +# cache. So doing this via environment variables instead. +ifndef CMAKE_ENV_VARS + CMAKE_ENV_VARS := +endif +CMAKE_ENV_VARS += CC=$(CC) \ + CXX=$(CXX) \ + FC=$(FC) \ + LDFLAGS="$(LDFLAGS)" + + +# We declare $(GLC_DIR)/Makefile to be a phony target so that cmake is +# always rerun whenever invoking 'make $(GLC_DIR)/Makefile'; this is +# desirable to pick up any new source files that may have been added +.PHONY: $(GLC_DIR)/Makefile +$(GLC_DIR)/Makefile: + cd $(GLC_DIR); \ + $(CMAKE_ENV_VARS) cmake $(CMAKE_OPTS) $(CIMEROOT)/../components/cism/glimmer-cism + +$(PIO_LIBDIR)/Makefile: + cd $(PIO_LIBDIR); \ + $(CMAKE_ENV_VARS) cmake $(CMAKE_OPTS) $(PIO_SRC_DIR) + +#------------------------------------------------------------------------------- +# Build & include dependency files +#------------------------------------------------------------------------------- + +touch_filepath: + touch Filepath + +# Get list of files and build dependency file for all .o files +# using perl scripts mkSrcfiles and mkDepends +# if a source is of form .F90.in strip the .in before creating the list of objects +SOURCES := $(shell cat Srcfiles) +BASENAMES := $(basename $(basename $(SOURCES))) +OBJS := $(addsuffix .o, $(BASENAMES)) +INCS := $(foreach dir,$(cpp_dirs),-I$(dir)) + +CASETOOLS := $(CASEROOT)/Tools + +Depends: Srcfiles Deppath + $(CASETOOLS)/mkDepends $(USER_MKDEPENDS_OPTS) Deppath Srcfiles > $@ + +Deppath: Filepath + $(CP) -f Filepath $@ + @echo "$(MINCROOT)" >> $@ + +Srcfiles: Filepath + $(CASETOOLS)/mkSrcfiles + +Filepath: + @echo "$(VPATH)" > $@ + + +#------------------------------------------------------------------------------- +# echo file names, paths, compile flags, etc. used during build +#------------------------------------------------------------------------------- + +db_files: + @echo " " + @echo "* MACFILE := $(MACFILE)" + @echo "* VPATH := $(VPATH)" + @echo "* INCS := $(INCS)" + @echo "* OBJS := $(OBJS)" +db_flags: + @echo " " + @echo "* cc := $(CC) $(CFLAGS) $(INCS) $(INCLDIR)" + @echo "* .F.o := $(FC) $(FFLAGS) $(FIXEDFLAGS) $(INCS) $(INCLDIR)" + @echo "* .F90.o := $(FC) $(FFLAGS) $(FREEFLAGS) $(INCS) $(INCLDIR)" + ifeq ($(USE_CXX), true) + @echo "* .cpp.o := $(CXX) $(CXXFLAGS) $(INCS) $(INCLDIR)" + endif + +#------------------------------------------------------------------------------- +# Rules used for the tests run by "configure -test" +#------------------------------------------------------------------------------- + +test_fc: test_fc.o + $(LD) -o $@ test_fc.o $(LDFLAGS) +ifeq ($(NETCDF_SEPARATE), false) +test_nc: test_nc.o + $(LD) -o $@ test_nc.o -L$(LIB_NETCDF) -lnetcdff -lnetcdf $(LDFLAGS) +else ifeq ($(NETCDF_SEPARATE), true) +test_nc: test_nc.o + $(LD) -o $@ test_nc.o -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf $(LDFLAGS) +endif +test_mpi: test_mpi.o + $(LD) -o $@ test_mpi.o $(LDFLAGS) +test_esmf: test_esmf.o + $(LD) -o $@ test_esmf.o $(LDFLAGS) + +#------------------------------------------------------------------------------- +# create list of component libraries +#------------------------------------------------------------------------------ +CLMVER = $(filter $(CLM_CONFIG_OPTS), clm5_0 clm4_5) +ifeq ($(CLMVER),$(null)) + LNDOBJDIR = $(EXEROOT)/lnd/obj + LNDLIBDIR=$(LIBROOT) + LNDLIB := liblnd.a + INCLDIR += -I$(LNDOBJDIR) +else + LNDOBJDIR = $(SHAREDLIBROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/clm/obj + LNDLIBDIR = $(EXEROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/lib + LNDLIB := libclm.a + INCLDIR += -I$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/include + ifeq ($(MODEL),clm) + INCLUDE_DIR = $(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/include + endif +endif + + +ifeq ($(ULIBDEP),$(null)) + ifneq ($(LIBROOT),$(null)) + ULIBDEP += $(LIBROOT)/libatm.a + ULIBDEP += $(LIBROOT)/libice.a + ULIBDEP += $(LNDLIBDIR)/$(LNDLIB) + ULIBDEP += $(LIBROOT)/libocn.a + ULIBDEP += $(LIBROOT)/librof.a + ULIBDEP += $(LIBROOT)/libglc.a + ULIBDEP += $(LIBROOT)/libwav.a + ULIBDEP += $(LIBROOT)/libesp.a + ifeq ($(COMP_GLC), cism) + ULIBDEP += $(CISM_LIBDIR)/libglimmercismfortran.a + ifeq ($(CISM_USE_TRILINOS), TRUE) + ULIBDEP += $(CISM_LIBDIR)/libglimmercismcpp.a + endif + endif + ifeq ($(OCN_SUBMODEL),moby) + ULIBDEP += $(LIBROOT)/libmoby.a + endif + endif +endif + +ifdef COSP_LIBDIR + ULIBDEP += $(COSP_LIBDIR)/libcosp.a +endif + + +ifndef CLIBS + ifdef ULIBDEP + # For each occurrence of something like /path/../foo/libbar.a in ULIBDEP, + # CLIBS will contain -L/path/../foo -lbar + CLIBS := $(foreach LIBDEP,$(strip $(ULIBDEP)), -L$(dir $(LIBDEP)) $(patsubst lib%.a,-l%,$(notdir $(LIBDEP)))) + endif +endif + +# libcsm_share.a is in ULIBDEP, but -lcsm_share is in ULIBS rather than CLIBS, +# so this needs to be added after creating CLIBS above +CSMSHARELIB = $(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/lib/libcsm_share.a +ULIBDEP += $(CSMSHARELIB) + +#------------------------------------------------------------------------------- +# build rules: +#------------------------------------------------------------------------------- + +.SUFFIXES: +.SUFFIXES: .F90 .F .f90 .f .c .cpp .o .in + +ifeq ($(MPILIB),mpi-serial) + MPISERIAL = $(INSTALL_SHAREDPATH)/lib/libmpi-serial.a + MLIBS += $(MPISERIAL) + CMAKE_OPTS += -DMPI_C_INCLUDE_PATH=$(INSTALL_SHAREDPATH)/include \ + -DMPI_Fortran_INCLUDE_PATH=$(INSTALL_SHAREDPATH)/include \ + -DMPI_C_LIBRARIES=$(INSTALL_SHAREDPATH)/lib/libmpi-serial.a \ + -DMPI_Fortran_LIBRARIES=$(INSTALL_SHAREDPATH)/lib/libmpi-serial.a +endif + +$(MCTLIBS) : $(MPISERIAL) + +$(PIOLIB) : $(MPISERIAL) $(GPTLLIB) + +$(CSMSHARELIB): $(MCTLIBS) $(PIOLIB) $(GPTLLIB) +ifneq ($(MODEL),csm_share) + $(OBJS): $(CSMSHARELIB) +endif + +$(EXEC_SE): $(OBJS) $(ULIBDEP) $(CSMSHARELIB) $(MCTLIBS) $(PIOLIB) $(GPTLLIB) + $(LD) -o $(EXEC_SE) $(OBJS) $(CLIBS) $(ULIBS) $(SLIBS) $(MLIBS) $(LDFLAGS) + +ifdef INCLUDE_DIR + $(COMPLIB): $(OBJS) + $(AR) -r $(COMPLIB) $(OBJS) + $(CP) *.$(MOD_SUFFIX) *.h $(INCLUDE_DIR) +else + $(COMPLIB): $(OBJS) + $(AR) -r $(COMPLIB) $(OBJS) +endif + +.c.o: + $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) $< +.F.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FIXEDFLAGS) $< +.f.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FIXEDFLAGS) $< +.f90.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $< +.F90.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) $< + +.cpp.o: + $(CXX) -c $(INCLDIR) $(INCS) $(CXXFLAGS) $< + +%.F90: %.F90.in + $(CIMEROOT)/src/externals/genf90/genf90.pl $< > $@ + +cleanatm: + $(RM) -f $(LIBROOT)/libatm.a + $(RM) -fr $(EXEROOT)/atm/obj + +cleancpl: + $(RM) -fr $(EXEROOT)/cpl/obj + +cleanocn: + $(RM) -f $(LIBROOT)/libocn.a + $(RM) -fr $(EXEROOT)/ocn/obj + +cleanwav: + $(RM) -f $(LIBROOT)/libwav.a + $(RM) -fr $(EXEROOT)/wav/obj + +cleanglc: + $(RM) -f $(LIBROOT)/libglc.a + $(RM) -fr $(EXEROOT)/glc + +cleanesp: + $(RM) -f $(LIBROOT)/libesp.a + $(RM) -fr $(EXEROOT)/esp/obj + +cleanice: + $(RM) -f $(LIBROOT)/libice.a + $(RM) -fr $(EXEROOT)/ice/obj + +cleanrof: + $(RM) -f $(LIBROOT)/librof.a + $(RM) -fr $(EXEROOT)/rof/obj + +cleanlnd: + $(RM) -f $(LNDLIBDIR)/$(LNDLIB) + $(RM) -fr $(LNDOBJDIR) + +cleancsmshare: + $(RM) -f $(CSMSHARELIB) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/csm_share + +cleanpio: + $(RM) -f $(PIO_LIBDIR)/libpio* + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/pio + +cleanmct: + $(RM) -f $(MCTLIBS) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/mct + +cleangptl: + $(RM) -f $(GPTLLIB) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/gptl + +clean: cleanatm cleanocn cleanwav cleanglc cleanesp cleanice cleanrof cleanlnd + +realclean: clean cleancsmshare cleanpio cleanmct cleangptl + +# the if-tests prevent DEPS files from being created when they're not needed +ifneq ($(MAKECMDGOALS), db_files) +ifneq ($(MAKECMDGOALS), db_flags) +ifeq (,$(findstring clean,$(MAKECMDGOALS))) + -include Depends $(CASEROOT)/Depends.$(COMPILER) $(CASEROOT)/Depends.$(MACH) +endif +endif +endif diff --git a/README b/README new file mode 100644 index 0000000000..3bafbe274e --- /dev/null +++ b/README @@ -0,0 +1,15 @@ +config_pes_pop.xml +current assumptions: + prognostic: pop, cice + data: datm, drof + stub: slnd, sglc +DATM.+XLND.+CICE.+POP.+DROF.+SGLC +The current attributes that are supported are + lcompset_matchN= (where N can be any number) + pecount=[S,M,L,XL] + +Please refer to the documentation in the config_machines.xml and config_compilers.xml files. + + + + diff --git a/config_batch.xml b/config_batch.xml new file mode 100644 index 0000000000..1bce3dea66 --- /dev/null +++ b/config_batch.xml @@ -0,0 +1,491 @@ + + + + + + + + + + + + + + + + + + + + + + + + + qstat + qsub + qdel + -v + + (\d+) + --dependencies + %H:%M:%s + -M + + + + + + + + + + + + + + + qstat + qsub + qdel + -v + #COBALT + (\d+) + --dependencies + -M + + + + + + + + + + + + + bjobs + bsub + bkill + < + #BSUB + <(\d+)> + -w 'done(jobid)' + %H:%M + -u + + + + + + + + + -n {{ total_tasks }} + -R "span[ptile={{ tasks_per_node }}]" + -N + -a {{ poe }} + -o {{ job_id }}.%J + -e {{ job_id }}.%J + -J {{ job_id }} + + + + + qstat + qsub + qdel + -v + #PBS + ^(\S+)$ + -W depend=afterok:jobid + %H:%M:%S + -M + -m + , bea, b, e, a + + + + + + + -N {{ job_id }} + -r {{ rerunnable }} + + -j oe + -V + + + + + squeue + scancel + #SBATCH + (\d+)$ + --dependency=afterok:jobid + %H:%M:%S + --mail-user + --mail-type + none, all, begin, end, fail + + + + + + + --job-name={{ job_id }} + --nodes={{ num_nodes }} + --ntasks-per-node={{ tasks_per_node }} + --output={{ job_id }} + --exclusive + + + + + + + -S {{ shell }} + + + + + + + -S {{ shell }} + + + + + + + -S {{ shell }} + + + batch + + + + + + + -l nodes={{ num_nodes }}:ppn={{ tasks_per_node }}:xe + -S {{ shell }} + + + regular + debug + + + + + + + -S {{ shell }} + + + + + + ^(\d+) + + -A $PROJECT + -l mppwidth={{ mppwidth }} + -l nodes={{ num_nodes }} + -S {{ shell }} + + + + + + + -S {{ shell }} + + + + + + + -A cpo + -l {{ partition }} + -l size={{ mppsize }} + -E + -d $RUNDIR + -o $RUNDIR/$CASE.out + -S /bin/bash + + + debug + batch + + + + + + + -l nodes={{ num_nodes }}:ppn={{ tasks_per_node }} + -S {{ shell }} + + + short + medium + long + overnight + monster + + + + + + sbatch + #MSUB + + -A ees + -l gres=lscratchd + + + + + + -S {{ shell }} + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} + + + regular + + + + + + -S {{ shell }} + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} + + + regular + + + + + + default + + + + + + default + + + + + sbatch + + queue + + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=bro + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=has + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=ivy + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=san + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + sbatch + #MSUB + + + -A ees + -l nodes={{ num_nodes }} + -l gres=lscratchd + + + + + sbatch + + batch + + + + + sbatch + + -C haswell + + + regular + + + + + + sbatch + + -C knl,quad,cache + -S 2 + + + regular + + + + + + sbatch + + regular + debug + + + + + ssh stampede.tacc.utexas.edu cd $CASEROOT ; sbatch + + normal + development + + + + + sbatch + + default + + + + + + + -S {{ shell }} + + + + + sbatch + + + + + caldera + regular + capability + premium + + + + + sbatch + + --qos=lr_normal + --partition=lr3 + --account={{ project }} + + + lr3 + + + + + sbatch + + --qos=lr_normal + --partition=lr2 + --account={{ project }} + + + lr2 + + + + + + + + $BUILD_COMPLETE and not $TEST + + + + $BUILD_COMPLETE and $TEST + + + + 1 + + case.run or case.test + $DOUT_S + + + + diff --git a/config_compilers.xml b/config_compilers.xml new file mode 100644 index 0000000000..515f6f3e41 --- /dev/null +++ b/config_compilers.xml @@ -0,0 +1,1113 @@ + + + + + + + -DOS + -D_USE_FLOW_CONTROL + + FALSE + + + + + -h noomp + -g -O0 + -O2 + + + + -DFORTRANUNDERSCORE -DNO_R16 -DCPRCRAY + -DDIR=NOOP + -DDIR=NOOP + + + -s real64 + + + -f free -N 255 -h byteswapio -x dir + -h noomp + -g -O0 -K trap=fp -m1 + -O2,ipa2 -em + + + -O1,fp2,ipa0,scalar0,vector0 + + TRUE + + -Wl,--allow-multiple-definition -h byteswapio + + + + + + -std=gnu99 + -fopenmp + -g -Wall -Og -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds + -O + + + + -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU + + FORTRAN + + -fdefault-real-8 + + + + -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none + -fopenmp + + -g -Wall -Og -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds + -O + + + -O0 + + + -ffixed-form + + + -ffree-form + + FALSE + + -fopenmp + + mpicc + mpicxx + mpif90 + gcc + g++ + gfortran + TRUE + + + + + -g -qfullpath -qmaxmem=-1 + -O3 + -qsmp=omp + -qsmp=omp:noopt + + + + -DFORTRAN_SAME -DCPRIBM + + -WF,-D + + -qrealsize=8 + + + -g -qfullpath -qmaxmem=-1 + -O2 -qstrict -qinline=auto + -qsmp=omp + -qinitauto=7FF7FFFF -qflttrap=ov:zero:inv:en + -qsmp=omp:noopt + -C + + + -qsuffix=f=f -qfixed=132 + + + -qsuffix=f=f90:cpp=F90 + + TRUE + + -qsmp=omp + -qsmp=omp:noopt + + + + + + -qno-opt-dynamic-align -fp-model precise -std=gnu99 + -qopenmp + -O2 -debug minimal + -O0 -g + + + + -DFORTRANUNDERSCORE -DCPRINTEL + + + -cxxlib + + FORTRAN + + -r8 + + + -qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source + -qopenmp + -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created + -O2 -debug minimal + + + -O0 + -qopenmp + + + -fixed -132 + + + -free + + TRUE + + -qopenmp + + mpicc + mpicxx + mpif90 + icc + icpc + ifort + + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl + + TRUE + + + + + -std=gnu99 + -g + + + -DFORTRANUNDERSCORE -DNO_CRAY_POINTERS -DNO_SHR_VMATH -DCPRNAG + + + -r8 + + + + + -Wp,-macro=no_com -convert=BIG_ENDIAN -indirect $ENV{CIMEROOT}/config/cesm/machines/nag_mpi_argument.txt + + -ieee=full -O2 + + + -C=all -g -time -f2003 -ieee=stop + -gline + + -mismatch_all + + + -Wp,-macro=no_com -convert=BIG_ENDIAN -indirect $ENV{CIMEROOT}/config/cesm/machines/nag_mpi_argument.txt + -ieee=full + + + + -g -time -f2003 -ieee=stop + -gline + + + -fixed + + + -free + + FALSE + mpicc + mpif90 + gcc + nagfor + + + + + -gopt -time + -mp + + + + + + + + + + + + + + + + + + + + + + + + + + + + -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16 -DCPRPGI + + CXX + + -r8 + + + -i4 -gopt -time -Mextend -byteswapio -Mflushz -Kieee + -mp + -O0 -g -Ktrap=fp -Mbounds -Kieee + -Mnovect + -Mnovect + -Mnovect + -Mnovect + -Mnovect + -Mnovect + + + -O0 -g -Ktrap=fp -Mbounds -Kieee + -mp + + + -Mfixed + + + -Mfree + + + + FALSE + + -time -Wl,--allow-multiple-definition + -mp + + mpicc + mpicxx + mpif90 + pgcc + pgc++ + pgf95 + + + + + -qarch=auto -qtune=auto -qcache=auto + + /usr/bin/bash + + -qarch=auto -qtune=auto -qcache=auto -qsclk=micro + -qspill=6000 + + + -qsigtrap=xl__trcedump + -bdatapsize:64K -bstackpsize:64K -btextpsize:32K + + mpcc_r + mpxlf2003_r + cc_r + xlf2003_r + + -lmassv -lessl + -lmass + + + + + + --build=powerpc-bgp-linux --host=powerpc64-suse-linux + + + -DLINUX + + + -g -qfullpath -qmaxmem=-1 -qspillsize=2500 -qextname=flush + -O3 -qstrict -qinline=auto + -qsmp=omp + -qsmp=omp:noopt + + + -Wl,--relax -Wl,--allow-multiple-definition + + + + + + -DCMAKE_SYSTEM_NAME=Catamount + + + -DLINUX + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + cc + CC + ftn + $ENV{NETCDF_DIR} + lustre + $ENV{PARALLEL_NETCDF_DIR} + cc + CC + ftn + + + + + -DSYSDARWIN + + + + + + -heap-arrays + + + + + + -DHAVE_PAPI + + lustre + + + + + -O2 + -nofma + + + -lmpichf90_pgi $ENV{PGI_PATH}/linux86-64/$ENV{PGI_VERSION}/lib/f90main.o + + + -O2 + -nofma + + TRUE + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi -L$ENV{MKL_PATH} -lmkl_rt + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + --host=Linux + + + -xCORE-AVX2 + + + -xCORE-AVX2 + + + -L$(NETCDF_DIR) -lnetcdff -Wl,--as-needed,-L$(NETCDF_DIR)/lib -lnetcdff -lnetcdf + + + -DHAVE_PAPI -DHAVE_SLASHPROC + + + -mkl + + + FALSE + + + + + + --host=Linux + + + -xMIC-AVX512 + + + -xMIC-AVX512 + + + -L$(NETCDF_DIR) -lnetcdff -Wl,--as-needed,-L$(NETCDF_DIR)/lib -lnetcdff -lnetcdf + + + -DHAVE_SLASHPROC + + + -mkl -lmemkind -zmuldefs + + + FALSE + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 + -nomp + + + --host=Linux + + + -DLINUX + + + -O2 + -nomp + + + -nomp + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 + + + --host=Linux + + + -DHAVE_PAPI + + + -O2 + + + -L$ENV{NETCDF_DIR} -lnetcdff -Wl,--as-needed,-L$ENV{NETCDF_DIR}/lib -lnetcdff -lnetcdf + + + + + + -O2 + + + -O2 + + + -Wl,-rpath /usr/local/tools/netcdf-pgi-4.1.3/lib + + mpich + /usr/local/tools/mvapich2-pgi-1.7/ + /usr/local/tools/netcdf-pgi-4.1.3 + + $SHELL{/usr/local/tools/netcdf-pgi-4.1.3/bin/nc-config --flibs} + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + /usr/lib64 + mpich + $ENV{NETCDF_PATH} + + -L$NETCDF_PATH/lib -lnetcdff -lnetcdf + + + + + + -lifcore + + + -lifcore + -mcmodel medium + + + -lquadmath + -Wl,-rpath,${NETCDF_PATH}/lib + -Wl,-rpath,$ENV{COMPILER_PATH}/lib/intel64 + -Wl,-rpath,$ENV{COMPILER_PATH}/mkl/lib/intel64 + -Wl,-rpath,$ENV{MPI_PATH}/lib + -lifcore + + + -mkl=cluster + + /fs/cgd/csm/tools/pFUnit/pFUnit3.2.8_hobart_Intel15.0.2_noMPI_noOpenMP + + + + + + -DNO_C_SIZEOF + + + -lpthread + + + -L/usr/local/nag/lib/NAG_Fortran + + + + + + -O0 + + + -O0 + + + -lgomp + -Wl,-R${NETCDF_PATH}/lib + -Wl,-R$ENV{COMPILER_PATH}/lib + -Wl,-R$ENV{COMPILER_PATH}/libso + + + + + + -lm + -ldl + + + + + + + -framework Accelerate + + + + + mpixlc_r + mpixlf2003_r + /bgsys/local/netcdf/ + gpfs + /bgsys/local/parallel-netcdf/v1.3.1 + mpixlc_r + mpixlf2003_r + + -L/bgsys/local/netcdf/lib -lnetcdf -L/bgsys/drivers/ppcfloor/comm/lib + + + + + /projects/install/rhel6-x86_64/ACME/AlbanyTrilinos/Albany/build/install + + -O2 + + + --host=Linux + + + -lstdc++ -lmpi_cxx + + + -O2 + + $ENV{NETCDFROOT} + $ENV{PNETCDFROOT} + + $SHELL{${NETCDF_PATH}/bin/nf-config --flibs} -lblas -llapack + + + + + + -qfloat=nomaf + + + -qfloat=nomaf + + $ENV{HDF5} + + + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf77_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlc_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf2003_r + /soft/libraries/netcdf/4.3.3-f4.4.1/cnk-xl/current/ + gpfs + /soft/libraries/pnetcdf/1.6.1/cnk-xl/current/ + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlc_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf2003_r + + -L${NETCDF_PATH}/lib -lnetcdff -lnetcdf -L$ENV{HDF5}/lib -lhdf5_hl -lhdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -L/soft/libraries/alcf/current/xl/LAPACK/lib -llapack -L/soft/libraries/alcf/current/xl/BLAS/lib -lblas -L/bgsys/drivers/ppcfloor/comm/sys/lib + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_LIB}/.. + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 -xCORE-AVX2 + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xCORE-AVX2 + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xAVX + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xAVX + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -Wl,-rpath /usr/local/tools/netcdf-pgi-4.1.3/lib + + mpich + /usr/local/tools/mvapich2-pgi-1.7/ + /usr/local/tools/netcdf-pgi-4.1.3 + + $SHELL{/usr/local/tools/netcdf-pgi-4.1.3/bin/nc-config --flibs} + + + + + + -O2 + + + --host=Linux + + /projects/ccsm/esmf-6.3.0rp1/lib/libO/Linux.intel.64.openmpi.default + + -O2 + + $ENV{NETCDFROOT} + lustre + $ENV{PNETCDFROOT} + + -L${NETCDF_PATH}/lib -lnetcdff -L/projects/ccsm/BLAS-intel -lblas_LINUX + + + + + + -DHAVE_NANOTIME + + $ENV{TACC_NETCDF_DIR} + lustre + $ENV{TACC_PNETCDF_DIR} + + + + + -xHost + + + -xHost + -mcmodel medium + + + -L$ENV{TACC_HDF5_LIB} -lhdf5 + + + $SHELL{${NETCDF_PATH}/bin/nf-config --flibs} -L$ENV{TACC_HDF5_LIB} -lhdf5 + + $ENV{TRILINOS_PATH} + + + + + -xMIC-AVX512 + + + -xMIC-AVX512 + + + --host=Linux + + + -L$(NETCDF_DIR)/lib -lnetcdff -L$(NETCDF_DIR)/lib -lnetcdf -Wl,-rpath -Wl,$(NETCDF_DIR)/lib + + + + + + /soft/libraries/hdf5/1.8.10/cnk-xl/current/ + + + mpixlf77_r + mpixlc_r + mpixlf2003_r + /soft/libraries/netcdf/4.3.0-f4.2/cnk-xl/V1R2M0-20131211/ + gpfs + /soft/libraries/pnetcdf/1.3.1/cnk-xl/current/ + mpixlc_r + mpixlf2003_r + + -L${NETCDF_PATH}/lib -lnetcdff -lnetcdf -L/soft/libraries/hdf5/1.8.10/cnk-xl/current/lib -lhdf5_hl -lhdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -L/soft/libraries/alcf/current/xl/LAPACK/lib -llapack -L/soft/libraries/alcf/current/xl/BLAS/lib -lblas -L/bgsys/drivers/ppcfloor/comm/sys/lib + + + + + + + + + + + + + + USERDEFINED_MUST_EDIT_THIS + + + # USERDEFINED $SHELL{${NETCDF_PATH}/bin/nc-config --flibs} + + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + + -DNO_MPIMOD + + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + -qopt-report -xCORE_AVX2 -no-fma + + + -qopt-report -xCORE_AVX2 -no-fma + + + -DPIO_ENABLE_LOGGING=ON + + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_noMPI_noOpenMP + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_MPI_openMP + + FALSE + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + -vec-report + + + -vec-report + + + -DPIO_ENABLE_LOGGING=ON + + + + + /glade/apps/opt/lib + gcc + gfortran + + + + + -xHost + + + -DINTEL_MKL -DHAVE_SSE2 + + + -xHost + + mpiicpc + /glade/apps/opt/papi/5.3.0/intel/12.1.5/include/ + /glade/apps/opt/papi/5.3.0/intel/12.1.5/lib64 + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.1_yellowstone_Intel15.0.1_noMPI_noOpenMP + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.1_Intel15.0.1_MPI + + icc + ifort + ${MPICC} + ${MPIFC} + + -Wl,-rpath ${PAPI_LIB} -L${PAPI_LIB} -lpapi + + $ENV{TRILINOS_PATH} + + + + + -O + + + -O + + + -llapack -lblas + + pgcc + pgfortran + + + + + -DHAVE_VPRINTF -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + + -lnetcdff -lnetcdf -mkl + + + -ftrapuv + + + -ftrapuv + + $ENV{NETCDF_DIR} + + + + + -DHAVE_VPRINTF -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + + -lnetcdff -lnetcdf -mkl + + + -ftrapuv + + + -ftrapuv + + $ENV{NETCDF_DIR} + + + diff --git a/config_machines.xml b/config_machines.xml new file mode 100644 index 0000000000..d4515959f2 --- /dev/null +++ b/config_machines.xml @@ -0,0 +1,1965 @@ + + + + + + + + ORNL XE6, os is CNL, 32 pes/node, batch system is PBS + h2o + CNL + pgi,cray,gnu + mpich + /scratch/sciteam/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/inputdata/atm/datm7 + /scratch/sciteam/$USER/archive/$CASE + $ENV{CESMDATAROOT}/ccsm_baselines + $ENV{CESMDATAROOT}/tools/ccsm_cprnc/cprnc + 8 + pbs + cseg + 32 + 16 + TRUE + + aprun + + -n $TOTALPES + + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/3.2.10.3/bin/modulecmd perl + /opt/modules/3.2.10.3/bin/modulecmd python + module + module + + PrgEnv-pgi + PrgEnv-cray + PrgEnv-gnu + pgi + cray + + + PrgEnv-pgi + pgi pgi/16.3.0 + + + PrgEnv-gnu/4.2.84 + gcc gcc/4.8.2 + + + PrgEnv-cray + cce cce/8.4.6 + + + papi/5.3.2 + cray-mpich cray-mpich/7.3.3 + cray-libsci cray-libsci/16.03.1 + torque/6.0.2 + + + cray-netcdf-hdf5parallel/4.4.0 + cray-parallel-netcdf/1.7.0 + + + cray-netcdf/4.4.0 + + + cmake/3.1.3 + darshan + /sw/modulefiles/CESM + CESM-ENV + + + + 64M + + + + + Brutus Linux Cluster ETH (pgi(9.0-1)/intel(10.1.018) with openi(1.4.1)/mvapich2(1.4rc2), 16 pes/node, batch system LSF, added by UB + LINUX + pgi,intel + openmpi,mpich + /cluster/work/uwis/$USER + /cluster/work/uwis/ccsm/inputdata + /cluster/work/uwis/ccsm/inputdata/atm/datm7 + /cluster/work/uwis/$USER/archive/$CASE + /cluster/work/uwis/ccsm/ccsm_baselines + /cluster/work/uwis/ccsm/tools/cprnc/cprnc + 1 + lsf + tcraig -at- ucar.edu + 16 + 16 + + mpirun + + -hostfile $ENV{PBS_JOBID} + -ppn $MAX_MPITASKS_PER_NODE + -n $TOTALPES + + + + ompirun + + + + + /etc/profile.d/modules.perl + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + + /usr/bin/modulecmd perl + module + module + + + + + intel/10.1.018 + + + pgi/9.0-1 + + + mvapich2/1.4rc2 + + + open_mpi/1.4.1 + + + netcdf/4.0.1 + + + + 64M + + + + + + Example port to centos7 linux system with gcc, netcdf, pnetcdf and mpich + using modules from http://www.admin-magazine.com/HPC/Articles/Environment-Modules + + regex.expression.matching.your.machine + LINUX + https://howto.get.out + gnu + mpich + none + + $ENV{HOME}/cesm/scratch + $ENV{HOME}/cesm/inputdata + $ENV{HOME}/cesm/inputdata/lmwg + $ENV{HOME}/cesm/archive/$CASE + $ENV{HOME}/cesm/cesm_baselines + $ENV{HOME}/cesm/tools/cime/tools/cprnc/cprnc + gmake + 8 + none + me@my.address + 8 + 8 + FALSE + + mpiexec + + -np {{ total_tasks }} + + + + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/python.py + /usr/share/Modules/init/csh + /usr/share/Modules/init/sh + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + + + compiler/gnu/7.2.0 + mpi/gcc/mpich-3.2 + tool/netcdf/4.4.1.1/gcc + tool/parallel-netcdf/mpich + + + + 256M + + + -1 + + + + + NCAR SGI platform, os is Linux, 36 pes/node, batch system is PBS + .*.cheyenne.ucar.edu + LINUX + intel,gnu + mpt,openmpi + /glade/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/cesm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc.cheyenne + 8 + pbs + cseg + + 36 + 36 + TRUE + + mpiexec_mpt + + -np $TOTALPES + -p "%g:" + + omplace -tm open64 + + + + mpirun + + -np $TOTALPES + + + + + /opt/sgi/mpt/mpt-2.15/bin/mpirun $ENV{UNIT_TEST_HOST} -np 1 + + + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/perl + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/env_modules_python.py + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/csh + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/sh + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/libexec/lmod perl + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.2 + + + intel/17.0.1 + esmf_libs + mkl + + + esmf-7.0.0-defio-mpi-g + + + esmf-7.0.0-defio-mpi-O + + + esmf-7.0.0-ncdfio-uni-g + + + esmf-7.0.0-ncdfio-uni-O + + + gnu/6.3.0 + openblas/0.2.14 + + + mpt/2.16 + netcdf-mpi/4.4.1.1 + pnetcdf/1.8.1 + + + openmpi/2.1.0 + netcdf/4.4.1.1 + + + ncarcompilers/0.4.1 + + + netcdf/4.4.1.1 + + + + 256M + /glade/scratch/$USER + 16 + + + + false + + + -1 + + + + + PNL Haswell cluster, OS is Linux, batch system is SLURM + LINUX + intel,pgi + mvapich2,openmpi,intelmpi,mvapich + /pic/scratch/$USER + /pic/scratch/tcraig/IRESM/inputdata + /pic/scratch/tcraig/IRESM/inputdata/atm/datm7 + /pic/scratch/$USER/cases/archive/$CASE + /pic/scratch/tcraig/IRESM/ccsm_baselines + /people/tcraig/bin/cprnc + 8 + slurm + tcraig -at- ucar.edu + 24 + 24 + FALSE + + srun + + --mpi=none + --ntasks=$TOTALPES + --cpu_bind=sockets --cpu_bind=verbose + --kill-on-bad-exit + + + + srun + + --ntasks=$TOTALPES + --cpu_bind=sockets --cpu_bind=verbose + --kill-on-bad-exit + + + + mpirun + + -n $TOTALPES + + + + mpirun + + -n $TOTALPES + + + + /share/apps/modules/Modules/3.2.10/init/perl.pm + /etc/profile.d/modules.csh + /etc/profile.d/modules.sh + /share/apps/modules/Modules/3.2.10/bin/modulecmd perl + module + module + + + + + perl/5.20.0 + cmake/2.8.12 + + + intel/15.0.1 + netcdf/4.3.2 + mkl/15.0.1 + + + pgi/14.10 + netcdf/4.3.2 + + + mvapich2/2.1 + + + mvapich2/2.1 + + + intelmpi/5.0.1.035 + + + openmpi/1.8.3 + + + + 64M + + + $MLIB_LIB + /share/apps/netcdf/4.3.2/intel/15.0.1 + + + /share/apps/netcdf/4.3.2/pgi/14.10 + + + + + + + NERSC XC40 Haswell, os is CNL, 32 pes/node, batch system is Slurm + cori + CNL + intel,gnu,cray + mpt + $ENV{SCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.corip1/cprnc + 8 + slurm + cseg + 64 + 32 + + srun + + --label + -n $TOTALPES + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-sandybridge + craype-ivybridge + craype + + + + PrgEnv-intel + intel intel/17.0.1.132 + /global/project/projectdirs/ccsm1/modulefiles/cori + + + esmf/6.3.0rp1-defio-intel2016-mpi-O + + + esmf/6.3.0rp1-defio-intel2016-mpiuni-O + + + + PrgEnv-cray + cce cce/8.5.7 + + + PrgEnv-gnu + gcc gcc/6.2.0 + + + cray-memkind + papi/5.4.1.3 + craype craype/2.5.7 + + + cray-libsci/16.09.1 + + + cray-mpich/7.4.4 + + + cray-hdf5/1.10.0 + cray-netcdf/4.4.1 + + + cray-netcdf-hdf5parallel/4.3.3.1 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + cmake/3.5.2 + + + + 256M + + + + + + + NERSC XC* KNL, os is CNL, 68 pes/node, batch system is Slurm + CNL + intel,gnu,cray + mpt + $ENV{SCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.corip1/cprnc + 8 + slurm + cseg + 256 + 64 + + srun + + --label + -n $TOTALPES + -c 4 --cpu_bind=cores + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + craype-mic-knl + craype-haswell + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + + + PrgEnv-intel + intel intel/17.0.3.191 + /global/project/projectdirs/ccsm1/modulefiles/cori + + + esmf/6.3.0rp1-defio-intel2016-mpi-O + + + esmf/6.3.0rp1-defio-intel2016-mpiuni-O + + + + PrgEnv-cray + cce cce/8.5.8 + + + PrgEnv-gnu + gcc gcc/6.2.0 + + + cray-memkind + craype-mic-knl + craype craype/2.5.7 + + + cray-libsci/16.11.1 + + + cray-mpich/7.4.4 + + + cray-hdf5/1.10.0 + cray-netcdf/4.4.1 + + + cray-netcdf-hdf5parallel/4.3.3.1 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + cmake/3.5.2 + + + + 256M + + + + + PNL IBM Xeon cluster, os is Linux (pgi), batch system is SLURM + LINUX + pgi,intel + mvapich2,mvapich + /lustre/$USER + /lustre/tcraig/IRESM/inputdata + /lustre/tcraig/IRESM/inputdata/atm/datm7 + /lustre/$USER/archive/$CASE + /lustre/tcraig/IRESM/ccsm_baselines + /lustre/tcraig/IRESM/tools/cprnc/cprnc + 8 + slurm + tcraig -at- ucar.edu + 12 + 12 + + srun + + --ntasks=$TOTALPES + --cpu_bind=sockets + --cpu_bind=verbose + --kill-on-bad-exit + + + + srun + + --mpi=none + --ntasks=$TOTALPES + --cpu_bind=sockets + --cpu_bind=verbose + --kill-on-bad-exit + + + + /etc/profile.d/modules.perl + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /share/apps/modules/Modules/3.2.7/bin/modulecmd perl + module + module + + + perl/5.20.7 + cmake/3.0.0 + pgi/15.5 + mpi/mvapich2/1.5.1p1/pgi11.3 + netcdf/4.1.2/pgi + + + + 64M + + + + + NERSC XC30, os is CNL, 24 pes/node, batch system is SLURM + edison + CNL + intel,gnu,cray + mpt + $ENV{CSCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.edison/cprnc + 8 + slurm + cseg + 48 + 24 + + srun + + --label + -n $TOTALPES + -c $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-sandybridge + craype-ivybridge + craype + + + + PrgEnv-intel + intel intel/16.0.3.210 + cray-libsci + /global/project/projectdirs/ccsm1/modulefiles/edison + + + esmf/6.3.0rp1-defio-intel15.0-mpi-O + + + esmf/6.3.0rp1-defio-intel15.0-mpiuni-O + + + PrgEnv-cray + cce cce/8.5.1 + cray-libsci/16.07.1 + + + PrgEnv-gnu + gcc gcc/6.1.0 + cray-libsci/16.07.1 + + + papi/5.4.3.2 + craype craype/2.5.5 + craype-ivybridge + + + cray-mpich/7.6.0 + + + cray-hdf5/1.8.16 + cray-netcdf/4.4.0 + + + cray-netcdf-hdf5parallel/4.4.0 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + + + 64M + + + + + NOAA XE6, os is CNL, 24 pes/node, batch system is PBS + CNL + pgi + mpich + /lustre/fs/scratch/Julio.T.Bacmeister + /lustre/fs/scratch/Julio.T.Bacmeister/inputdata + /lustre/fs/scratch/Julio.T.Bacmeister/inputdata + /lustre/fs/scratch/Julio.T.Bacmeister/archive/$CASE + UNSET + UNSET + 8 + pbs + julio -at- ucar.edu + 24 + 24 + + aprun + + -j {{ hyperthreading }} + -n $TOTALPES + -S {{ tasks_per_numa }} + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/csh + /opt/modules/default/init/sh + /opt/modules/default/bin/modulecmd perl + module + module + + PrgEnv-pgi + PrgEnv-cray + PrgEnv-gnu + pgi + cray + + + PrgEnv-pgi + pgi pgi/12.5.0 + + + PrgEnv-gnu + torque + + + PrgEnv-cray/4.0.36 + cce/8.0.2 + + + torque/4.1.3 + netcdf-hdf5parallel/4.2.0 + parallel-netcdf/1.2.0 + + + + 64M + 1 + + + + + NCAR CGD Linux Cluster 48 pes/node, batch system is PBS + ^hob.* + LINUX + intel,pgi,nag,gnu + mvapich2,openmpi + /scratch/cluster/$USER + /fs/cgd/csm/inputdata + /project/tss + /scratch/cluster/$USER/archive/$CASE + /fs/cgd/csm/ccsm_baselines + /fs/cgd/csm/tools/cprnc_hobart/cprnc + gmake --output-sync + 4 + pbs + cseg + 48 + 48 + + mpiexec + + --machinefile $ENV{PBS_NODEFILE} + -n $TOTALPES + + + + mpiexec + + -n $TOTALPES + + + + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/python.py + /usr/share/Modules/init/csh + /usr/share/Modules/init/sh + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + + + compiler/intel/15.0.2.164 + + + tool/parallel-netcdf/1.7.0/intel/mvapich2 + + + compiler/pgi/17.04 + + + tool/parallel-netcdf/1.6.1/pgi/mvapich2 + + + compiler/nag/6.1 + + + compiler/gnu/5.4.0 + tool/parallel-netcdf/1.8.1/gnu-5.4.0/openmpi + + + + 64M + + + + + + + Customize these fields as appropriate for your system, + particularly changing MAX_TASKS_PER_NODE and MAX_MPITASKS_PER_NODE to the + number of cores on your machine. You may also want to change + instances of '$ENV{HOME}/projects' to your desired directory + organization. You can use this in either of two ways: (1) + Without making any changes, by adding `--machine homebrew` to + create_newcase or create_test (2) Copying this into a + config_machines.xml file in your personal .cime directory and + then changing the machine name (MACH="homebrew") to + your machine name and the NODENAME_REGEX to something matching + your machine's hostname. With (2), you should not need the + `--machine` argument, because the machine should be determined + automatically. However, with (2), you will also need to copy the + homebrew-specific settings in config_compilers.xml into a + config_compilers.xml file in your personal .cime directory, again + changing the machine name (MACH="homebrew") to your machine name. + + + something.matching.your.machine.hostname + Darwin + gnu + mpich + $ENV{HOME}/projects/scratch + $ENV{HOME}/projects/cesm-inputdata + $ENV{HOME}/projects/ptclm-data + $ENV{HOME}/projects/scratch/archive/$CASE + $ENV{HOME}/projects/baselines + $CIMEROOT/tools/cprnc/build/cprnc + make + 4 + none + __YOUR_NAME_HERE__ + 4 + 4 + + mpirun + + -np $TOTALPES + -prepend-rank + + + + + /usr/local + + + + + + NCAR SGI test platform, os is Linux, 36 pes/node, batch system is PBS + .*.laramie.ucar.edu + LINUX + intel,gnu + mpt + /picnic/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/cesm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc + 8 + pbs + cseg + + 36 + 36 + TRUE + + mpiexec_mpt + + -p "%g:" + omplace + + + + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/perl + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/env_modules_python.py + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/csh + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/sh + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/libexec/lmod perl + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.0 + + + intel/16.0.3 + mkl + + + gnu/6.2.0 + + + mpt/2.15 + ncarcompilers/0.3.2 + + + netcdf/4.4.1 + + + netcdf-mpi/4.4.1 + pnetcdf/1.7.x + + + + 256M + 16 + + + + + Linux workstation for Jenkins testing + (melvin|watson) + LINUX + sonproxy.sandia.gov:80 + gnu + openmpi + /sems-data-store/ACME/timings + $ENV{HOME}/acme/scratch + /sems-data-store/ACME/inputdata + /sems-data-store/ACME/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /sems-data-store/ACME/baselines + /sems-data-store/ACME/cprnc/build/cprnc + make + 32 + acme_developer + none + jgfouca at sandia dot gov + 64 + 64 + + mpirun + + -np $TOTALPES + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + sems-gcc/5.1.0 + sems-openmpi/1.8.7 + sems-cmake/2.8.12 + sems-netcdf/4.3.2/parallel + + + + $ENV{SEMS_NETCDF_ROOT} + + + $ENV{SEMS_NETCDF_ROOT} + + + + + + ANL IBM BG/Q, os is BGP, 16 pes/node, batch system is cobalt + .*.fst.alcf.anl.gov + BGQ + ibm + ibm + /projects/$PROJECT/usr/$ENV{USER} + /projects/ccsm/inputdata + /projects/ccsm/inputdata/atm/datm7 + /projects/$PROJECT/usr/$USER/archive/$CASE + /projects/ccsm/ccsm_baselines/ + /projects/ccsm/tools/cprnc/cprnc + 4 + cobalt + cseg + 64 + 8 + TRUE + + /usr/bin/runjob + + --label short + + --ranks-per-node $MAX_MPITASKS_PER_NODE + + --np $TOTALPES + --block $COBALT_PARTNAME --envs OMP_WAIT_POLICY=active --envs BG_SMP_FAST_WAKEUP=yes $LOCARGS + --envs BG_THREADLAYOUT=1 + --envs OMP_STACKSIZE=32M + --envs OMP_NUM_THREADS=$ENV{OMP_NUM_THREADS} + + + + /etc/profile.d/00softenv.csh + /etc/profile.d/00softenv.sh + soft + soft + + +mpiwrapper-xl + @ibm-compilers-2015-02 + +cmake + +python + + + + 10000 + FALSE + 64M + /soft/libraries/hdf5/1.8.14/cnk-xl/current + + + + + PNL cluster, os is Linux (pgi), batch system is SLURM + LINUX + pgi + mpich + /pic/scratch/$USER + /pic/scratch/tcraig/IRESM/inputdata + /pic/scratch/tcraig/IRESM/inputdata/atm/datm7 + /pic/scratch/$USER/archive/$CASE + /pic/scratch/tcraig/IRESM/ccsm_baselines + /pic/scratch/tcraig/IRESM/tools/cprnc/cprnc + 8 + slurm + tcraig -at- ucar.edu + 32 + 32 + FALSE + + mpiexec_mpt + + --mpi=none + -n=$TOTALPES + --kill-on-bad-exit + + + + /share/apps/modules/Modules/3.2.7/init/perl.pm + /share/apps/modules/Modules/3.2.7/init/csh + /share/apps/modules/Modules/3.2.7/init/sh + /share/apps/modules/Modules/3.2.7/bin/modulecmd perl + module + module + + + precision/i4 + pgi/11.8 + mvapich2/1.7 + netcdf/4.1.3 + + + + 64M + + + + + NASA/AMES Linux Cluster, Linux (ia64), 2.4 GHz Broadwell Intel Xeon E5-2680v4 processors, 28 pes/node (two 14-core processors) and 128 GB of memory/node, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 28 + 28 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), 2.5 GHz Haswell Intel Xeon E5-2680v3 processors, 24 pes/node (two 12-core processors) and 128 GB of memory/node, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 24 + 24 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), Altix ICE, 2.6 GHz Sandy Bridge processors, 16 cores/node and 32 GB of memory, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 16 + 16 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), Altix ICE, 2.8 GHz Ivy Bridge processors, 20 cores/node and 3.2 GB of memory per core, batch system is PBS + LINUX + intel + mpich + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 20 + 20 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + CSCS Cray XE6, os is CNL, 32 pes/node, batch system is SLURM + CNL + pgi,cray,gnu + mpich + /scratch/rosa/$USER + /project/s433/cesm_inputdata + /project/s433/cesm_inputdata/atm/datm7 + /project/s433/$USER/archive/$CASE + /project/s433/ccsm_baselines + /project/s433/cesm_tools/ccsm_cprnc/cprnc + 12 + slurm + edouard.davin -at- env.ethz.ch + 32 + 32 + + aprun + + -n $TOTALPES + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + + 64M + + + + + + Linux workstation at Sandia on SRN with SEMS TPL modules + (s999964|climate|penn) + LINUX + wwwproxy.sandia.gov:80 + gnu + openmpi + /sems-data-store/ACME/timings + $ENV{HOME}/acme/scratch + /sems-data-store/ACME/inputdata + /sems-data-store/ACME/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /sems-data-store/ACME/baselines + /sems-data-store/ACME/cprnc/build/cprnc + make + 32 + acme_developer + none + jgfouca at sandia dot gov + 64 + 64 + + mpirun + + -np $TOTALPES + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + sems-gcc/5.1.0 + sems-openmpi/1.8.7 + sems-cmake/2.8.12 + sems-netcdf/4.3.2/parallel + + + + $ENV{SEMS_NETCDF_ROOT} + $ENV{SEMS_NETCDF_ROOT} + + + + + SNL clust + skybridge-login + LINUX + wwwproxy.sandia.gov:80 + intel + openmpi + /projects/ccsm/timings + /gscratch/$USER/acme_scratch/skybridge + /projects/ccsm/inputdata + /projects/ccsm/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /projects/ccsm/ccsm_baselines + /projects/ccsm/cprnc/build/cprnc_wrap + 8 + acme_integration + slurm + jgfouca at sandia dot gov + 16 + 16 + TRUE + + + mpirun + + -np $TOTALPES + -npernode $MAX_MPITASKS_PER_NODE + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + gnu/4.9.2 + intel/intel-15.0.3.187 + libraries/intel-mkl-15.0.2.164 + libraries/intel-mkl-15.0.2.164 + + + openmpi-intel/1.8 + sems-hdf5/1.8.12/parallel + sems-netcdf/4.3.2/parallel + sems-hdf5/1.8.12/base + sems-netcdf/4.3.2/base + + + + $ENV{SEMS_NETCDF_ROOT} + 64M + + + $ENV{SEMS_NETCDF_ROOT} + + + + + TACC DELL, os is Linux, 16 pes/node, batch system is SLURM + .*stampede + LINUX + intel + mvapich2,impi + $ENV{SCRATCH} + /scratch/projects/xsede/CESM/inputdata + /scratch/projects/xsede/CESM/inputdata/lmwg + $WORK/archive/$CASE + /scratch/projects/xsede/CESM/ccsm_baselines + /scratch/projects/xsede/CESM/tools/cprnc/cprnc + 4 + slurm + cseg + 16 + 16 + + + ibrun + + + ibrun + + + /opt/apps/lmod/lmod/init/perl + /opt/apps/lmod/lmod/init/env_modules_python.py + /opt/apps/lmod/lmod/init/sh + /opt/apps/lmod/lmod/init/csh + /opt/apps/lmod/lmod/libexec/lmod perl + /opt/apps/lmod/lmod/libexec/lmod python + module + module + + + TACC + python/2.7.12 + intel/15.0.2 + perl/5.16.2 + cmake/3.1.0 + + + mvapich2 + pnetcdf/1.6.1 + parallel-netcdf/4.3.3.1 + + + mvapich2 + impi + pnetcdf/1.6.0 + parallel-netcdf/4.3.3.1 + + + netcdf/4.3.3.1 + + + + 256M + /scratch/projects/xsede/CESM/perl5/lib/perl5/x86_64-linux-thread-multi:/scratch/projects/xsede/CESM/perl5/lib/perl5 + + + + + Lawrencium LR3 cluster at LBL, OS is Linux (intel), batch system is SLURM + n0*.lr3.lbl.gov + LINUX + intel + openmpi + /global/scratch/$ENV{USER} + /global/scratch/$ENV{USER}/cesm_input_datasets/ + /global/scratch/$ENV{USER}/cesm_input_datasets/atm/datm7 + $CIME_OUTPUT_ROOT/cesm_archive/$CASE + $CIME_OUTPUT_ROOT/cesm_baselines + /$CIME_OUTPUT_ROOT/cesm_tools/cprnc/cprnc + 4 + slurm + rgknox and gbisht at lbl dot gov + 16 + 16 + TRUE + + mpirun + + + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /usr/Modules/init/perl.pm + /usr/Modules/python.py + module + module + /usr/Modules/bin/modulecmd perl + /usr/Modules/bin/modulecmd python + + + cmake + perl xml-libxml switch python/2.7.11 + + + intel/2015.6.233 + mkl + + + netcdf/4.4.0-intel-s + + + openmpi + netcdf/4.4.0-intel-p + + + + + + Lawrencium LR2 cluster at LBL, OS is Linux (intel), batch system is SLURM + n0*.lr2.lbl.gov + LINUX + intel + openmpi + /global/scratch/$ENV{USER} + /global/scratch/$ENV{USER}/cesm_input_datasets/ + /global/scratch/$ENV{USER}/cesm_input_datasets/atm/datm7 + $CIME_OUTPUT_ROOT/cesm_archive/$CASE + $CIME_OUTPUT_ROOT/cesm_baselines + /$CIME_OUTPUT_ROOT/cesm_tools/cprnc/cprnc + 4 + slurm + rgknox and gbisht at lbl dot gov + 12 + 12 + TRUE + + mpirun + + + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /usr/Modules/init/perl.pm + /usr/Modules/python.py + module + module + /usr/Modules/bin/modulecmd perl + /usr/Modules/bin/modulecmd python + + + cmake + perl xml-libxml switch python/2.7.11 + + + intel/2015.6.233 + mkl + + + netcdf/4.4.0-intel-s + + + openmpi + netcdf/4.4.0-intel-p + + + + + + ALCF Cray XC* KNL, os is CNL, 64 pes/node, batch system is cobalt + theta.* + CNL + intel,gnu,cray + mpt + EarlyPerf_theta + /projects/EarlyPerf_theta/cesm/scratch/$USER + /projects/EarlyPerf_theta/cesm/inputdata + /projects/EarlyPerf_theta/cesm/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /projects/EarlyPerf_theta/cesm/baselines + /projects/EarlyPerf_theta/cesm/tools/cprnc/cprnc + 8 + cobalt_theta + cseg + 64 + 64 + TRUE + + aprun + + -n $TOTALPES + -N $MAX_MPITASKS_PER_NODE + --cc depth -d $OMP_NUM_THREADS + -e OMP_STACKSIZE=64M + -e OMP_NUM_THREADS=$OMP_NUM_THREADS + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-hdf5-parallel + pmi + cray-libsci + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-mic-knl + craype + + + + PrgEnv-intel/6.0.3 + intel intel/17.0.0.098 + cray-libsci + + + + PrgEnv-cray/6.0.3 + cce cce/8.5.4 + + + PrgEnv-gnu/6.0.3 + gcc gcc/6.2.0 + + + papi/5.4.3.3 + craype craype/2.5.7 + + + cray-libsci/16.09.1 + + + cray-mpich/7.4.4 + + + cray-netcdf-hdf5parallel/4.4.1 + cray-hdf5-parallel/1.10.0 + cray-parallel-netcdf/1.7.0 + + + + + + NCAR IBM, os is Linux, 16 pes/node, batch system is LSF + .*yellowstone + LINUX + intel,pgi,gnu,intel15 + mpich2,pempi + /glade/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/ccsm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc + /glade/apps/opt/perlmods/lib64/perl5:/glade/apps/opt/perlmods/share/perl5 + 8 + lsf + cseg + 30 + 15 + TRUE + + + mpirun.lsf + + + TARGET_PROCESSOR_LIST=AUTO_SELECT $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + $ENV{CESMDATAROOT}/tools/bin/launch + + + + unset MP_PE_AFFINITY; unset MP_TASK_AFFINITY; unset MP_CPU_BIND_LIST; $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + $ENV{CESMDATAROOT}/tools/bin/hybrid_launch + + + + $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + + + + /glade/apps/opt/lmod/lmod/init/perl + /glade/apps/opt/lmod/lmod/init/env_modules_python.py + /glade/apps/opt/lmod/lmod/init/csh + /glade/apps/opt/lmod/lmod/init/sh + /glade/apps/opt/lmod/lmod/libexec/lmod perl + /glade/apps/opt/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.0 + ncarbinlibs/1.1 + perlmods + gmake/4.1 + python + all-python-libs + git + + + intel/15.0.3 + mkl/11.1.2 + trilinos/11.10.2 + esmf + + + esmf-7.0.0-ncdfio-mpi-g + + + esmf-7.0.0-defio-mpi-O + + + esmf-7.0.0-ncdfio-uni-g + + + esmf-7.0.0-ncdfio-uni-O + + + pgi/15.10 + + + gnu/5.2.0 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + ncarcompilers/1.0 + cmake/3.0.2 + all-python-libs + + + + 256M + yes + 2 + yes + us + unordered + yes + + + 0 + + + $MPILIB + + + + ${EXEROOT}/cesm.exe + >> cesm.log.$LID 2>&1 + + + diff --git a/config_pio.xml b/config_pio.xml new file mode 100644 index 0000000000..ffe58e936e --- /dev/null +++ b/config_pio.xml @@ -0,0 +1,344 @@ + + + + + + + + + + + $MAX_MPITASKS_PER_NODE + 60 + + + + + + + + + + pnetcdf + netcdf + + + + + + $PIO_VERSION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + netcdf + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mkDepends b/mkDepends new file mode 100755 index 0000000000..d9bcbdd87b --- /dev/null +++ b/mkDepends @@ -0,0 +1,452 @@ +#!/usr/bin/env perl + +# Generate dependencies in a form suitable for inclusion into a Makefile. +# The source filenames are provided in a file, one per line. Directories +# to be searched for the source files and for their dependencies are provided +# in another file, one per line. Output is written to STDOUT. +# +# For CPP type dependencies (lines beginning with #include), or for Fortran +# include dependencies, the dependency search is recursive. Only +# dependencies that are found in the specified directories are included. +# So, for example, the standard include file stdio.h would not be included +# as a dependency unless /usr/include were one of the specified directories +# to be searched. +# +# For Fortran module USE dependencies (lines beginning with a case +# insensitive "USE", possibly preceded by whitespace) the Fortran compiler +# must be able to access the .mod file associated with the .o file that +# contains the module. In order to correctly generate these dependencies +# the following restriction must be observed. +# +# ** All modules that are to be contained in the dependency list must be +# ** contained in one of the source files in the list provided on the command +# ** line. +# +# The reason for this restriction is that the modules have a nominal dependence +# on the .o files. If a module is being used for which the source code is not +# available (e.g., a module from a library), then adding a .o dependency for +# that module is a mistake because make will attempt to build that .o file, and +# will fail if the source code is not available. +# +# Original version: B. Eaton +# Climate Modelling Section, NCAR +# Feb 2001 +# +# ChangeLog: +# ----------------------------------------------------------------------------- +# Modifications to Brian Eaton's original to relax the restrictions on +# source file name matching module name and only one module per source +# file. Also added a new "-d depfile" option which allows an additional +# file to be added to every dependence. +# +# +# Tom Henderson +# Global Systems Division, NOAA/OAR +# Mar 2011 +# ----------------------------------------------------------------------------- +# Several updates: +# +# - Remove limitation that modules cannot be named "procedure". +# +# - Allow optional "::" in use statement (Fortran 2003). +# +# - Instead of having .o files depend on other .o files directly, +# have them depend indirectly through the .mod files. This allows +# the compiler to have discretion over whether to update a .mod, +# and prevents cascading recompilation when it does not. +# +# +# Sean Santos +# CESM Software Engineering Group, NCAR +# Mar 2013 +# ----------------------------------------------------------------------------- +# More updates: +# +# - Restore ability to recognize .mod files in the path, if there's no source +# file that provides the same module. +# +# - Allow "non_intrinsic" keyword (Fortran 2003). +# +# Sean Santos +# CESM Software Engineering Group, NCAR +# Mar 2013 +# ----------------------------------------------------------------------------- + + +use Getopt::Std; +use File::Basename; + +# Check for usage request. +@ARGV >= 2 or usage(); + +# Process command line. +my %opt = (); +getopts( "t:wd:m:", \%opt ) or usage(); +my $filepath_arg = shift() or usage(); +my $srcfile_arg = shift() or usage(); +@ARGV == 0 or usage(); # Check that all args were processed. + +my $obj_dir = ""; +if ( defined $opt{'t'} ) { $obj_dir = $opt{'t'}."/"; } + +my $additional_file = ""; +if ( defined $opt{'d'} ) { $additional_file = $opt{'d'}; } + +my $mangle_scheme = "lower"; +if ( defined $opt{'m'} ) { $mangle_scheme = $opt{'m'}; } + +open(FILEPATH, $filepath_arg) or die "Can't open $filepath_arg: $!\n"; +open(SRCFILES, $srcfile_arg) or die "Can't open $srcfile_arg: $!\n"; + +# Make list of paths to use when looking for files. +# Prepend "." so search starts in current directory. This default is for +# consistency with the way GNU Make searches for dependencies. +my @file_paths = ; +close(FILEPATH); +chomp @file_paths; +unshift(@file_paths,'.'); +foreach $dir (@file_paths) { # (could check that directories exist here) + $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name + ($dir) = glob $dir; # Expand tildes in path names. +} + +# Make list of files containing source code. +my @src = ; +close(SRCFILES); +chomp @src; + +my %module_files = (); + +# Attempt to parse each file for /^\s*module/ and extract module names +# for each file. +my ($f, $name, $path, $suffix, $mod); +my @suffixes = ('\.[fF]90', '\.[fF]','\.F90\.in' ); +foreach $f (@src) { + ($name, $path, $suffix) = fileparse($f, @suffixes); + # find the file in the list of directorys (in @file_paths) + my $file_path = find_file($f); + open(FH, $file_path) or die "Can't open $file_path: $!\n"; + while ( ) { + # Search for module definitions. + if ( /^\s*MODULE\s+(\w+)\s*(\!.*)?$/i ) { + ($mod = $1) =~ tr/A-Z/a-z/; + if ( defined $module_files{$mod} ) { + die "Duplicate definitions of module $mod in $module_files{$mod} and $name: $!\n"; + } + $module_files{$mod} = $name; + } + } + close( FH ); +} + +# Now make a list of .mod files in the file_paths. If a source dependency +# can't be found based on the module_files list above, then maybe a .mod +# module dependency can if the mod file is visible. +my %trumod_files = (); +my ($dir); +my ($f, $name, $path, $suffix, $mod); +# This might not be clear: we want to mangle a "\" so that it will escape +# the "." in .mod or .MOD +my @suffixes = (mangle_modfile("\\")); +foreach $dir (@file_paths) { + # Similarly, this gets us $dir/*.mod or $dir/*.MOD + @filenames = (glob("$dir/".mangle_modfile("*"))); + foreach $f (@filenames) { + ($name, $path, $suffix) = fileparse($f, @suffixes); + ($mod = $name) =~ tr/A-Z/a-z/; + $trumod_files{$mod} = $name; + } +} + +#print STDERR "\%module_files\n"; +#while ( ($k,$v) = each %module_files ) { +# print STDERR "$k => $v\n"; +#} + +# Find module and include dependencies of the source files. +my ($file_path, $rmods, $rincs); +my %file_modules = (); +my %file_includes = (); +my @check_includes = (); +my %modules_used = (); +foreach $f ( @src ) { + + # Find the file in the seach path (@file_paths). + unless ($file_path = find_file($f)) { + if (defined $opt{'w'}) {print STDERR "$f not found\n";} + next; + } + + # Find the module and include dependencies. + ($rmods, $rincs) = find_dependencies( $file_path ); + + # Remove redundancies (a file can contain multiple procedures that have + # the same dependencies). + $file_modules{$f} = rm_duplicates($rmods); + $file_includes{$f} = rm_duplicates($rincs); + + # Make a list of all include files. + push @check_includes, @{$file_includes{$f}}; +} + +print STDERR "\%file_modules\n"; +while ( ($k,$v) = each %file_modules ) { + print STDERR "$k => @$v\n"; +} +print STDERR "\%file_includes\n"; +while ( ($k,$v) = each %file_includes ) { + print STDERR "$k => @$v\n"; +} +print STDERR "\@check_includes\n"; +print STDERR "@check_includes\n"; + +# Find include file dependencies. +my %include_depends = (); +while (@check_includes) { + $f = shift @check_includes; + if (defined($include_depends{$f})) { next; } + + # Mark files not in path so they can be removed from the dependency list. + unless ($file_path = find_file($f)) { + $include_depends{$f} = -1; + next; + } + + # Find include file dependencies. + ($rmods, $include_depends{$f}) = find_dependencies($file_path); + + # Add included include files to the back of the check_includes list so + # that their dependencies can be found. + push @check_includes, @{$include_depends{$f}}; + + # Add included modules to the include_depends list. + if ( @$rmods ) { push @{$include_depends{$f}}, @$rmods; } +} + +#print STDERR "\%include_depends\n"; +#while ( ($k,$v) = each %include_depends ) { +# print STDERR (ref $v ? "$k => @$v\n" : "$k => $v\n"); +#} + +# Remove include file dependencies that are not in the Filepath. +my $i, $ii; +foreach $f (keys %include_depends) { + + unless (ref $include_depends{$f}) { next; } + $rincs = $include_depends{$f}; + unless (@$rincs) { next; } + $ii = 0; + $num_incs = @$rincs; + for ($i = 0; $i < $num_incs; ++$i) { + if ($include_depends{$$rincs[$ii]} == -1) { + splice @$rincs, $ii, 1; + next; + } + ++$ii; + } +} + +# Substitute the include file dependencies into the %file_includes lists. +foreach $f (keys %file_includes) { + my @expand_incs = (); + + # Initialize the expanded %file_includes list. + my $i; + unless (@{$file_includes{$f}}) { next; } + foreach $i (@{$file_includes{$f}}) { + push @expand_incs, $i unless ($include_depends{$i} == -1); + } + unless (@expand_incs) { + $file_includes{$f} = []; + next; + } + + # Expand + for ($i = 0; $i <= $#expand_incs; ++$i) { + push @expand_incs, @{ $include_depends{$expand_incs[$i]} }; + } + + $file_includes{$f} = rm_duplicates(\@expand_incs); +} + +#print STDERR "expanded \%file_includes\n"; +#while ( ($k,$v) = each %file_includes ) { +# print STDERR "$k => @$v\n"; +#} + +# Print dependencies to STDOUT. + +print "# Declare all module files used to build each object.\n"; + +foreach $f (sort keys %file_modules) { + my $file; + if($f =~ /\.F90\.in$/){ + $f =~ /(.+)\.F90\.in/; + $file = $1; + }else{ + $f =~ /(.+)\./; + $file = $1; + } + $target = $obj_dir."$file.o"; + print "$target : $f @{$file_modules{$f}} @{$file_includes{$f}} $additional_file \n"; +} + +print "# The following section relates each module to the corresponding file.\n"; +$target = mangle_modfile("%"); +print "$target : \n"; +print "\t\@\:\n"; + +foreach $mod (sort keys %modules_used) { + my $mod_fname = $obj_dir.mangle_modfile($mod); + my $obj_fname = $obj_dir.$module_files{$mod}.".o"; + print "$mod_fname : $obj_fname\n"; + +} + +#-------------------------------------------------------------------------------------- + +sub find_dependencies { + + # Find dependencies of input file. + # Use'd Fortran 90 modules are returned in \@mods. + # Files that are "#include"d by the cpp preprocessor are returned in \@incs. + + # Check for circular dependencies in \@mods. This type of dependency + # is a consequence of having multiple modules defined in the same file, + # and having one of those modules depend on the other. + + my( $file ) = @_; + my( @mods, @incs ); + + open(FH, $file) or die "Can't open $file: $!\n"; + + # Construct the makefile target associated with this file. This is used to + # check for circular dependencies. + my ($name, $path, $suffix, $target); + my @suffixes = ('\.[fF]90', '\.[fF]','\.F90\.in' ); + ($name, $path, $suffix) = fileparse($file, @suffixes); + $target = "$name.o"; + my $include; + while ( ) { + # Search for "#include" and strip filename when found. + if ( /^#include\s+[<"](.*)[>"]/ ) { + $include = $1; + } + # Search for Fortran include dependencies. + elsif ( /^\s*include\s+['"](.*)['"]/ ) { #" for emacs fontlock + $include = $1; + } + if(defined($include)){ + if($include =~ /shr_assert.h/){ + push @mods, "$obj_dir".mangle_modfile("shr_assert_mod"); + } + push @incs, $include; + undef $include; + } + # Search for module dependencies. + elsif ( /^\s*USE(?:\s+|\s*\:\:\s*|\s*,\s*non_intrinsic\s*\:\:\s*)(\w+)/i ) { + # Return dependency in the form of a .mod file + ($module = $1) =~ tr/A-Z/a-z/; + if ( defined $module_files{$module} ) { + # Check for circular dependency + unless ("$module_files{$module}.o" eq $target) { + $modules_used{$module} = (); + push @mods, "$obj_dir".mangle_modfile($module); + } + } + # If we already have a .mod file around. + elsif ( defined $trumod_files{$module} ) { + push @mods, "$obj_dir".mangle_modfile($trumod_files{$module}); + } + } + } + close( FH ); + return (\@mods, \@incs); +} + +#-------------------------------------------------------------------------------------- + +sub find_file { + +# Search for the specified file in the list of directories in the global +# array @file_paths. Return the first occurance found, or the null string if +# the file is not found. + + my($file) = @_; + my($dir, $fname); + + foreach $dir (@file_paths) { + $fname = "$dir/$file"; + if ( -f $fname ) { return $fname; } + } + return ''; # file not found +} + +#-------------------------------------------------------------------------------------- + +sub rm_duplicates { + +# Return a list with duplicates removed. + + my ($in) = @_; # input arrary reference + my @out = (); + my $i; + my %h = (); + foreach $i (@$in) { + $h{$i} = ''; + } + @out = keys %h; + return \@out; +} + +#-------------------------------------------------------------------------------------- + +sub mangle_modfile { + +# Return the name of the module file corresponding +# to a given module. + + my ($mod) = @_; + my $fname; + + if ($mangle_scheme eq "lower") { + ($fname = $mod) =~ tr/A-Z/a-z/; + $fname .= ".mod"; + } elsif ($mangle_scheme eq "upper") { + ($fname = $mod) =~ tr/a-z/A-Z/; + $fname .= ".MOD"; + } else { + die "Unrecognized mangle_scheme!\n"; + } + + return $fname; + +} + +#-------------------------------------------------------------------------------------- + +sub usage { + ($ProgName = $0) =~ s!.*/!!; # name of program + die <; + close( FILEPATH ); +} else { + @paths = (); +} +chomp @paths; +unshift(@paths, '.'); +foreach $dir (@paths) { # (could check that directories exist here) + $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name + ($dir) = glob $dir; # Expand tildes in path names. +} + +# Loop through the directories and add each filename as a hash key. This +# automatically eliminates redunancies. +%src = (); +foreach $dir (@paths) { + @filenames = (glob("$dir/*.[Ffc]"), glob("$dir/*.[Ff]90"), glob("$dir/*.cpp")); + foreach $filename (@filenames) { + $filename =~ s!.*/!!; # remove part before last slash + $src{$filename} = 1; + } + @templates = glob("$dir/*.F90.in"); + foreach $filename (@templates) { + $filename =~ s!.*/!!; # remove part before last slash + my $dfile = $filename; + $dfile =~ s/\.in//; + delete $src{$dfile} if(defined $src{$dfile}); + $src{$filename} = 1; + } +} + +my @srcfiles; +my $foundcnt=0; +my $writenew=1; +if(-e "Srcfiles"){ # file already exists, do not update if no changes are required + open(SRC,"Srcfiles"); + @srcfiles = ; + close(SRC); + $writenew=0; + foreach $file (@srcfiles){ + chomp $file; + if($src{$file}){ + $src{$file}=0; + }else{ + $writenew=1; # A srcfile was removed + last; + } + + } + foreach $file (keys %src){ + if($src{$file} == 1){ + $writenew=1; # A srcfile was added + last; + } + } +} + +if($writenew==1){ + open(SRC,"> Srcfiles") or die "Can't open Srcfiles\n"; + + foreach $file ( sort keys %src ) { + print SRC "$file\n"; + } + + close( SRC ); +} +#-------------------------------------------------------------------------------------- + +sub usage { + ($ProgName = $0) =~ s!.*/!!; # name of program + die < {0} +""".format(os.path.basename(args[0])), + description=description, + formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("--caseroot", + help="Case directory to build") + + parser.add_argument("--skip-preview-namelist", action="store_true", + help="Skip calling preview-namelist during case.run") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + if args.skip_preview_namelist is None: + args.skip_preview_namelist = False + + return args.caseroot, args.skip_preview_namelist + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + sys.argv.extend([] if "ARGS_FOR_SCRIPT" not in os.environ else os.environ["ARGS_FOR_SCRIPT"].split()) + + caseroot, skip_pnl = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_run(case, skip_pnl=skip_pnl) + + sys.exit(0 if success else 1) + +if __name__ == "__main__": + _main_func(__doc__) diff --git a/template.case.test b/template.case.test new file mode 100755 index 0000000000..340e161b94 --- /dev/null +++ b/template.case.test @@ -0,0 +1,75 @@ +#!/usr/bin/env python +{{ batchdirectives }} +""" +This is the system test submit script for CIME. This should only ever be called +by case.submit when on batch system. This script only exists as a way of providing +batch directives. Use case.submit from the command line to run your case. +""" +import os, sys +os.chdir( '{{ caseroot }}') + +_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * + +from CIME.case_test import case_test +from CIME.case import Case + +import argparse, doctest + +############################################################################### +def parse_command_line(args, description): +############################################################################### + parser = argparse.ArgumentParser( + usage="""\n%s [] [--verbose] +OR +%s --help +OR +%s --test + +\033[1mEXAMPLES:\033[0m + \033[1;32m# case.test SMS\033[0m + > %s +""" % ((os.path.basename(args[0]), ) * 4), + +description=description, + +formatter_class=argparse.ArgumentDefaultsHelpFormatter +) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("testname", nargs="?",default=None, + help="Name of the test to run, default is set in TESTCASE in env_test.xml") + + parser.add_argument("--caseroot", + help="Case directory to build") + + parser.add_argument("--reset", action="store_true", + help="Reset the case to its original state as defined by config_tests.xml") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + return args.caseroot, args.testname, args.reset + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + sys.argv.extend([] if "ARGS_FOR_SCRIPT" not in os.environ else os.environ["ARGS_FOR_SCRIPT"].split()) + + caseroot, testname, reset = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_test(case, testname, reset) + + sys.exit(0 if success else 1) + +if (__name__ == "__main__"): + _main_func(__doc__) diff --git a/template.st_archive b/template.st_archive new file mode 100755 index 0000000000..4ed2f2023c --- /dev/null +++ b/template.st_archive @@ -0,0 +1,79 @@ +#!/usr/bin/env python +# Batch system directives +{{ batchdirectives }} + +""" +template to create a case short term archiving script. This should only ever be called +by case.submit when on batch system. This script only exists as a way of providing +batch directives. Use case.submit from the command line to run your case. +""" + +import sys, os, time +os.chdir( '{{ caseroot }}') + +_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * +from CIME.case import Case +from CIME.case_st_archive import case_st_archive + +logger = logging.getLogger(__name__) + + +############################################################################### +def parse_command_line(args, description): +############################################################################### + + parser = argparse.ArgumentParser( + usage="""\n{0} [--verbose] +OR +{0} --help +OR +{0} --test + +\033[1mEXAMPLES:\033[0m + \033[1;32m# case.run SMS\033[0m + > {0} +""".format(os.path.basename(args[0])), + +description=description, + +formatter_class=argparse.ArgumentDefaultsHelpFormatter +) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("--caseroot", default=os.getcwd(), + help="Case directory to build") + + parser.add_argument("--no-incomplete-logs", default=False, action="store_true", + help="Whether to archive logs which have been completed or not") + + parser.add_argument("--copy-only", default=False, action="store_true", + help="Copy instead of move the files to be archived") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + return args.caseroot, args.no_incomplete_logs, args.copy_only + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + caseroot, no_incomplete_logs, copy_only = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_st_archive(case, archive_incomplete_logs=not no_incomplete_logs, copy_only=copy_only) + + sys.exit(0 if success else 1) + +############################################################################### + +if __name__ == "__main__": + _main_func(__doc__) diff --git a/userdefined_laptop_template/README.md b/userdefined_laptop_template/README.md new file mode 100644 index 0000000000..1a0e03b663 --- /dev/null +++ b/userdefined_laptop_template/README.md @@ -0,0 +1,131 @@ +Building CIME on an UNSUPPORTED local machine +--------------------------------------------- + +These directions are for a Mac OS X 10.9 or 10.10 laptop using +homebrew or macports to install the required software. The procedure +is similar for a linux workstation or cluster, you will just use +different package management tools to install the third party +libraries. + +Setup +===== + + - install xcode, including the command line tools. Failure to + install the command line tools is the most likely cause if you + get an error about the compilers not being able to create + executables. + + - install third party libraries from homebrew or macports. + + - home brew + + Install science tap : + + brew install gcc --without-multilib cmake mpich hdf5 --enable-fortran netcdf --enable-fortran + + + - macports + + sudo port install mpich +gcc48 hdf5-18 +mpich netcdf-fortran +gcc48 +mpich cmake + + Note: If you see an error while running create_newcase that + indicates perl can't find XML::LibXML, you may need to install + p5-xml-libxml as well. + + + - Some of the shell scripts used by cesm hard code "gmake" instead + of using the GMAKE variable from env_build.xml. To work around + this, you should install gnu make, or simply create a link from + make to gmake in you path. + + mkdir -p ${HOME}/local/bin + ln -s `whereis make` ${HOME}/local/bin/gmake + cat >> ${HOME}/.bashrc < + + + + + + -DFORTRANUNDERSCORE -DNO_R16 + + + -fopenmp + + + /usr/local/bin/gfortran + /usr/bin/cc + /usr/bin/c++ + /usr/local/bin/mpif90 + /usr/local/bin/mpicc + /usr/local/bin/mpicxx + FORTRAN + TRUE + /usr/local + + $(shell $(NETCDF_PATH)/bin/nf-config --flibs) -framework Accelerate + + + + + diff --git a/userdefined_laptop_template/config_machines.xml b/userdefined_laptop_template/config_machines.xml new file mode 100644 index 0000000000..2d1005c5d0 --- /dev/null +++ b/userdefined_laptop_template/config_machines.xml @@ -0,0 +1,33 @@ + + + + + __USEFUL_DESCRIPTION__ + something.matching.your.machine.hostname + Darwin + gnu + mpich + $ENV{HOME}/projects/scratch + $ENV{HOME}/projects/cesm-inputdata + $ENV{HOME}/projects/ptclm-data + $ENV{HOME}/projects/scratch/archive/$CASE + $ENV{HOME}/projects/baselines + $CIMEROOT/tools/cprnc/build/cprnc + 4 + none + __YOUR_NAME_HERE__ + 4 + 4 + + mpiexec_mpt + + -np $TOTALPES + --prepend-rank + + + + + + diff --git a/userdefined_laptop_template/config_pes.xml b/userdefined_laptop_template/config_pes.xml new file mode 100644 index 0000000000..0464137703 --- /dev/null +++ b/userdefined_laptop_template/config_pes.xml @@ -0,0 +1,31 @@ + + + + + + $MAX_TASKS_PER_NODE 1 0 + + + + 1 1 0 + + + + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + + + 2 1 + 2 + + + + From 924b401df05664adb0385a7e90150edcc0903fa0 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Tue, 7 Nov 2017 11:05:46 -0700 Subject: [PATCH 3/6] Undo/remove things that keep causing problems in the ESMCI merge. [BFB] --- Depends.babbageKnc | 6 + Depends.bluewaters | 5 + Depends.corip1 | 5 + Depends.cray | 6 + Depends.gnu | 2 + Depends.intel | 40 + Depends.intel14 | 28 + Depends.intelmic | 6 + Depends.intelmic14 | 6 + Depends.mira | 22 + Depends.nag | 4 + Makefile | 858 +++++++ README | 15 + config_batch.xml | 491 ++++ config_compilers.xml | 1113 ++++++++++ config_machines.xml | 1965 +++++++++++++++++ config_pio.xml | 344 +++ mkDepends | 452 ++++ mkSrcfiles | 96 + nag_mpi_argument.txt | 4 + template.case.run | 80 + template.case.test | 75 + template.st_archive | 79 + userdefined_laptop_template/README.md | 131 ++ .../config_compilers.xml | 30 + .../config_machines.xml | 33 + userdefined_laptop_template/config_pes.xml | 31 + 27 files changed, 5927 insertions(+) create mode 100644 Depends.babbageKnc create mode 100755 Depends.bluewaters create mode 100644 Depends.corip1 create mode 100644 Depends.cray create mode 100644 Depends.gnu create mode 100644 Depends.intel create mode 100644 Depends.intel14 create mode 100644 Depends.intelmic create mode 100644 Depends.intelmic14 create mode 100644 Depends.mira create mode 100644 Depends.nag create mode 100644 Makefile create mode 100644 README create mode 100644 config_batch.xml create mode 100644 config_compilers.xml create mode 100644 config_machines.xml create mode 100644 config_pio.xml create mode 100755 mkDepends create mode 100755 mkSrcfiles create mode 100644 nag_mpi_argument.txt create mode 100755 template.case.run create mode 100755 template.case.test create mode 100755 template.st_archive create mode 100644 userdefined_laptop_template/README.md create mode 100644 userdefined_laptop_template/config_compilers.xml create mode 100644 userdefined_laptop_template/config_machines.xml create mode 100644 userdefined_laptop_template/config_pes.xml diff --git a/Depends.babbageKnc b/Depends.babbageKnc new file mode 100644 index 0000000000..f5a6f335cc --- /dev/null +++ b/Depends.babbageKnc @@ -0,0 +1,6 @@ + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< + +quadrature_mod.o: quadrature_mod.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -DIS_ACCELERATOR $< diff --git a/Depends.bluewaters b/Depends.bluewaters new file mode 100755 index 0000000000..e113298e08 --- /dev/null +++ b/Depends.bluewaters @@ -0,0 +1,5 @@ +# + ifeq ($(strip $(COMPILER)),pgi) + progseasalts_intr.o: progseasalts_intr.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -Mnovect $< +endif diff --git a/Depends.corip1 b/Depends.corip1 new file mode 100644 index 0000000000..81be8f3f16 --- /dev/null +++ b/Depends.corip1 @@ -0,0 +1,5 @@ +# Workaround for ICE in intel/2016.0.109 +ifeq (CPRINTEL,$(findstring CPRINTEL, $(FFLAGS))) +RtmMod.o: RtmMod.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) -O1 $< +endif diff --git a/Depends.cray b/Depends.cray new file mode 100644 index 0000000000..b6023391ea --- /dev/null +++ b/Depends.cray @@ -0,0 +1,6 @@ +NOOPTOBJS= ice_boundary.o dyn_comp.o unicon.o + +$(NOOPTOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< + + diff --git a/Depends.gnu b/Depends.gnu new file mode 100644 index 0000000000..2d53247217 --- /dev/null +++ b/Depends.gnu @@ -0,0 +1,2 @@ +geopk.o:geopk.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fcray-pointer $< diff --git a/Depends.intel b/Depends.intel new file mode 100644 index 0000000000..5369c3f714 --- /dev/null +++ b/Depends.intel @@ -0,0 +1,40 @@ +# +PERFOBJS=\ +prim_advection_mod.o \ +edge_mod.o \ +derivative_mod.o \ +bndry_mod.o \ +prim_advance_mod.o + +# CLM's SatellitePhenologyMod is compiled incorrectly with intel 15.0.0 at -O2 +REDUCED_OPT_OBJS=\ +SatellitePhenologyMod.o + +# shr_wv_sat_mod does not need to have better than ~0.1% precision, and benefits +# enormously from a lower precision in the vector functions. +REDUCED_PRECISION_OBJS=\ +shr_wv_sat_mod.o + +SHR_RANDNUM_FORT_OBJS=\ +kissvec_mod.o \ +mersennetwister_mod.o \ +dSFMT_interface.o \ +shr_RandNum_mod.o + +SHR_RANDNUM_C_OBJS=\ +dSFMT.o \ +dSFMT_utils.o \ +kissvec.o + +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -no-prec-div $< + $(REDUCED_OPT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O1 $< + $(REDUCED_PRECISION_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fimf-precision=low -fp-model fast $< + $(SHR_RANDNUM_FORT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -fp-model fast -no-prec-div -no-prec-sqrt -override-limits $< + $(SHR_RANDNUM_C_OBJS): %.o: %.c + $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) -O3 -fp-model fast $< +endif diff --git a/Depends.intel14 b/Depends.intel14 new file mode 100644 index 0000000000..32e4747d7a --- /dev/null +++ b/Depends.intel14 @@ -0,0 +1,28 @@ +# +# 12/03/2012 the intel compiler on yellowstone 12.1.5 20120612 +# does not converge the pH computation without the -CU flag +# root cause has not been determined. JPE +# this problem is resolved in intel 13.0.1 +#ecosys_mod.o: ecosys_mod.F90 +# $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -CU $< + + + +PERFOBJS=\ +prim_advection_mod_base.o \ +vertremap_mod_base.o \ +edge_mod_base.o \ +derivative_mod_base.o \ +bndry_mod_base.o \ +prim_advance_mod.o \ +uwshcu.o \ +wetdep.o + +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -no-prec-div $< + $(REDUCED_OPT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O1 $< + $(REDUCED_PRECISION_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fimf-precision=low -fp-model fast $< +endif diff --git a/Depends.intelmic b/Depends.intelmic new file mode 100644 index 0000000000..6f05aee44a --- /dev/null +++ b/Depends.intelmic @@ -0,0 +1,6 @@ + +#derivative_mod_base.o: derivative_mod_base.F90 +# $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) -O1 $< + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< diff --git a/Depends.intelmic14 b/Depends.intelmic14 new file mode 100644 index 0000000000..6f05aee44a --- /dev/null +++ b/Depends.intelmic14 @@ -0,0 +1,6 @@ + +#derivative_mod_base.o: derivative_mod_base.F90 +# $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) -O1 $< + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< diff --git a/Depends.mira b/Depends.mira new file mode 100644 index 0000000000..c786f6248a --- /dev/null +++ b/Depends.mira @@ -0,0 +1,22 @@ +# These routines have problems with stacksize when omp is invoked add -qsmallstack to resolve +SSOBJS = shr_reprosum_mod.o mo_sethet.o mo_drydep.o + +$(SSOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -qsmallstack $< + +time_management.o: time_management.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -qsmp=noauto:noomp $< + +# These routines benefit from -qnostrict without violating the bfb test +PERFOBJS=\ +prim_advection_mod.o \ +edge_mod.o \ +derivative_mod.o \ +bndry_mod.o \ +prim_advance_mod.o \ +uwshcu.o \ +wetdep.o +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -qnostrict $< +endif diff --git a/Depends.nag b/Depends.nag new file mode 100644 index 0000000000..d7e4894aa1 --- /dev/null +++ b/Depends.nag @@ -0,0 +1,4 @@ +wrap_mpi.o: wrap_mpi.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< +fft99.o: fft99.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..1b0e4defed --- /dev/null +++ b/Makefile @@ -0,0 +1,858 @@ +#=============================================================================== +# +# Common Makefile: a framework for building all CIME components and more +# +#=============================================================================== + +# Set up special characters +null := +comma := , + +# Load dependency search path. +dirs := . +dirs += $(shell cat Filepath) + +cpp_dirs := $(dirs) +# Add INCROOT to path for Depends and Include +MINCROOT := +ifdef INCROOT + cpp_dirs += $(INCROOT) + MINCROOT := $(INCROOT) +endif + +# Expand any tildes in directory names. Change spaces to colons. +VPATH := $(foreach dir,$(cpp_dirs),$(wildcard $(dir))) +VPATH := $(subst $(space),:,$(VPATH)) + +RM := rm +CP := cp + +exec_se: $(EXEC_SE) Depends +complib: $(COMPLIB) Depends + +# Determine whether to compile threaded or not +# Set the THREADDIR for the shared build +# based on the threaded build status +compile_threaded = false +ifeq ($(strip $(SMP)),TRUE) + compile_threaded = true + THREADDIR = threads +else + ifeq ($(strip $(BUILD_THREADED)),TRUE) + compile_threaded = true + THREADDIR = threads + else + THREADDIR = nothreads + endif +endif + +# set the debug directory based on the debug status +ifeq ($(strip $(DEBUG)),TRUE) + DEBUGDIR = debug +else + DEBUGDIR = nodebug +endif + +ifeq ($(strip $(USE_ESMF_LIB)), TRUE) + ESMFDIR = esmf +else + ESMFDIR = noesmf +endif + +# Determine whether any C++ code will be included in the build; +# currently, C++ code is included if and only if we're linking to the +# trilinos library. +ifeq ($(strip $(USE_TRILINOS)), TRUE) + USE_CXX = true +else + USE_CXX = false +endif + +ifndef MOD_SUFFIX + MOD_SUFFIX := mod +endif + +#=============================================================================== +# set CPP options (must use this before any flags or cflags settings) +#=============================================================================== + +CPPDEFS := $(USER_CPPDEFS) + +# Unless DEBUG mode is enabled, use NDEBUG to turn off assert statements. +ifneq ($(strip $(DEBUG)),TRUE) + CPPDEFS += -DNDEBUG +endif + +# USE_ESMF_LIB is currently only defined in env_build.xml +ifeq ($(USE_ESMF_LIB), TRUE) + CPPDEFS += -DUSE_ESMF_LIB +endif + +ifeq ($(strip $(MPILIB)),mpi-serial) + CPPDEFS += -DNO_MPI2 +else + CPPDEFS += -DHAVE_MPI +endif +ifeq ($(compile_threaded), true) + CPPDEFS += -DTHREADED_OMP +endif + +ifeq (,$(EXEROOT)) + EXEROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) EXEROOT --value) +endif +ifeq (,$(BUILD_THREADED)) + BUILD_THREADED = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) BUILD_THREADED --value) +endif + +ifeq (,$(LIBROOT)) + LIBROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) LIBROOT --value) +endif +ifeq (,$(SHAREDLIBROOT)) + SHAREDLIBROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) SHAREDLIBROOT --value) +endif +ifeq (,$(COMPILER)) + COMPILER = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) COMPILER --value) +endif +ifeq (,$(NINST_VALUE)) + NINST_VALUE = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) NINST_VALUE --value) +endif +ifeq (,$(MPILIB)) + MPILIB = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) MPILIB --value) +endif +ifeq ($(strip $(PIO_VERSION)),1) + CPPDEFS += -DPIO1 +endif + + + +ifeq (,$(SHAREDPATH)) + SHAREDPATH = $(COMPILER)/$(MPILIB)/$(DEBUGDIR)/$(THREADDIR) +endif +INSTALL_SHAREDPATH = $(EXEROOT)/$(SHAREDPATH) + +include $(CASEROOT)/Macros.make +# Decide whether to use a C++ or Fortran linker, based on whether we +# are using any C++ code and the compiler-dependent CXX_LINKER variable +ifeq ($(USE_CXX), true) + # The following is essentially an "if... elseif... else", but gmake + # 3.80 and earlier doesn't support elseif + ifeq ($(CXX_LINKER), CXX) + LD := $(MPICXX) + endif + ifeq ($(CXX_LINKER), FORTRAN) + LD := $(MPIFC) + endif +endif +# Use this if LD has not already been defined. +ifeq ($(origin LD), default) + ifeq ($(strip $(MPILIB)),mpi-serial) + LD := $(SFC) + else + LD := $(MPIFC) + endif +endif + + + +ifeq ($(USE_CXX), true) + ifeq ($(SUPPORTS_CXX), FALSE) + $(error Fatal attempt to include C++ code on a compiler/machine combo that has not been set up to support C++) + endif +endif + +# Not clear how to escape commas for libraries with their own configure +# script, and they don't need this defined anyway, so leave this out of +# FPPDEFS. +ifeq ($(HAS_F2008_CONTIGUOUS),TRUE) + CONTIGUOUS_FLAG := -DUSE_CONTIGUOUS=contiguous, +else + CONTIGUOUS_FLAG := -DUSE_CONTIGUOUS= +endif + +ifdef CPRE + CONTIGUOUS_FLAG := $(subst $(comma),\\$(comma),$(CONTIGUOUS_FLAG)) + CONTIGUOUS_FLAG := $(patsubst -D%,$(CPRE)%,$(CONTIGUOUS_FLAG)) +endif + +ifndef AR + AR := ar +endif + +ifdef NETCDF_C_PATH + ifndef NETCDF_FORTRAN_PATH + $(error "NETCDF_C_PATH specified without NETCDF_FORTRAN_PATH") + endif + NETCDF_SEPARATE:=true + ifndef INC_NETCDF_C + INC_NETCDF_C:=$(NETCDF_C_PATH)/include + endif + ifndef INC_NETCDF_FORTRAN + INC_NETCDF_FORTRAN:=$(NETCDF_FORTRAN_PATH)/include + endif + ifndef LIB_NETCDF_C + LIB_NETCDF_C:=$(NETCDF_C_PATH)/lib + endif + ifndef LIB_NETCDF_FORTRAN + LIB_NETCDF_FORTRAN:=$(NETCDF_C_PATH)/lib + endif + else ifdef NETCDF_FORTRAN_PATH + $(error "NETCDF_FORTRAN_PATH specified without NETCDF_C_PATH") + else ifdef NETCDF_PATH + NETCDF_SEPARATE:=false + ifndef INC_NETCDF + INC_NETCDF:=$(NETCDF_PATH)/include + endif + ifndef LIB_NETCDF + LIB_NETCDF:=$(NETCDF_PATH)/lib + endif +else + # No Netcdf is an error unless target is clean or DEP + ifneq ($(MAKECMDGOALS), db_files) + ifneq ($(MAKECMDGOALS), db_flags) + ifeq (,$(findstring clean,$(MAKECMDGOALS))) + $(error NETCDF not found: Define NETCDF_PATH or NETCDF_C_PATH and NETCDF_FORTRAN_PATH in config_machines.xml or config_compilers.xml) + endif + endif + endif +endif + + +ifeq ($(MPILIB),mpi-serial) + ifdef PNETCDF_PATH + undefine PNETCDF_PATH + endif +else + ifdef PNETCDF_PATH + ifndef $(INC_PNETCDF) + INC_PNETCDF:=$(PNETCDF_PATH)/include + endif + ifndef LIB_PNETCDF + LIB_PNETCDF:=$(PNETCDF_PATH)/lib + endif + endif +endif +ifeq ($(strip $(USE_TRILINOS)), TRUE) + ifdef TRILINOS_PATH + ifndef INC_TRILINOS + INC_TRILINOS:=$(TRILINOS_PATH)/include + endif + ifndef LIB_TRILINOS + LIB_TRILINOS:=$(TRILINOS_PATH)/lib + endif + else + $(error TRILINOS_PATH must be defined when USE_TRILINOS is TRUE) + endif + + # get a bunch of variables related to this trilinos installation; + # these variables begin with "Trilinos_" + include $(INC_TRILINOS)/Makefile.export.Trilinos +endif + + +# Set HAVE_SLASHPROC on LINUX systems which are not bluegene or Darwin (OSx) + +ifeq ($(findstring -DLINUX,$(CPPDEFS)),-DLINUX) + ifneq ($(findstring DBG,$(CPPDEFS)),DBG) + ifneq ($(findstring Darwin,$(CPPDEFS)),Darwin) + CPPDEFS += -DHAVE_SLASHPROC + endif + endif +endif + +ifdef CPRE + FPPDEFS := $(subst $(comma),\\$(comma),$(CPPDEFS)) + FPPDEFS := $(patsubst -D%,$(CPRE)%,$(FPPDEFS)) +else + FPPDEFS := $(CPPDEFS) +endif + + +#=============================================================================== +# Set config args for pio and mct to blank and then enable serial +#=============================================================================== +ifndef CONFIG_ARGS + CONFIG_ARGS := +endif + +ifeq ($(findstring pio,$(MODEL)),pio) + CONFIG_ARGS+= --enable-timing + ifeq ($DEBUG,TRUE) + CONFIG_ARGS+= --enable-debug + endif +endif + +#=============================================================================== +# User-specified INCLDIR +#=============================================================================== + +INCLDIR := -I. +ifdef USER_INCLDIR + INCLDIR += $(USER_INCLDIR) +endif + +#=============================================================================== +# MPI-serial library (part of MCT) +#=============================================================================== + +ifeq ($(strip $(MPILIB)), mpi-serial) + CC := $(SCC) + FC := $(SFC) + CXX := $(SCXX) + MPIFC := $(SFC) + MPICC := $(SCC) + MPICXX := $(SCXX) + CONFIG_ARGS += MCT_PATH=$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial +else + CC := $(MPICC) + FC := $(MPIFC) + CXX := $(MPICXX) + ifdef MPI_PATH + INC_MPI := $(MPI_PATH)/include + LIB_MPI := $(MPI_PATH)/lib + endif +endif +CSM_SHR_INCLUDE:=$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/include +# This is needed so that dependancies are found +VPATH+=$(CSM_SHR_INCLUDE) +#=============================================================================== +# Set include paths (needed after override for any model specific builds below) +#=============================================================================== +INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CSM_SHR_INCLUDE) + +ifeq ($(NETCDF_SEPARATE), false) + INCLDIR += -I$(INC_NETCDF) +else ifeq ($(NETCDF_SEPARATE), true) + INCLDIR += -I$(INC_NETCDF_C) -I$(INC_NETCDF_FORTRAN) +endif +ifdef MOD_NETCDF + INCLDIR += -I$(MOD_NETCDF) +endif +ifdef INC_MPI + INCLDIR += -I$(INC_MPI) +endif +ifdef INC_PNETCDF + INCLDIR += -I$(INC_PNETCDF) +endif +ifdef INC_TRILINOS + INCLDIR += -I$(INC_TRILINOS) +endif + +ifndef MCT_LIBDIR + MCT_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef PIO_LIBDIR + PIO_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef GPTL_LIBDIR + GPTL_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef GLC_DIR + GLC_DIR=$(EXEROOT)/glc +endif +ifndef CISM_LIBDIR + CISM_LIBDIR=$(GLC_DIR)/lib +endif + +INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CIMEROOT)/src/share/util \ + -I$(CIMEROOT)/src/share/include -I$(CIMEROOT)/src/share/RandNum/include + +ifeq ($(MODEL),driver) + INCLDIR += -I$(EXEROOT)/atm/obj -I$(EXEROOT)/ice/obj -I$(EXEROOT)/ocn/obj -I$(EXEROOT)/glc/obj -I$(EXEROOT)/rof/obj -I$(EXEROOT)/wav/obj -I$(EXEROOT)/esp/obj +# nagfor and gcc have incompatible LDFLAGS. +# nagfor requires the weird "-Wl,-Wl,," syntax. +# If done in config_compilers.xml, we break MCT. + ifeq ($(strip $(COMPILER)),nag) + ifeq ($(NETCDF_SEPARATE), false) + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_PATH)/lib + else ifeq ($(NETCDF_SEPARATE), true) + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_C_PATH)/lib + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_FORTRAN_PATH)/lib + endif + endif +else + ifeq ($(strip $(COMPILER)),nag) + ifeq ($(DEBUG), TRUE) + ifeq ($(strip $(MACH)),hobart) + # GCC needs to be able to link to + # nagfor runtime to get autoconf + # tests to work. + CFLAGS += -Wl,--as-needed,--allow-shlib-undefined + SLIBS += -L$(COMPILER_PATH)/lib/NAG_Fortran -lf60rts + endif + endif + endif +endif + +# +# Use the MCT dir for the cache for all configure calls because it is the first one +# +CFLAGS+=$(CPPDEFS) +CXXFLAGS := $(CFLAGS) + +CONFIG_ARGS += CC="$(CC)" FC="$(FC)" MPICC="$(MPICC)" \ + MPIFC="$(MPIFC)" FCFLAGS="$(FFLAGS) $(FREEFLAGS) $(INCLDIR)" \ + CPPDEFS="$(CPPDEFS)" CFLAGS="$(CFLAGS) -I.. $(INCLDIR)" LDFLAGS="$(LDFLAGS)" + +ifeq ($(NETCDF_SEPARATE), false) + CONFIG_ARGS += NETCDF_PATH=$(NETCDF_PATH) +else ifeq ($(NETCDF_SEPARATE), true) + # The mct library needs the NetCDF_C library + CONFIG_ARGS += NETCDF_PATH=$(NETCDF_C_PATH) +endif + +ifeq ($(COMPILER),nag) + CONFIG_ARGS += LIBS="$(SLIBS)" +endif + +FFLAGS += $(FPPDEFS) +FFLAGS_NOOPT += $(FPPDEFS) + + +ifeq ($(findstring -cosp,$(CAM_CONFIG_OPTS)),-cosp) + # The following is for the COSP simulator code: + COSP_LIBDIR:=$(abspath $(EXEROOT)/atm/obj/cosp) +endif + +ifeq ($(MODEL),cam) + # These RRTMG files take an extraordinarily long time to compile with optimization. + # Until mods are made to read the data from files, just remove optimization from + # their compilation. +rrtmg_lw_k_g.o: rrtmg_lw_k_g.f90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< +rrtmg_sw_k_g.o: rrtmg_sw_k_g.f90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< + + +ifdef COSP_LIBDIR +INCLDIR+=-I$(COSP_LIBDIR) -I$(COSP_LIBDIR)/../ -I../$(INSTALL_SHAREDPATH)/include -I../$(CSM_SHR_INCLUDE) +$(COSP_LIBDIR)/libcosp.a: cam_abortutils.o + $(MAKE) -C $(COSP_LIBDIR) F90='$(FC)' F90FLAGS='$(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS) $(FC_AUTO_R8)' \ + F90FLAGS_noauto='$(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS)' \ + F90FLAGS_fixed='$(INCLDIR) $(INCS) $(FIXEDFLAGS) $(FFLAGS) $(FC_AUTO_R8)' + +cospsimulator_intr.o: $(COSP_LIBDIR)/libcosp.a +endif + +endif + +# Set esmf.mk location with ESMF_LIBDIR having precedent over ESMFMKFILE +CCSM_ESMFMKFILE := undefined_CCSM_ESMFMKFILE +ifdef ESMFMKFILE + CCSM_ESMFMKFILE := $(ESMFMKFILE) +endif +ifdef ESMF_LIBDIR + CCSM_ESMFMKFILE := $(ESMF_LIBDIR)/esmf.mk +endif + + +# System libraries (netcdf, mpi, pnetcdf, esmf, trilinos, etc.) + +ifeq ($(NETCDF_SEPARATE), false) + SLIBS += -L$(LIB_NETCDF) -lnetcdff -lnetcdf +else ifeq ($(NETCDF_SEPARATE), true) + SLIBS += -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf +endif + +ifdef LIB_PNETCDF + SLIBS += -L$(LIB_PNETCDF) -lpnetcdf +endif +ifdef LAPACK_LIBDIR + SLIBS += -L$(LAPACK_LIBDIR) -llapack -lblas +endif +ifdef LIB_MPI + ifndef MPI_LIB_NAME + SLIBS += -L$(LIB_MPI) -lmpi + else + SLIBS += -L$(LIB_MPI) -l$(MPI_LIB_NAME) + endif +endif + +# For compiling and linking with external ESMF. +# If linking to external ESMF library then include esmf.mk +# ESMF_F90COMPILEPATHS +# ESMF_F90LINKPATHS +# ESMF_F90LINKRPATHS +# ESMF_F90ESMFLINKLIBS +ifeq ($(USE_ESMF_LIB), TRUE) + -include $(CCSM_ESMFMKFILE) + FFLAGS += $(ESMF_F90COMPILEPATHS) + SLIBS += $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) $(ESMF_F90ESMFLINKLIBS) +endif + +# Add trilinos libraries; too be safe, we include all libraries included in the trilinos build, +# as well as all necessary third-party libraries +ifeq ($(strip $(USE_TRILINOS)), TRUE) + SLIBS += -L$(LIB_TRILINOS) $(Trilinos_LIBRARIES) $(Trilinos_TPL_LIBRARY_DIRS) $(Trilinos_TPL_LIBRARIES) +endif + +# Add libraries and flags that we need on the link line when C++ code is included +# We need to do these additions after CONFIG_ARGS is set, because they can sometimes break configure for mct, etc., +# if they are added to LDFLAGS in CONFIG_ARGS. +ifeq ($(USE_CXX), true) + ifdef CXX_LIBS + SLIBS += $(CXX_LIBS) + endif + + ifdef CXX_LDFLAGS + LDFLAGS += $(CXX_LDFLAGS) + endif +endif + +# Machine stuff to appear last on the link step +ifndef MLIBS + MLIBS := +endif + +#------------------------------------------------------------------------------ +# Drive configure scripts for support libraries (mct) +#------------------------------------------------------------------------------ + +$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/Makefile.conf: + @echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \ + $(CONFIG_SHELL) $(CIMEROOT)/src/externals/mct/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/src/externals/mct + +$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial/Makefile.conf: + @echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \ + $(CONFIG_SHELL) $(CIMEROOT)/src/externals/mct/mpi-serial/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/src/externals/mct/mpi-serial + +ifeq ($(PIO_VERSION),2) +# This is a pio2 library + PIOLIB = $(PIO_LIBDIR)/libpiof.a $(PIO_LIBDIR)/libpioc.a + PIOLIBNAME = -lpiof -lpioc + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio2 +else +# This is a pio1 library + PIOLIB = $(PIO_LIBDIR)/libpio.a + PIOLIBNAME = -lpio + ifneq ("$(wildcard $(CIMEROOT)/src/externals/pio1/pio)", "") + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio1 + else + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio1/pio + endif +endif + +MCTLIBS = $(MCT_LIBDIR)/libmct.a $(MCT_LIBDIR)/libmpeu.a + +GPTLLIB = $(GPTL_LIBDIR)/libgptl.a + +ULIBS += -L$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/lib -lcsm_share -L$(INSTALL_SHAREDPATH)/lib $(PIOLIBNAME) -lgptl -lmct -lmpeu + +#------------------------------------------------------------------------------ +# Drive cmake script for cism and pio +#------------------------------------------------------------------------------ + +ifndef CMAKE_OPTS + CMAKE_OPTS := +endif +# note that the fortran flags include neither the FREEFLAGS nor the +# FIXEDFLAGS, so that both free & fixed code can be built (cmake +# doesn't seem to be able to differentiate between free & fixed +# fortran flags) +CMAKE_OPTS += -D CMAKE_Fortran_FLAGS:STRING="$(FFLAGS) $(INCLDIR)" \ + -D CMAKE_C_FLAGS:STRING="$(CFLAGS) $(INCLDIR)" \ + -D CMAKE_CXX_FLAGS:STRING="$(CXXFLAGS) $(INCLDIR)" \ + -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -D GPTL_PATH:STRING=$(INSTALL_SHAREDPATH) \ + -D PIO_ENABLE_TESTS:BOOL=OFF \ + -D USER_CMAKE_MODULE_PATH:LIST="$(CIMEROOT)/src/CMake;$(CIMEROOT)/src/externals/pio2/cmake" \ + +# Allow for separate installations of the NetCDF C and Fortran libraries +ifeq ($(NETCDF_SEPARATE), false) + CMAKE_OPTS += -D NetCDF_PATH:PATH=$(NETCDF_PATH) +else ifeq ($(NETCDF_SEPARATE), true) + CMAKE_OPTS += -D NetCDF_C_PATH:PATH=$(NETCDF_C_PATH) \ + -D NetCDF_Fortran_DIR:PATH=$(NETCDF_FORTRAN_PATH) +endif + +ifdef PNETCDF_PATH + CMAKE_OPTS += -D PnetCDF_PATH:STRING="$(PNETCDF_PATH)" +else + CMAKE_OPTS += -D WITH_PNETCDF:LOGICAL=FALSE -D PIO_USE_MPIIO:LOGICAL=FALSE +endif + +# NAG doesn't get along too nicely with PnetCDF Fortran interfaces. +ifeq ($(COMPILER),nag) + ifeq ($(PIO_VERSION),1) + CMAKE_OPTS += -D WITH_PNETCDF:LOGICAL=FALSE -D PIO_USE_MPIIO:LOGICAL=FALSE + endif +endif + +ifdef PIO_FILESYSTEM_HINTS + CMAKE_OPTS += -D PIO_FILESYSTEM_HINTS:STRING="$(PIO_FILESYSTEM_HINTS)" +endif + +# This captures the many cism-specific options to cmake +CMAKE_OPTS += $(USER_CMAKE_OPTS) + +# CMake doesn't seem to like it when you define compilers via -D +# CMAKE_C_COMPILER, etc., when you rerun cmake with an existing +# cache. So doing this via environment variables instead. +ifndef CMAKE_ENV_VARS + CMAKE_ENV_VARS := +endif +CMAKE_ENV_VARS += CC=$(CC) \ + CXX=$(CXX) \ + FC=$(FC) \ + LDFLAGS="$(LDFLAGS)" + + +# We declare $(GLC_DIR)/Makefile to be a phony target so that cmake is +# always rerun whenever invoking 'make $(GLC_DIR)/Makefile'; this is +# desirable to pick up any new source files that may have been added +.PHONY: $(GLC_DIR)/Makefile +$(GLC_DIR)/Makefile: + cd $(GLC_DIR); \ + $(CMAKE_ENV_VARS) cmake $(CMAKE_OPTS) $(CIMEROOT)/../components/cism/glimmer-cism + +$(PIO_LIBDIR)/Makefile: + cd $(PIO_LIBDIR); \ + $(CMAKE_ENV_VARS) cmake $(CMAKE_OPTS) $(PIO_SRC_DIR) + +#------------------------------------------------------------------------------- +# Build & include dependency files +#------------------------------------------------------------------------------- + +touch_filepath: + touch Filepath + +# Get list of files and build dependency file for all .o files +# using perl scripts mkSrcfiles and mkDepends +# if a source is of form .F90.in strip the .in before creating the list of objects +SOURCES := $(shell cat Srcfiles) +BASENAMES := $(basename $(basename $(SOURCES))) +OBJS := $(addsuffix .o, $(BASENAMES)) +INCS := $(foreach dir,$(cpp_dirs),-I$(dir)) + +CASETOOLS := $(CASEROOT)/Tools + +Depends: Srcfiles Deppath + $(CASETOOLS)/mkDepends $(USER_MKDEPENDS_OPTS) Deppath Srcfiles > $@ + +Deppath: Filepath + $(CP) -f Filepath $@ + @echo "$(MINCROOT)" >> $@ + +Srcfiles: Filepath + $(CASETOOLS)/mkSrcfiles + +Filepath: + @echo "$(VPATH)" > $@ + + +#------------------------------------------------------------------------------- +# echo file names, paths, compile flags, etc. used during build +#------------------------------------------------------------------------------- + +db_files: + @echo " " + @echo "* MACFILE := $(MACFILE)" + @echo "* VPATH := $(VPATH)" + @echo "* INCS := $(INCS)" + @echo "* OBJS := $(OBJS)" +db_flags: + @echo " " + @echo "* cc := $(CC) $(CFLAGS) $(INCS) $(INCLDIR)" + @echo "* .F.o := $(FC) $(FFLAGS) $(FIXEDFLAGS) $(INCS) $(INCLDIR)" + @echo "* .F90.o := $(FC) $(FFLAGS) $(FREEFLAGS) $(INCS) $(INCLDIR)" + ifeq ($(USE_CXX), true) + @echo "* .cpp.o := $(CXX) $(CXXFLAGS) $(INCS) $(INCLDIR)" + endif + +#------------------------------------------------------------------------------- +# Rules used for the tests run by "configure -test" +#------------------------------------------------------------------------------- + +test_fc: test_fc.o + $(LD) -o $@ test_fc.o $(LDFLAGS) +ifeq ($(NETCDF_SEPARATE), false) +test_nc: test_nc.o + $(LD) -o $@ test_nc.o -L$(LIB_NETCDF) -lnetcdff -lnetcdf $(LDFLAGS) +else ifeq ($(NETCDF_SEPARATE), true) +test_nc: test_nc.o + $(LD) -o $@ test_nc.o -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf $(LDFLAGS) +endif +test_mpi: test_mpi.o + $(LD) -o $@ test_mpi.o $(LDFLAGS) +test_esmf: test_esmf.o + $(LD) -o $@ test_esmf.o $(LDFLAGS) + +#------------------------------------------------------------------------------- +# create list of component libraries +#------------------------------------------------------------------------------ +CLMVER = $(filter $(CLM_CONFIG_OPTS), clm5_0 clm4_5) +ifeq ($(CLMVER),$(null)) + LNDOBJDIR = $(EXEROOT)/lnd/obj + LNDLIBDIR=$(LIBROOT) + LNDLIB := liblnd.a + INCLDIR += -I$(LNDOBJDIR) +else + LNDOBJDIR = $(SHAREDLIBROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/clm/obj + LNDLIBDIR = $(EXEROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/lib + LNDLIB := libclm.a + INCLDIR += -I$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/include + ifeq ($(MODEL),clm) + INCLUDE_DIR = $(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/include + endif +endif + + +ifeq ($(ULIBDEP),$(null)) + ifneq ($(LIBROOT),$(null)) + ULIBDEP += $(LIBROOT)/libatm.a + ULIBDEP += $(LIBROOT)/libice.a + ULIBDEP += $(LNDLIBDIR)/$(LNDLIB) + ULIBDEP += $(LIBROOT)/libocn.a + ULIBDEP += $(LIBROOT)/librof.a + ULIBDEP += $(LIBROOT)/libglc.a + ULIBDEP += $(LIBROOT)/libwav.a + ULIBDEP += $(LIBROOT)/libesp.a + ifeq ($(COMP_GLC), cism) + ULIBDEP += $(CISM_LIBDIR)/libglimmercismfortran.a + ifeq ($(CISM_USE_TRILINOS), TRUE) + ULIBDEP += $(CISM_LIBDIR)/libglimmercismcpp.a + endif + endif + ifeq ($(OCN_SUBMODEL),moby) + ULIBDEP += $(LIBROOT)/libmoby.a + endif + endif +endif + +ifdef COSP_LIBDIR + ULIBDEP += $(COSP_LIBDIR)/libcosp.a +endif + + +ifndef CLIBS + ifdef ULIBDEP + # For each occurrence of something like /path/../foo/libbar.a in ULIBDEP, + # CLIBS will contain -L/path/../foo -lbar + CLIBS := $(foreach LIBDEP,$(strip $(ULIBDEP)), -L$(dir $(LIBDEP)) $(patsubst lib%.a,-l%,$(notdir $(LIBDEP)))) + endif +endif + +# libcsm_share.a is in ULIBDEP, but -lcsm_share is in ULIBS rather than CLIBS, +# so this needs to be added after creating CLIBS above +CSMSHARELIB = $(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/lib/libcsm_share.a +ULIBDEP += $(CSMSHARELIB) + +#------------------------------------------------------------------------------- +# build rules: +#------------------------------------------------------------------------------- + +.SUFFIXES: +.SUFFIXES: .F90 .F .f90 .f .c .cpp .o .in + +ifeq ($(MPILIB),mpi-serial) + MPISERIAL = $(INSTALL_SHAREDPATH)/lib/libmpi-serial.a + MLIBS += $(MPISERIAL) + CMAKE_OPTS += -DMPI_C_INCLUDE_PATH=$(INSTALL_SHAREDPATH)/include \ + -DMPI_Fortran_INCLUDE_PATH=$(INSTALL_SHAREDPATH)/include \ + -DMPI_C_LIBRARIES=$(INSTALL_SHAREDPATH)/lib/libmpi-serial.a \ + -DMPI_Fortran_LIBRARIES=$(INSTALL_SHAREDPATH)/lib/libmpi-serial.a +endif + +$(MCTLIBS) : $(MPISERIAL) + +$(PIOLIB) : $(MPISERIAL) $(GPTLLIB) + +$(CSMSHARELIB): $(MCTLIBS) $(PIOLIB) $(GPTLLIB) +ifneq ($(MODEL),csm_share) + $(OBJS): $(CSMSHARELIB) +endif + +$(EXEC_SE): $(OBJS) $(ULIBDEP) $(CSMSHARELIB) $(MCTLIBS) $(PIOLIB) $(GPTLLIB) + $(LD) -o $(EXEC_SE) $(OBJS) $(CLIBS) $(ULIBS) $(SLIBS) $(MLIBS) $(LDFLAGS) + +ifdef INCLUDE_DIR + $(COMPLIB): $(OBJS) + $(AR) -r $(COMPLIB) $(OBJS) + $(CP) *.$(MOD_SUFFIX) *.h $(INCLUDE_DIR) +else + $(COMPLIB): $(OBJS) + $(AR) -r $(COMPLIB) $(OBJS) +endif + +.c.o: + $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) $< +.F.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FIXEDFLAGS) $< +.f.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FIXEDFLAGS) $< +.f90.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $< +.F90.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) $< + +.cpp.o: + $(CXX) -c $(INCLDIR) $(INCS) $(CXXFLAGS) $< + +%.F90: %.F90.in + $(CIMEROOT)/src/externals/genf90/genf90.pl $< > $@ + +cleanatm: + $(RM) -f $(LIBROOT)/libatm.a + $(RM) -fr $(EXEROOT)/atm/obj + +cleancpl: + $(RM) -fr $(EXEROOT)/cpl/obj + +cleanocn: + $(RM) -f $(LIBROOT)/libocn.a + $(RM) -fr $(EXEROOT)/ocn/obj + +cleanwav: + $(RM) -f $(LIBROOT)/libwav.a + $(RM) -fr $(EXEROOT)/wav/obj + +cleanglc: + $(RM) -f $(LIBROOT)/libglc.a + $(RM) -fr $(EXEROOT)/glc + +cleanesp: + $(RM) -f $(LIBROOT)/libesp.a + $(RM) -fr $(EXEROOT)/esp/obj + +cleanice: + $(RM) -f $(LIBROOT)/libice.a + $(RM) -fr $(EXEROOT)/ice/obj + +cleanrof: + $(RM) -f $(LIBROOT)/librof.a + $(RM) -fr $(EXEROOT)/rof/obj + +cleanlnd: + $(RM) -f $(LNDLIBDIR)/$(LNDLIB) + $(RM) -fr $(LNDOBJDIR) + +cleancsmshare: + $(RM) -f $(CSMSHARELIB) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/csm_share + +cleanpio: + $(RM) -f $(PIO_LIBDIR)/libpio* + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/pio + +cleanmct: + $(RM) -f $(MCTLIBS) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/mct + +cleangptl: + $(RM) -f $(GPTLLIB) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/gptl + +clean: cleanatm cleanocn cleanwav cleanglc cleanesp cleanice cleanrof cleanlnd + +realclean: clean cleancsmshare cleanpio cleanmct cleangptl + +# the if-tests prevent DEPS files from being created when they're not needed +ifneq ($(MAKECMDGOALS), db_files) +ifneq ($(MAKECMDGOALS), db_flags) +ifeq (,$(findstring clean,$(MAKECMDGOALS))) + -include Depends $(CASEROOT)/Depends.$(COMPILER) $(CASEROOT)/Depends.$(MACH) +endif +endif +endif diff --git a/README b/README new file mode 100644 index 0000000000..3bafbe274e --- /dev/null +++ b/README @@ -0,0 +1,15 @@ +config_pes_pop.xml +current assumptions: + prognostic: pop, cice + data: datm, drof + stub: slnd, sglc +DATM.+XLND.+CICE.+POP.+DROF.+SGLC +The current attributes that are supported are + lcompset_matchN= (where N can be any number) + pecount=[S,M,L,XL] + +Please refer to the documentation in the config_machines.xml and config_compilers.xml files. + + + + diff --git a/config_batch.xml b/config_batch.xml new file mode 100644 index 0000000000..1bce3dea66 --- /dev/null +++ b/config_batch.xml @@ -0,0 +1,491 @@ + + + + + + + + + + + + + + + + + + + + + + + + + qstat + qsub + qdel + -v + + (\d+) + --dependencies + %H:%M:%s + -M + + + + + + + + + + + + + + + qstat + qsub + qdel + -v + #COBALT + (\d+) + --dependencies + -M + + + + + + + + + + + + + bjobs + bsub + bkill + < + #BSUB + <(\d+)> + -w 'done(jobid)' + %H:%M + -u + + + + + + + + + -n {{ total_tasks }} + -R "span[ptile={{ tasks_per_node }}]" + -N + -a {{ poe }} + -o {{ job_id }}.%J + -e {{ job_id }}.%J + -J {{ job_id }} + + + + + qstat + qsub + qdel + -v + #PBS + ^(\S+)$ + -W depend=afterok:jobid + %H:%M:%S + -M + -m + , bea, b, e, a + + + + + + + -N {{ job_id }} + -r {{ rerunnable }} + + -j oe + -V + + + + + squeue + scancel + #SBATCH + (\d+)$ + --dependency=afterok:jobid + %H:%M:%S + --mail-user + --mail-type + none, all, begin, end, fail + + + + + + + --job-name={{ job_id }} + --nodes={{ num_nodes }} + --ntasks-per-node={{ tasks_per_node }} + --output={{ job_id }} + --exclusive + + + + + + + -S {{ shell }} + + + + + + + -S {{ shell }} + + + + + + + -S {{ shell }} + + + batch + + + + + + + -l nodes={{ num_nodes }}:ppn={{ tasks_per_node }}:xe + -S {{ shell }} + + + regular + debug + + + + + + + -S {{ shell }} + + + + + + ^(\d+) + + -A $PROJECT + -l mppwidth={{ mppwidth }} + -l nodes={{ num_nodes }} + -S {{ shell }} + + + + + + + -S {{ shell }} + + + + + + + -A cpo + -l {{ partition }} + -l size={{ mppsize }} + -E + -d $RUNDIR + -o $RUNDIR/$CASE.out + -S /bin/bash + + + debug + batch + + + + + + + -l nodes={{ num_nodes }}:ppn={{ tasks_per_node }} + -S {{ shell }} + + + short + medium + long + overnight + monster + + + + + + sbatch + #MSUB + + -A ees + -l gres=lscratchd + + + + + + -S {{ shell }} + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} + + + regular + + + + + + -S {{ shell }} + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} + + + regular + + + + + + default + + + + + + default + + + + + sbatch + + queue + + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=bro + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=has + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=ivy + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=san + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + sbatch + #MSUB + + + -A ees + -l nodes={{ num_nodes }} + -l gres=lscratchd + + + + + sbatch + + batch + + + + + sbatch + + -C haswell + + + regular + + + + + + sbatch + + -C knl,quad,cache + -S 2 + + + regular + + + + + + sbatch + + regular + debug + + + + + ssh stampede.tacc.utexas.edu cd $CASEROOT ; sbatch + + normal + development + + + + + sbatch + + default + + + + + + + -S {{ shell }} + + + + + sbatch + + + + + caldera + regular + capability + premium + + + + + sbatch + + --qos=lr_normal + --partition=lr3 + --account={{ project }} + + + lr3 + + + + + sbatch + + --qos=lr_normal + --partition=lr2 + --account={{ project }} + + + lr2 + + + + + + + + $BUILD_COMPLETE and not $TEST + + + + $BUILD_COMPLETE and $TEST + + + + 1 + + case.run or case.test + $DOUT_S + + + + diff --git a/config_compilers.xml b/config_compilers.xml new file mode 100644 index 0000000000..515f6f3e41 --- /dev/null +++ b/config_compilers.xml @@ -0,0 +1,1113 @@ + + + + + + + -DOS + -D_USE_FLOW_CONTROL + + FALSE + + + + + -h noomp + -g -O0 + -O2 + + + + -DFORTRANUNDERSCORE -DNO_R16 -DCPRCRAY + -DDIR=NOOP + -DDIR=NOOP + + + -s real64 + + + -f free -N 255 -h byteswapio -x dir + -h noomp + -g -O0 -K trap=fp -m1 + -O2,ipa2 -em + + + -O1,fp2,ipa0,scalar0,vector0 + + TRUE + + -Wl,--allow-multiple-definition -h byteswapio + + + + + + -std=gnu99 + -fopenmp + -g -Wall -Og -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds + -O + + + + -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU + + FORTRAN + + -fdefault-real-8 + + + + -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none + -fopenmp + + -g -Wall -Og -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds + -O + + + -O0 + + + -ffixed-form + + + -ffree-form + + FALSE + + -fopenmp + + mpicc + mpicxx + mpif90 + gcc + g++ + gfortran + TRUE + + + + + -g -qfullpath -qmaxmem=-1 + -O3 + -qsmp=omp + -qsmp=omp:noopt + + + + -DFORTRAN_SAME -DCPRIBM + + -WF,-D + + -qrealsize=8 + + + -g -qfullpath -qmaxmem=-1 + -O2 -qstrict -qinline=auto + -qsmp=omp + -qinitauto=7FF7FFFF -qflttrap=ov:zero:inv:en + -qsmp=omp:noopt + -C + + + -qsuffix=f=f -qfixed=132 + + + -qsuffix=f=f90:cpp=F90 + + TRUE + + -qsmp=omp + -qsmp=omp:noopt + + + + + + -qno-opt-dynamic-align -fp-model precise -std=gnu99 + -qopenmp + -O2 -debug minimal + -O0 -g + + + + -DFORTRANUNDERSCORE -DCPRINTEL + + + -cxxlib + + FORTRAN + + -r8 + + + -qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source + -qopenmp + -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created + -O2 -debug minimal + + + -O0 + -qopenmp + + + -fixed -132 + + + -free + + TRUE + + -qopenmp + + mpicc + mpicxx + mpif90 + icc + icpc + ifort + + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl + + TRUE + + + + + -std=gnu99 + -g + + + -DFORTRANUNDERSCORE -DNO_CRAY_POINTERS -DNO_SHR_VMATH -DCPRNAG + + + -r8 + + + + + -Wp,-macro=no_com -convert=BIG_ENDIAN -indirect $ENV{CIMEROOT}/config/cesm/machines/nag_mpi_argument.txt + + -ieee=full -O2 + + + -C=all -g -time -f2003 -ieee=stop + -gline + + -mismatch_all + + + -Wp,-macro=no_com -convert=BIG_ENDIAN -indirect $ENV{CIMEROOT}/config/cesm/machines/nag_mpi_argument.txt + -ieee=full + + + + -g -time -f2003 -ieee=stop + -gline + + + -fixed + + + -free + + FALSE + mpicc + mpif90 + gcc + nagfor + + + + + -gopt -time + -mp + + + + + + + + + + + + + + + + + + + + + + + + + + + + -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16 -DCPRPGI + + CXX + + -r8 + + + -i4 -gopt -time -Mextend -byteswapio -Mflushz -Kieee + -mp + -O0 -g -Ktrap=fp -Mbounds -Kieee + -Mnovect + -Mnovect + -Mnovect + -Mnovect + -Mnovect + -Mnovect + + + -O0 -g -Ktrap=fp -Mbounds -Kieee + -mp + + + -Mfixed + + + -Mfree + + + + FALSE + + -time -Wl,--allow-multiple-definition + -mp + + mpicc + mpicxx + mpif90 + pgcc + pgc++ + pgf95 + + + + + -qarch=auto -qtune=auto -qcache=auto + + /usr/bin/bash + + -qarch=auto -qtune=auto -qcache=auto -qsclk=micro + -qspill=6000 + + + -qsigtrap=xl__trcedump + -bdatapsize:64K -bstackpsize:64K -btextpsize:32K + + mpcc_r + mpxlf2003_r + cc_r + xlf2003_r + + -lmassv -lessl + -lmass + + + + + + --build=powerpc-bgp-linux --host=powerpc64-suse-linux + + + -DLINUX + + + -g -qfullpath -qmaxmem=-1 -qspillsize=2500 -qextname=flush + -O3 -qstrict -qinline=auto + -qsmp=omp + -qsmp=omp:noopt + + + -Wl,--relax -Wl,--allow-multiple-definition + + + + + + -DCMAKE_SYSTEM_NAME=Catamount + + + -DLINUX + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + cc + CC + ftn + $ENV{NETCDF_DIR} + lustre + $ENV{PARALLEL_NETCDF_DIR} + cc + CC + ftn + + + + + -DSYSDARWIN + + + + + + -heap-arrays + + + + + + -DHAVE_PAPI + + lustre + + + + + -O2 + -nofma + + + -lmpichf90_pgi $ENV{PGI_PATH}/linux86-64/$ENV{PGI_VERSION}/lib/f90main.o + + + -O2 + -nofma + + TRUE + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi -L$ENV{MKL_PATH} -lmkl_rt + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + --host=Linux + + + -xCORE-AVX2 + + + -xCORE-AVX2 + + + -L$(NETCDF_DIR) -lnetcdff -Wl,--as-needed,-L$(NETCDF_DIR)/lib -lnetcdff -lnetcdf + + + -DHAVE_PAPI -DHAVE_SLASHPROC + + + -mkl + + + FALSE + + + + + + --host=Linux + + + -xMIC-AVX512 + + + -xMIC-AVX512 + + + -L$(NETCDF_DIR) -lnetcdff -Wl,--as-needed,-L$(NETCDF_DIR)/lib -lnetcdff -lnetcdf + + + -DHAVE_SLASHPROC + + + -mkl -lmemkind -zmuldefs + + + FALSE + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 + -nomp + + + --host=Linux + + + -DLINUX + + + -O2 + -nomp + + + -nomp + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 + + + --host=Linux + + + -DHAVE_PAPI + + + -O2 + + + -L$ENV{NETCDF_DIR} -lnetcdff -Wl,--as-needed,-L$ENV{NETCDF_DIR}/lib -lnetcdff -lnetcdf + + + + + + -O2 + + + -O2 + + + -Wl,-rpath /usr/local/tools/netcdf-pgi-4.1.3/lib + + mpich + /usr/local/tools/mvapich2-pgi-1.7/ + /usr/local/tools/netcdf-pgi-4.1.3 + + $SHELL{/usr/local/tools/netcdf-pgi-4.1.3/bin/nc-config --flibs} + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + /usr/lib64 + mpich + $ENV{NETCDF_PATH} + + -L$NETCDF_PATH/lib -lnetcdff -lnetcdf + + + + + + -lifcore + + + -lifcore + -mcmodel medium + + + -lquadmath + -Wl,-rpath,${NETCDF_PATH}/lib + -Wl,-rpath,$ENV{COMPILER_PATH}/lib/intel64 + -Wl,-rpath,$ENV{COMPILER_PATH}/mkl/lib/intel64 + -Wl,-rpath,$ENV{MPI_PATH}/lib + -lifcore + + + -mkl=cluster + + /fs/cgd/csm/tools/pFUnit/pFUnit3.2.8_hobart_Intel15.0.2_noMPI_noOpenMP + + + + + + -DNO_C_SIZEOF + + + -lpthread + + + -L/usr/local/nag/lib/NAG_Fortran + + + + + + -O0 + + + -O0 + + + -lgomp + -Wl,-R${NETCDF_PATH}/lib + -Wl,-R$ENV{COMPILER_PATH}/lib + -Wl,-R$ENV{COMPILER_PATH}/libso + + + + + + -lm + -ldl + + + + + + + -framework Accelerate + + + + + mpixlc_r + mpixlf2003_r + /bgsys/local/netcdf/ + gpfs + /bgsys/local/parallel-netcdf/v1.3.1 + mpixlc_r + mpixlf2003_r + + -L/bgsys/local/netcdf/lib -lnetcdf -L/bgsys/drivers/ppcfloor/comm/lib + + + + + /projects/install/rhel6-x86_64/ACME/AlbanyTrilinos/Albany/build/install + + -O2 + + + --host=Linux + + + -lstdc++ -lmpi_cxx + + + -O2 + + $ENV{NETCDFROOT} + $ENV{PNETCDFROOT} + + $SHELL{${NETCDF_PATH}/bin/nf-config --flibs} -lblas -llapack + + + + + + -qfloat=nomaf + + + -qfloat=nomaf + + $ENV{HDF5} + + + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf77_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlc_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf2003_r + /soft/libraries/netcdf/4.3.3-f4.4.1/cnk-xl/current/ + gpfs + /soft/libraries/pnetcdf/1.6.1/cnk-xl/current/ + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlc_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf2003_r + + -L${NETCDF_PATH}/lib -lnetcdff -lnetcdf -L$ENV{HDF5}/lib -lhdf5_hl -lhdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -L/soft/libraries/alcf/current/xl/LAPACK/lib -llapack -L/soft/libraries/alcf/current/xl/BLAS/lib -lblas -L/bgsys/drivers/ppcfloor/comm/sys/lib + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_LIB}/.. + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 -xCORE-AVX2 + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xCORE-AVX2 + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xAVX + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xAVX + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -Wl,-rpath /usr/local/tools/netcdf-pgi-4.1.3/lib + + mpich + /usr/local/tools/mvapich2-pgi-1.7/ + /usr/local/tools/netcdf-pgi-4.1.3 + + $SHELL{/usr/local/tools/netcdf-pgi-4.1.3/bin/nc-config --flibs} + + + + + + -O2 + + + --host=Linux + + /projects/ccsm/esmf-6.3.0rp1/lib/libO/Linux.intel.64.openmpi.default + + -O2 + + $ENV{NETCDFROOT} + lustre + $ENV{PNETCDFROOT} + + -L${NETCDF_PATH}/lib -lnetcdff -L/projects/ccsm/BLAS-intel -lblas_LINUX + + + + + + -DHAVE_NANOTIME + + $ENV{TACC_NETCDF_DIR} + lustre + $ENV{TACC_PNETCDF_DIR} + + + + + -xHost + + + -xHost + -mcmodel medium + + + -L$ENV{TACC_HDF5_LIB} -lhdf5 + + + $SHELL{${NETCDF_PATH}/bin/nf-config --flibs} -L$ENV{TACC_HDF5_LIB} -lhdf5 + + $ENV{TRILINOS_PATH} + + + + + -xMIC-AVX512 + + + -xMIC-AVX512 + + + --host=Linux + + + -L$(NETCDF_DIR)/lib -lnetcdff -L$(NETCDF_DIR)/lib -lnetcdf -Wl,-rpath -Wl,$(NETCDF_DIR)/lib + + + + + + /soft/libraries/hdf5/1.8.10/cnk-xl/current/ + + + mpixlf77_r + mpixlc_r + mpixlf2003_r + /soft/libraries/netcdf/4.3.0-f4.2/cnk-xl/V1R2M0-20131211/ + gpfs + /soft/libraries/pnetcdf/1.3.1/cnk-xl/current/ + mpixlc_r + mpixlf2003_r + + -L${NETCDF_PATH}/lib -lnetcdff -lnetcdf -L/soft/libraries/hdf5/1.8.10/cnk-xl/current/lib -lhdf5_hl -lhdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -L/soft/libraries/alcf/current/xl/LAPACK/lib -llapack -L/soft/libraries/alcf/current/xl/BLAS/lib -lblas -L/bgsys/drivers/ppcfloor/comm/sys/lib + + + + + + + + + + + + + + USERDEFINED_MUST_EDIT_THIS + + + # USERDEFINED $SHELL{${NETCDF_PATH}/bin/nc-config --flibs} + + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + + -DNO_MPIMOD + + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + -qopt-report -xCORE_AVX2 -no-fma + + + -qopt-report -xCORE_AVX2 -no-fma + + + -DPIO_ENABLE_LOGGING=ON + + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_noMPI_noOpenMP + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_MPI_openMP + + FALSE + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + -vec-report + + + -vec-report + + + -DPIO_ENABLE_LOGGING=ON + + + + + /glade/apps/opt/lib + gcc + gfortran + + + + + -xHost + + + -DINTEL_MKL -DHAVE_SSE2 + + + -xHost + + mpiicpc + /glade/apps/opt/papi/5.3.0/intel/12.1.5/include/ + /glade/apps/opt/papi/5.3.0/intel/12.1.5/lib64 + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.1_yellowstone_Intel15.0.1_noMPI_noOpenMP + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.1_Intel15.0.1_MPI + + icc + ifort + ${MPICC} + ${MPIFC} + + -Wl,-rpath ${PAPI_LIB} -L${PAPI_LIB} -lpapi + + $ENV{TRILINOS_PATH} + + + + + -O + + + -O + + + -llapack -lblas + + pgcc + pgfortran + + + + + -DHAVE_VPRINTF -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + + -lnetcdff -lnetcdf -mkl + + + -ftrapuv + + + -ftrapuv + + $ENV{NETCDF_DIR} + + + + + -DHAVE_VPRINTF -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + + -lnetcdff -lnetcdf -mkl + + + -ftrapuv + + + -ftrapuv + + $ENV{NETCDF_DIR} + + + diff --git a/config_machines.xml b/config_machines.xml new file mode 100644 index 0000000000..d4515959f2 --- /dev/null +++ b/config_machines.xml @@ -0,0 +1,1965 @@ + + + + + + + + ORNL XE6, os is CNL, 32 pes/node, batch system is PBS + h2o + CNL + pgi,cray,gnu + mpich + /scratch/sciteam/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/inputdata/atm/datm7 + /scratch/sciteam/$USER/archive/$CASE + $ENV{CESMDATAROOT}/ccsm_baselines + $ENV{CESMDATAROOT}/tools/ccsm_cprnc/cprnc + 8 + pbs + cseg + 32 + 16 + TRUE + + aprun + + -n $TOTALPES + + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/3.2.10.3/bin/modulecmd perl + /opt/modules/3.2.10.3/bin/modulecmd python + module + module + + PrgEnv-pgi + PrgEnv-cray + PrgEnv-gnu + pgi + cray + + + PrgEnv-pgi + pgi pgi/16.3.0 + + + PrgEnv-gnu/4.2.84 + gcc gcc/4.8.2 + + + PrgEnv-cray + cce cce/8.4.6 + + + papi/5.3.2 + cray-mpich cray-mpich/7.3.3 + cray-libsci cray-libsci/16.03.1 + torque/6.0.2 + + + cray-netcdf-hdf5parallel/4.4.0 + cray-parallel-netcdf/1.7.0 + + + cray-netcdf/4.4.0 + + + cmake/3.1.3 + darshan + /sw/modulefiles/CESM + CESM-ENV + + + + 64M + + + + + Brutus Linux Cluster ETH (pgi(9.0-1)/intel(10.1.018) with openi(1.4.1)/mvapich2(1.4rc2), 16 pes/node, batch system LSF, added by UB + LINUX + pgi,intel + openmpi,mpich + /cluster/work/uwis/$USER + /cluster/work/uwis/ccsm/inputdata + /cluster/work/uwis/ccsm/inputdata/atm/datm7 + /cluster/work/uwis/$USER/archive/$CASE + /cluster/work/uwis/ccsm/ccsm_baselines + /cluster/work/uwis/ccsm/tools/cprnc/cprnc + 1 + lsf + tcraig -at- ucar.edu + 16 + 16 + + mpirun + + -hostfile $ENV{PBS_JOBID} + -ppn $MAX_MPITASKS_PER_NODE + -n $TOTALPES + + + + ompirun + + + + + /etc/profile.d/modules.perl + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + + /usr/bin/modulecmd perl + module + module + + + + + intel/10.1.018 + + + pgi/9.0-1 + + + mvapich2/1.4rc2 + + + open_mpi/1.4.1 + + + netcdf/4.0.1 + + + + 64M + + + + + + Example port to centos7 linux system with gcc, netcdf, pnetcdf and mpich + using modules from http://www.admin-magazine.com/HPC/Articles/Environment-Modules + + regex.expression.matching.your.machine + LINUX + https://howto.get.out + gnu + mpich + none + + $ENV{HOME}/cesm/scratch + $ENV{HOME}/cesm/inputdata + $ENV{HOME}/cesm/inputdata/lmwg + $ENV{HOME}/cesm/archive/$CASE + $ENV{HOME}/cesm/cesm_baselines + $ENV{HOME}/cesm/tools/cime/tools/cprnc/cprnc + gmake + 8 + none + me@my.address + 8 + 8 + FALSE + + mpiexec + + -np {{ total_tasks }} + + + + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/python.py + /usr/share/Modules/init/csh + /usr/share/Modules/init/sh + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + + + compiler/gnu/7.2.0 + mpi/gcc/mpich-3.2 + tool/netcdf/4.4.1.1/gcc + tool/parallel-netcdf/mpich + + + + 256M + + + -1 + + + + + NCAR SGI platform, os is Linux, 36 pes/node, batch system is PBS + .*.cheyenne.ucar.edu + LINUX + intel,gnu + mpt,openmpi + /glade/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/cesm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc.cheyenne + 8 + pbs + cseg + + 36 + 36 + TRUE + + mpiexec_mpt + + -np $TOTALPES + -p "%g:" + + omplace -tm open64 + + + + mpirun + + -np $TOTALPES + + + + + /opt/sgi/mpt/mpt-2.15/bin/mpirun $ENV{UNIT_TEST_HOST} -np 1 + + + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/perl + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/env_modules_python.py + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/csh + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/sh + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/libexec/lmod perl + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.2 + + + intel/17.0.1 + esmf_libs + mkl + + + esmf-7.0.0-defio-mpi-g + + + esmf-7.0.0-defio-mpi-O + + + esmf-7.0.0-ncdfio-uni-g + + + esmf-7.0.0-ncdfio-uni-O + + + gnu/6.3.0 + openblas/0.2.14 + + + mpt/2.16 + netcdf-mpi/4.4.1.1 + pnetcdf/1.8.1 + + + openmpi/2.1.0 + netcdf/4.4.1.1 + + + ncarcompilers/0.4.1 + + + netcdf/4.4.1.1 + + + + 256M + /glade/scratch/$USER + 16 + + + + false + + + -1 + + + + + PNL Haswell cluster, OS is Linux, batch system is SLURM + LINUX + intel,pgi + mvapich2,openmpi,intelmpi,mvapich + /pic/scratch/$USER + /pic/scratch/tcraig/IRESM/inputdata + /pic/scratch/tcraig/IRESM/inputdata/atm/datm7 + /pic/scratch/$USER/cases/archive/$CASE + /pic/scratch/tcraig/IRESM/ccsm_baselines + /people/tcraig/bin/cprnc + 8 + slurm + tcraig -at- ucar.edu + 24 + 24 + FALSE + + srun + + --mpi=none + --ntasks=$TOTALPES + --cpu_bind=sockets --cpu_bind=verbose + --kill-on-bad-exit + + + + srun + + --ntasks=$TOTALPES + --cpu_bind=sockets --cpu_bind=verbose + --kill-on-bad-exit + + + + mpirun + + -n $TOTALPES + + + + mpirun + + -n $TOTALPES + + + + /share/apps/modules/Modules/3.2.10/init/perl.pm + /etc/profile.d/modules.csh + /etc/profile.d/modules.sh + /share/apps/modules/Modules/3.2.10/bin/modulecmd perl + module + module + + + + + perl/5.20.0 + cmake/2.8.12 + + + intel/15.0.1 + netcdf/4.3.2 + mkl/15.0.1 + + + pgi/14.10 + netcdf/4.3.2 + + + mvapich2/2.1 + + + mvapich2/2.1 + + + intelmpi/5.0.1.035 + + + openmpi/1.8.3 + + + + 64M + + + $MLIB_LIB + /share/apps/netcdf/4.3.2/intel/15.0.1 + + + /share/apps/netcdf/4.3.2/pgi/14.10 + + + + + + + NERSC XC40 Haswell, os is CNL, 32 pes/node, batch system is Slurm + cori + CNL + intel,gnu,cray + mpt + $ENV{SCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.corip1/cprnc + 8 + slurm + cseg + 64 + 32 + + srun + + --label + -n $TOTALPES + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-sandybridge + craype-ivybridge + craype + + + + PrgEnv-intel + intel intel/17.0.1.132 + /global/project/projectdirs/ccsm1/modulefiles/cori + + + esmf/6.3.0rp1-defio-intel2016-mpi-O + + + esmf/6.3.0rp1-defio-intel2016-mpiuni-O + + + + PrgEnv-cray + cce cce/8.5.7 + + + PrgEnv-gnu + gcc gcc/6.2.0 + + + cray-memkind + papi/5.4.1.3 + craype craype/2.5.7 + + + cray-libsci/16.09.1 + + + cray-mpich/7.4.4 + + + cray-hdf5/1.10.0 + cray-netcdf/4.4.1 + + + cray-netcdf-hdf5parallel/4.3.3.1 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + cmake/3.5.2 + + + + 256M + + + + + + + NERSC XC* KNL, os is CNL, 68 pes/node, batch system is Slurm + CNL + intel,gnu,cray + mpt + $ENV{SCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.corip1/cprnc + 8 + slurm + cseg + 256 + 64 + + srun + + --label + -n $TOTALPES + -c 4 --cpu_bind=cores + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + craype-mic-knl + craype-haswell + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + + + PrgEnv-intel + intel intel/17.0.3.191 + /global/project/projectdirs/ccsm1/modulefiles/cori + + + esmf/6.3.0rp1-defio-intel2016-mpi-O + + + esmf/6.3.0rp1-defio-intel2016-mpiuni-O + + + + PrgEnv-cray + cce cce/8.5.8 + + + PrgEnv-gnu + gcc gcc/6.2.0 + + + cray-memkind + craype-mic-knl + craype craype/2.5.7 + + + cray-libsci/16.11.1 + + + cray-mpich/7.4.4 + + + cray-hdf5/1.10.0 + cray-netcdf/4.4.1 + + + cray-netcdf-hdf5parallel/4.3.3.1 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + cmake/3.5.2 + + + + 256M + + + + + PNL IBM Xeon cluster, os is Linux (pgi), batch system is SLURM + LINUX + pgi,intel + mvapich2,mvapich + /lustre/$USER + /lustre/tcraig/IRESM/inputdata + /lustre/tcraig/IRESM/inputdata/atm/datm7 + /lustre/$USER/archive/$CASE + /lustre/tcraig/IRESM/ccsm_baselines + /lustre/tcraig/IRESM/tools/cprnc/cprnc + 8 + slurm + tcraig -at- ucar.edu + 12 + 12 + + srun + + --ntasks=$TOTALPES + --cpu_bind=sockets + --cpu_bind=verbose + --kill-on-bad-exit + + + + srun + + --mpi=none + --ntasks=$TOTALPES + --cpu_bind=sockets + --cpu_bind=verbose + --kill-on-bad-exit + + + + /etc/profile.d/modules.perl + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /share/apps/modules/Modules/3.2.7/bin/modulecmd perl + module + module + + + perl/5.20.7 + cmake/3.0.0 + pgi/15.5 + mpi/mvapich2/1.5.1p1/pgi11.3 + netcdf/4.1.2/pgi + + + + 64M + + + + + NERSC XC30, os is CNL, 24 pes/node, batch system is SLURM + edison + CNL + intel,gnu,cray + mpt + $ENV{CSCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.edison/cprnc + 8 + slurm + cseg + 48 + 24 + + srun + + --label + -n $TOTALPES + -c $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-sandybridge + craype-ivybridge + craype + + + + PrgEnv-intel + intel intel/16.0.3.210 + cray-libsci + /global/project/projectdirs/ccsm1/modulefiles/edison + + + esmf/6.3.0rp1-defio-intel15.0-mpi-O + + + esmf/6.3.0rp1-defio-intel15.0-mpiuni-O + + + PrgEnv-cray + cce cce/8.5.1 + cray-libsci/16.07.1 + + + PrgEnv-gnu + gcc gcc/6.1.0 + cray-libsci/16.07.1 + + + papi/5.4.3.2 + craype craype/2.5.5 + craype-ivybridge + + + cray-mpich/7.6.0 + + + cray-hdf5/1.8.16 + cray-netcdf/4.4.0 + + + cray-netcdf-hdf5parallel/4.4.0 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + + + 64M + + + + + NOAA XE6, os is CNL, 24 pes/node, batch system is PBS + CNL + pgi + mpich + /lustre/fs/scratch/Julio.T.Bacmeister + /lustre/fs/scratch/Julio.T.Bacmeister/inputdata + /lustre/fs/scratch/Julio.T.Bacmeister/inputdata + /lustre/fs/scratch/Julio.T.Bacmeister/archive/$CASE + UNSET + UNSET + 8 + pbs + julio -at- ucar.edu + 24 + 24 + + aprun + + -j {{ hyperthreading }} + -n $TOTALPES + -S {{ tasks_per_numa }} + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/csh + /opt/modules/default/init/sh + /opt/modules/default/bin/modulecmd perl + module + module + + PrgEnv-pgi + PrgEnv-cray + PrgEnv-gnu + pgi + cray + + + PrgEnv-pgi + pgi pgi/12.5.0 + + + PrgEnv-gnu + torque + + + PrgEnv-cray/4.0.36 + cce/8.0.2 + + + torque/4.1.3 + netcdf-hdf5parallel/4.2.0 + parallel-netcdf/1.2.0 + + + + 64M + 1 + + + + + NCAR CGD Linux Cluster 48 pes/node, batch system is PBS + ^hob.* + LINUX + intel,pgi,nag,gnu + mvapich2,openmpi + /scratch/cluster/$USER + /fs/cgd/csm/inputdata + /project/tss + /scratch/cluster/$USER/archive/$CASE + /fs/cgd/csm/ccsm_baselines + /fs/cgd/csm/tools/cprnc_hobart/cprnc + gmake --output-sync + 4 + pbs + cseg + 48 + 48 + + mpiexec + + --machinefile $ENV{PBS_NODEFILE} + -n $TOTALPES + + + + mpiexec + + -n $TOTALPES + + + + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/python.py + /usr/share/Modules/init/csh + /usr/share/Modules/init/sh + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + + + compiler/intel/15.0.2.164 + + + tool/parallel-netcdf/1.7.0/intel/mvapich2 + + + compiler/pgi/17.04 + + + tool/parallel-netcdf/1.6.1/pgi/mvapich2 + + + compiler/nag/6.1 + + + compiler/gnu/5.4.0 + tool/parallel-netcdf/1.8.1/gnu-5.4.0/openmpi + + + + 64M + + + + + + + Customize these fields as appropriate for your system, + particularly changing MAX_TASKS_PER_NODE and MAX_MPITASKS_PER_NODE to the + number of cores on your machine. You may also want to change + instances of '$ENV{HOME}/projects' to your desired directory + organization. You can use this in either of two ways: (1) + Without making any changes, by adding `--machine homebrew` to + create_newcase or create_test (2) Copying this into a + config_machines.xml file in your personal .cime directory and + then changing the machine name (MACH="homebrew") to + your machine name and the NODENAME_REGEX to something matching + your machine's hostname. With (2), you should not need the + `--machine` argument, because the machine should be determined + automatically. However, with (2), you will also need to copy the + homebrew-specific settings in config_compilers.xml into a + config_compilers.xml file in your personal .cime directory, again + changing the machine name (MACH="homebrew") to your machine name. + + + something.matching.your.machine.hostname + Darwin + gnu + mpich + $ENV{HOME}/projects/scratch + $ENV{HOME}/projects/cesm-inputdata + $ENV{HOME}/projects/ptclm-data + $ENV{HOME}/projects/scratch/archive/$CASE + $ENV{HOME}/projects/baselines + $CIMEROOT/tools/cprnc/build/cprnc + make + 4 + none + __YOUR_NAME_HERE__ + 4 + 4 + + mpirun + + -np $TOTALPES + -prepend-rank + + + + + /usr/local + + + + + + NCAR SGI test platform, os is Linux, 36 pes/node, batch system is PBS + .*.laramie.ucar.edu + LINUX + intel,gnu + mpt + /picnic/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/cesm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc + 8 + pbs + cseg + + 36 + 36 + TRUE + + mpiexec_mpt + + -p "%g:" + omplace + + + + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/perl + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/env_modules_python.py + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/csh + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/sh + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/libexec/lmod perl + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.0 + + + intel/16.0.3 + mkl + + + gnu/6.2.0 + + + mpt/2.15 + ncarcompilers/0.3.2 + + + netcdf/4.4.1 + + + netcdf-mpi/4.4.1 + pnetcdf/1.7.x + + + + 256M + 16 + + + + + Linux workstation for Jenkins testing + (melvin|watson) + LINUX + sonproxy.sandia.gov:80 + gnu + openmpi + /sems-data-store/ACME/timings + $ENV{HOME}/acme/scratch + /sems-data-store/ACME/inputdata + /sems-data-store/ACME/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /sems-data-store/ACME/baselines + /sems-data-store/ACME/cprnc/build/cprnc + make + 32 + acme_developer + none + jgfouca at sandia dot gov + 64 + 64 + + mpirun + + -np $TOTALPES + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + sems-gcc/5.1.0 + sems-openmpi/1.8.7 + sems-cmake/2.8.12 + sems-netcdf/4.3.2/parallel + + + + $ENV{SEMS_NETCDF_ROOT} + + + $ENV{SEMS_NETCDF_ROOT} + + + + + + ANL IBM BG/Q, os is BGP, 16 pes/node, batch system is cobalt + .*.fst.alcf.anl.gov + BGQ + ibm + ibm + /projects/$PROJECT/usr/$ENV{USER} + /projects/ccsm/inputdata + /projects/ccsm/inputdata/atm/datm7 + /projects/$PROJECT/usr/$USER/archive/$CASE + /projects/ccsm/ccsm_baselines/ + /projects/ccsm/tools/cprnc/cprnc + 4 + cobalt + cseg + 64 + 8 + TRUE + + /usr/bin/runjob + + --label short + + --ranks-per-node $MAX_MPITASKS_PER_NODE + + --np $TOTALPES + --block $COBALT_PARTNAME --envs OMP_WAIT_POLICY=active --envs BG_SMP_FAST_WAKEUP=yes $LOCARGS + --envs BG_THREADLAYOUT=1 + --envs OMP_STACKSIZE=32M + --envs OMP_NUM_THREADS=$ENV{OMP_NUM_THREADS} + + + + /etc/profile.d/00softenv.csh + /etc/profile.d/00softenv.sh + soft + soft + + +mpiwrapper-xl + @ibm-compilers-2015-02 + +cmake + +python + + + + 10000 + FALSE + 64M + /soft/libraries/hdf5/1.8.14/cnk-xl/current + + + + + PNL cluster, os is Linux (pgi), batch system is SLURM + LINUX + pgi + mpich + /pic/scratch/$USER + /pic/scratch/tcraig/IRESM/inputdata + /pic/scratch/tcraig/IRESM/inputdata/atm/datm7 + /pic/scratch/$USER/archive/$CASE + /pic/scratch/tcraig/IRESM/ccsm_baselines + /pic/scratch/tcraig/IRESM/tools/cprnc/cprnc + 8 + slurm + tcraig -at- ucar.edu + 32 + 32 + FALSE + + mpiexec_mpt + + --mpi=none + -n=$TOTALPES + --kill-on-bad-exit + + + + /share/apps/modules/Modules/3.2.7/init/perl.pm + /share/apps/modules/Modules/3.2.7/init/csh + /share/apps/modules/Modules/3.2.7/init/sh + /share/apps/modules/Modules/3.2.7/bin/modulecmd perl + module + module + + + precision/i4 + pgi/11.8 + mvapich2/1.7 + netcdf/4.1.3 + + + + 64M + + + + + NASA/AMES Linux Cluster, Linux (ia64), 2.4 GHz Broadwell Intel Xeon E5-2680v4 processors, 28 pes/node (two 14-core processors) and 128 GB of memory/node, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 28 + 28 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), 2.5 GHz Haswell Intel Xeon E5-2680v3 processors, 24 pes/node (two 12-core processors) and 128 GB of memory/node, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 24 + 24 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), Altix ICE, 2.6 GHz Sandy Bridge processors, 16 cores/node and 32 GB of memory, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 16 + 16 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), Altix ICE, 2.8 GHz Ivy Bridge processors, 20 cores/node and 3.2 GB of memory per core, batch system is PBS + LINUX + intel + mpich + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 20 + 20 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + CSCS Cray XE6, os is CNL, 32 pes/node, batch system is SLURM + CNL + pgi,cray,gnu + mpich + /scratch/rosa/$USER + /project/s433/cesm_inputdata + /project/s433/cesm_inputdata/atm/datm7 + /project/s433/$USER/archive/$CASE + /project/s433/ccsm_baselines + /project/s433/cesm_tools/ccsm_cprnc/cprnc + 12 + slurm + edouard.davin -at- env.ethz.ch + 32 + 32 + + aprun + + -n $TOTALPES + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + + 64M + + + + + + Linux workstation at Sandia on SRN with SEMS TPL modules + (s999964|climate|penn) + LINUX + wwwproxy.sandia.gov:80 + gnu + openmpi + /sems-data-store/ACME/timings + $ENV{HOME}/acme/scratch + /sems-data-store/ACME/inputdata + /sems-data-store/ACME/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /sems-data-store/ACME/baselines + /sems-data-store/ACME/cprnc/build/cprnc + make + 32 + acme_developer + none + jgfouca at sandia dot gov + 64 + 64 + + mpirun + + -np $TOTALPES + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + sems-gcc/5.1.0 + sems-openmpi/1.8.7 + sems-cmake/2.8.12 + sems-netcdf/4.3.2/parallel + + + + $ENV{SEMS_NETCDF_ROOT} + $ENV{SEMS_NETCDF_ROOT} + + + + + SNL clust + skybridge-login + LINUX + wwwproxy.sandia.gov:80 + intel + openmpi + /projects/ccsm/timings + /gscratch/$USER/acme_scratch/skybridge + /projects/ccsm/inputdata + /projects/ccsm/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /projects/ccsm/ccsm_baselines + /projects/ccsm/cprnc/build/cprnc_wrap + 8 + acme_integration + slurm + jgfouca at sandia dot gov + 16 + 16 + TRUE + + + mpirun + + -np $TOTALPES + -npernode $MAX_MPITASKS_PER_NODE + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + gnu/4.9.2 + intel/intel-15.0.3.187 + libraries/intel-mkl-15.0.2.164 + libraries/intel-mkl-15.0.2.164 + + + openmpi-intel/1.8 + sems-hdf5/1.8.12/parallel + sems-netcdf/4.3.2/parallel + sems-hdf5/1.8.12/base + sems-netcdf/4.3.2/base + + + + $ENV{SEMS_NETCDF_ROOT} + 64M + + + $ENV{SEMS_NETCDF_ROOT} + + + + + TACC DELL, os is Linux, 16 pes/node, batch system is SLURM + .*stampede + LINUX + intel + mvapich2,impi + $ENV{SCRATCH} + /scratch/projects/xsede/CESM/inputdata + /scratch/projects/xsede/CESM/inputdata/lmwg + $WORK/archive/$CASE + /scratch/projects/xsede/CESM/ccsm_baselines + /scratch/projects/xsede/CESM/tools/cprnc/cprnc + 4 + slurm + cseg + 16 + 16 + + + ibrun + + + ibrun + + + /opt/apps/lmod/lmod/init/perl + /opt/apps/lmod/lmod/init/env_modules_python.py + /opt/apps/lmod/lmod/init/sh + /opt/apps/lmod/lmod/init/csh + /opt/apps/lmod/lmod/libexec/lmod perl + /opt/apps/lmod/lmod/libexec/lmod python + module + module + + + TACC + python/2.7.12 + intel/15.0.2 + perl/5.16.2 + cmake/3.1.0 + + + mvapich2 + pnetcdf/1.6.1 + parallel-netcdf/4.3.3.1 + + + mvapich2 + impi + pnetcdf/1.6.0 + parallel-netcdf/4.3.3.1 + + + netcdf/4.3.3.1 + + + + 256M + /scratch/projects/xsede/CESM/perl5/lib/perl5/x86_64-linux-thread-multi:/scratch/projects/xsede/CESM/perl5/lib/perl5 + + + + + Lawrencium LR3 cluster at LBL, OS is Linux (intel), batch system is SLURM + n0*.lr3.lbl.gov + LINUX + intel + openmpi + /global/scratch/$ENV{USER} + /global/scratch/$ENV{USER}/cesm_input_datasets/ + /global/scratch/$ENV{USER}/cesm_input_datasets/atm/datm7 + $CIME_OUTPUT_ROOT/cesm_archive/$CASE + $CIME_OUTPUT_ROOT/cesm_baselines + /$CIME_OUTPUT_ROOT/cesm_tools/cprnc/cprnc + 4 + slurm + rgknox and gbisht at lbl dot gov + 16 + 16 + TRUE + + mpirun + + + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /usr/Modules/init/perl.pm + /usr/Modules/python.py + module + module + /usr/Modules/bin/modulecmd perl + /usr/Modules/bin/modulecmd python + + + cmake + perl xml-libxml switch python/2.7.11 + + + intel/2015.6.233 + mkl + + + netcdf/4.4.0-intel-s + + + openmpi + netcdf/4.4.0-intel-p + + + + + + Lawrencium LR2 cluster at LBL, OS is Linux (intel), batch system is SLURM + n0*.lr2.lbl.gov + LINUX + intel + openmpi + /global/scratch/$ENV{USER} + /global/scratch/$ENV{USER}/cesm_input_datasets/ + /global/scratch/$ENV{USER}/cesm_input_datasets/atm/datm7 + $CIME_OUTPUT_ROOT/cesm_archive/$CASE + $CIME_OUTPUT_ROOT/cesm_baselines + /$CIME_OUTPUT_ROOT/cesm_tools/cprnc/cprnc + 4 + slurm + rgknox and gbisht at lbl dot gov + 12 + 12 + TRUE + + mpirun + + + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /usr/Modules/init/perl.pm + /usr/Modules/python.py + module + module + /usr/Modules/bin/modulecmd perl + /usr/Modules/bin/modulecmd python + + + cmake + perl xml-libxml switch python/2.7.11 + + + intel/2015.6.233 + mkl + + + netcdf/4.4.0-intel-s + + + openmpi + netcdf/4.4.0-intel-p + + + + + + ALCF Cray XC* KNL, os is CNL, 64 pes/node, batch system is cobalt + theta.* + CNL + intel,gnu,cray + mpt + EarlyPerf_theta + /projects/EarlyPerf_theta/cesm/scratch/$USER + /projects/EarlyPerf_theta/cesm/inputdata + /projects/EarlyPerf_theta/cesm/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /projects/EarlyPerf_theta/cesm/baselines + /projects/EarlyPerf_theta/cesm/tools/cprnc/cprnc + 8 + cobalt_theta + cseg + 64 + 64 + TRUE + + aprun + + -n $TOTALPES + -N $MAX_MPITASKS_PER_NODE + --cc depth -d $OMP_NUM_THREADS + -e OMP_STACKSIZE=64M + -e OMP_NUM_THREADS=$OMP_NUM_THREADS + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-hdf5-parallel + pmi + cray-libsci + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-mic-knl + craype + + + + PrgEnv-intel/6.0.3 + intel intel/17.0.0.098 + cray-libsci + + + + PrgEnv-cray/6.0.3 + cce cce/8.5.4 + + + PrgEnv-gnu/6.0.3 + gcc gcc/6.2.0 + + + papi/5.4.3.3 + craype craype/2.5.7 + + + cray-libsci/16.09.1 + + + cray-mpich/7.4.4 + + + cray-netcdf-hdf5parallel/4.4.1 + cray-hdf5-parallel/1.10.0 + cray-parallel-netcdf/1.7.0 + + + + + + NCAR IBM, os is Linux, 16 pes/node, batch system is LSF + .*yellowstone + LINUX + intel,pgi,gnu,intel15 + mpich2,pempi + /glade/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/ccsm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc + /glade/apps/opt/perlmods/lib64/perl5:/glade/apps/opt/perlmods/share/perl5 + 8 + lsf + cseg + 30 + 15 + TRUE + + + mpirun.lsf + + + TARGET_PROCESSOR_LIST=AUTO_SELECT $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + $ENV{CESMDATAROOT}/tools/bin/launch + + + + unset MP_PE_AFFINITY; unset MP_TASK_AFFINITY; unset MP_CPU_BIND_LIST; $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + $ENV{CESMDATAROOT}/tools/bin/hybrid_launch + + + + $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + + + + /glade/apps/opt/lmod/lmod/init/perl + /glade/apps/opt/lmod/lmod/init/env_modules_python.py + /glade/apps/opt/lmod/lmod/init/csh + /glade/apps/opt/lmod/lmod/init/sh + /glade/apps/opt/lmod/lmod/libexec/lmod perl + /glade/apps/opt/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.0 + ncarbinlibs/1.1 + perlmods + gmake/4.1 + python + all-python-libs + git + + + intel/15.0.3 + mkl/11.1.2 + trilinos/11.10.2 + esmf + + + esmf-7.0.0-ncdfio-mpi-g + + + esmf-7.0.0-defio-mpi-O + + + esmf-7.0.0-ncdfio-uni-g + + + esmf-7.0.0-ncdfio-uni-O + + + pgi/15.10 + + + gnu/5.2.0 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + ncarcompilers/1.0 + cmake/3.0.2 + all-python-libs + + + + 256M + yes + 2 + yes + us + unordered + yes + + + 0 + + + $MPILIB + + + + ${EXEROOT}/cesm.exe + >> cesm.log.$LID 2>&1 + + + diff --git a/config_pio.xml b/config_pio.xml new file mode 100644 index 0000000000..ffe58e936e --- /dev/null +++ b/config_pio.xml @@ -0,0 +1,344 @@ + + + + + + + + + + + $MAX_MPITASKS_PER_NODE + 60 + + + + + + + + + + pnetcdf + netcdf + + + + + + $PIO_VERSION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + netcdf + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mkDepends b/mkDepends new file mode 100755 index 0000000000..d9bcbdd87b --- /dev/null +++ b/mkDepends @@ -0,0 +1,452 @@ +#!/usr/bin/env perl + +# Generate dependencies in a form suitable for inclusion into a Makefile. +# The source filenames are provided in a file, one per line. Directories +# to be searched for the source files and for their dependencies are provided +# in another file, one per line. Output is written to STDOUT. +# +# For CPP type dependencies (lines beginning with #include), or for Fortran +# include dependencies, the dependency search is recursive. Only +# dependencies that are found in the specified directories are included. +# So, for example, the standard include file stdio.h would not be included +# as a dependency unless /usr/include were one of the specified directories +# to be searched. +# +# For Fortran module USE dependencies (lines beginning with a case +# insensitive "USE", possibly preceded by whitespace) the Fortran compiler +# must be able to access the .mod file associated with the .o file that +# contains the module. In order to correctly generate these dependencies +# the following restriction must be observed. +# +# ** All modules that are to be contained in the dependency list must be +# ** contained in one of the source files in the list provided on the command +# ** line. +# +# The reason for this restriction is that the modules have a nominal dependence +# on the .o files. If a module is being used for which the source code is not +# available (e.g., a module from a library), then adding a .o dependency for +# that module is a mistake because make will attempt to build that .o file, and +# will fail if the source code is not available. +# +# Original version: B. Eaton +# Climate Modelling Section, NCAR +# Feb 2001 +# +# ChangeLog: +# ----------------------------------------------------------------------------- +# Modifications to Brian Eaton's original to relax the restrictions on +# source file name matching module name and only one module per source +# file. Also added a new "-d depfile" option which allows an additional +# file to be added to every dependence. +# +# +# Tom Henderson +# Global Systems Division, NOAA/OAR +# Mar 2011 +# ----------------------------------------------------------------------------- +# Several updates: +# +# - Remove limitation that modules cannot be named "procedure". +# +# - Allow optional "::" in use statement (Fortran 2003). +# +# - Instead of having .o files depend on other .o files directly, +# have them depend indirectly through the .mod files. This allows +# the compiler to have discretion over whether to update a .mod, +# and prevents cascading recompilation when it does not. +# +# +# Sean Santos +# CESM Software Engineering Group, NCAR +# Mar 2013 +# ----------------------------------------------------------------------------- +# More updates: +# +# - Restore ability to recognize .mod files in the path, if there's no source +# file that provides the same module. +# +# - Allow "non_intrinsic" keyword (Fortran 2003). +# +# Sean Santos +# CESM Software Engineering Group, NCAR +# Mar 2013 +# ----------------------------------------------------------------------------- + + +use Getopt::Std; +use File::Basename; + +# Check for usage request. +@ARGV >= 2 or usage(); + +# Process command line. +my %opt = (); +getopts( "t:wd:m:", \%opt ) or usage(); +my $filepath_arg = shift() or usage(); +my $srcfile_arg = shift() or usage(); +@ARGV == 0 or usage(); # Check that all args were processed. + +my $obj_dir = ""; +if ( defined $opt{'t'} ) { $obj_dir = $opt{'t'}."/"; } + +my $additional_file = ""; +if ( defined $opt{'d'} ) { $additional_file = $opt{'d'}; } + +my $mangle_scheme = "lower"; +if ( defined $opt{'m'} ) { $mangle_scheme = $opt{'m'}; } + +open(FILEPATH, $filepath_arg) or die "Can't open $filepath_arg: $!\n"; +open(SRCFILES, $srcfile_arg) or die "Can't open $srcfile_arg: $!\n"; + +# Make list of paths to use when looking for files. +# Prepend "." so search starts in current directory. This default is for +# consistency with the way GNU Make searches for dependencies. +my @file_paths = ; +close(FILEPATH); +chomp @file_paths; +unshift(@file_paths,'.'); +foreach $dir (@file_paths) { # (could check that directories exist here) + $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name + ($dir) = glob $dir; # Expand tildes in path names. +} + +# Make list of files containing source code. +my @src = ; +close(SRCFILES); +chomp @src; + +my %module_files = (); + +# Attempt to parse each file for /^\s*module/ and extract module names +# for each file. +my ($f, $name, $path, $suffix, $mod); +my @suffixes = ('\.[fF]90', '\.[fF]','\.F90\.in' ); +foreach $f (@src) { + ($name, $path, $suffix) = fileparse($f, @suffixes); + # find the file in the list of directorys (in @file_paths) + my $file_path = find_file($f); + open(FH, $file_path) or die "Can't open $file_path: $!\n"; + while ( ) { + # Search for module definitions. + if ( /^\s*MODULE\s+(\w+)\s*(\!.*)?$/i ) { + ($mod = $1) =~ tr/A-Z/a-z/; + if ( defined $module_files{$mod} ) { + die "Duplicate definitions of module $mod in $module_files{$mod} and $name: $!\n"; + } + $module_files{$mod} = $name; + } + } + close( FH ); +} + +# Now make a list of .mod files in the file_paths. If a source dependency +# can't be found based on the module_files list above, then maybe a .mod +# module dependency can if the mod file is visible. +my %trumod_files = (); +my ($dir); +my ($f, $name, $path, $suffix, $mod); +# This might not be clear: we want to mangle a "\" so that it will escape +# the "." in .mod or .MOD +my @suffixes = (mangle_modfile("\\")); +foreach $dir (@file_paths) { + # Similarly, this gets us $dir/*.mod or $dir/*.MOD + @filenames = (glob("$dir/".mangle_modfile("*"))); + foreach $f (@filenames) { + ($name, $path, $suffix) = fileparse($f, @suffixes); + ($mod = $name) =~ tr/A-Z/a-z/; + $trumod_files{$mod} = $name; + } +} + +#print STDERR "\%module_files\n"; +#while ( ($k,$v) = each %module_files ) { +# print STDERR "$k => $v\n"; +#} + +# Find module and include dependencies of the source files. +my ($file_path, $rmods, $rincs); +my %file_modules = (); +my %file_includes = (); +my @check_includes = (); +my %modules_used = (); +foreach $f ( @src ) { + + # Find the file in the seach path (@file_paths). + unless ($file_path = find_file($f)) { + if (defined $opt{'w'}) {print STDERR "$f not found\n";} + next; + } + + # Find the module and include dependencies. + ($rmods, $rincs) = find_dependencies( $file_path ); + + # Remove redundancies (a file can contain multiple procedures that have + # the same dependencies). + $file_modules{$f} = rm_duplicates($rmods); + $file_includes{$f} = rm_duplicates($rincs); + + # Make a list of all include files. + push @check_includes, @{$file_includes{$f}}; +} + +print STDERR "\%file_modules\n"; +while ( ($k,$v) = each %file_modules ) { + print STDERR "$k => @$v\n"; +} +print STDERR "\%file_includes\n"; +while ( ($k,$v) = each %file_includes ) { + print STDERR "$k => @$v\n"; +} +print STDERR "\@check_includes\n"; +print STDERR "@check_includes\n"; + +# Find include file dependencies. +my %include_depends = (); +while (@check_includes) { + $f = shift @check_includes; + if (defined($include_depends{$f})) { next; } + + # Mark files not in path so they can be removed from the dependency list. + unless ($file_path = find_file($f)) { + $include_depends{$f} = -1; + next; + } + + # Find include file dependencies. + ($rmods, $include_depends{$f}) = find_dependencies($file_path); + + # Add included include files to the back of the check_includes list so + # that their dependencies can be found. + push @check_includes, @{$include_depends{$f}}; + + # Add included modules to the include_depends list. + if ( @$rmods ) { push @{$include_depends{$f}}, @$rmods; } +} + +#print STDERR "\%include_depends\n"; +#while ( ($k,$v) = each %include_depends ) { +# print STDERR (ref $v ? "$k => @$v\n" : "$k => $v\n"); +#} + +# Remove include file dependencies that are not in the Filepath. +my $i, $ii; +foreach $f (keys %include_depends) { + + unless (ref $include_depends{$f}) { next; } + $rincs = $include_depends{$f}; + unless (@$rincs) { next; } + $ii = 0; + $num_incs = @$rincs; + for ($i = 0; $i < $num_incs; ++$i) { + if ($include_depends{$$rincs[$ii]} == -1) { + splice @$rincs, $ii, 1; + next; + } + ++$ii; + } +} + +# Substitute the include file dependencies into the %file_includes lists. +foreach $f (keys %file_includes) { + my @expand_incs = (); + + # Initialize the expanded %file_includes list. + my $i; + unless (@{$file_includes{$f}}) { next; } + foreach $i (@{$file_includes{$f}}) { + push @expand_incs, $i unless ($include_depends{$i} == -1); + } + unless (@expand_incs) { + $file_includes{$f} = []; + next; + } + + # Expand + for ($i = 0; $i <= $#expand_incs; ++$i) { + push @expand_incs, @{ $include_depends{$expand_incs[$i]} }; + } + + $file_includes{$f} = rm_duplicates(\@expand_incs); +} + +#print STDERR "expanded \%file_includes\n"; +#while ( ($k,$v) = each %file_includes ) { +# print STDERR "$k => @$v\n"; +#} + +# Print dependencies to STDOUT. + +print "# Declare all module files used to build each object.\n"; + +foreach $f (sort keys %file_modules) { + my $file; + if($f =~ /\.F90\.in$/){ + $f =~ /(.+)\.F90\.in/; + $file = $1; + }else{ + $f =~ /(.+)\./; + $file = $1; + } + $target = $obj_dir."$file.o"; + print "$target : $f @{$file_modules{$f}} @{$file_includes{$f}} $additional_file \n"; +} + +print "# The following section relates each module to the corresponding file.\n"; +$target = mangle_modfile("%"); +print "$target : \n"; +print "\t\@\:\n"; + +foreach $mod (sort keys %modules_used) { + my $mod_fname = $obj_dir.mangle_modfile($mod); + my $obj_fname = $obj_dir.$module_files{$mod}.".o"; + print "$mod_fname : $obj_fname\n"; + +} + +#-------------------------------------------------------------------------------------- + +sub find_dependencies { + + # Find dependencies of input file. + # Use'd Fortran 90 modules are returned in \@mods. + # Files that are "#include"d by the cpp preprocessor are returned in \@incs. + + # Check for circular dependencies in \@mods. This type of dependency + # is a consequence of having multiple modules defined in the same file, + # and having one of those modules depend on the other. + + my( $file ) = @_; + my( @mods, @incs ); + + open(FH, $file) or die "Can't open $file: $!\n"; + + # Construct the makefile target associated with this file. This is used to + # check for circular dependencies. + my ($name, $path, $suffix, $target); + my @suffixes = ('\.[fF]90', '\.[fF]','\.F90\.in' ); + ($name, $path, $suffix) = fileparse($file, @suffixes); + $target = "$name.o"; + my $include; + while ( ) { + # Search for "#include" and strip filename when found. + if ( /^#include\s+[<"](.*)[>"]/ ) { + $include = $1; + } + # Search for Fortran include dependencies. + elsif ( /^\s*include\s+['"](.*)['"]/ ) { #" for emacs fontlock + $include = $1; + } + if(defined($include)){ + if($include =~ /shr_assert.h/){ + push @mods, "$obj_dir".mangle_modfile("shr_assert_mod"); + } + push @incs, $include; + undef $include; + } + # Search for module dependencies. + elsif ( /^\s*USE(?:\s+|\s*\:\:\s*|\s*,\s*non_intrinsic\s*\:\:\s*)(\w+)/i ) { + # Return dependency in the form of a .mod file + ($module = $1) =~ tr/A-Z/a-z/; + if ( defined $module_files{$module} ) { + # Check for circular dependency + unless ("$module_files{$module}.o" eq $target) { + $modules_used{$module} = (); + push @mods, "$obj_dir".mangle_modfile($module); + } + } + # If we already have a .mod file around. + elsif ( defined $trumod_files{$module} ) { + push @mods, "$obj_dir".mangle_modfile($trumod_files{$module}); + } + } + } + close( FH ); + return (\@mods, \@incs); +} + +#-------------------------------------------------------------------------------------- + +sub find_file { + +# Search for the specified file in the list of directories in the global +# array @file_paths. Return the first occurance found, or the null string if +# the file is not found. + + my($file) = @_; + my($dir, $fname); + + foreach $dir (@file_paths) { + $fname = "$dir/$file"; + if ( -f $fname ) { return $fname; } + } + return ''; # file not found +} + +#-------------------------------------------------------------------------------------- + +sub rm_duplicates { + +# Return a list with duplicates removed. + + my ($in) = @_; # input arrary reference + my @out = (); + my $i; + my %h = (); + foreach $i (@$in) { + $h{$i} = ''; + } + @out = keys %h; + return \@out; +} + +#-------------------------------------------------------------------------------------- + +sub mangle_modfile { + +# Return the name of the module file corresponding +# to a given module. + + my ($mod) = @_; + my $fname; + + if ($mangle_scheme eq "lower") { + ($fname = $mod) =~ tr/A-Z/a-z/; + $fname .= ".mod"; + } elsif ($mangle_scheme eq "upper") { + ($fname = $mod) =~ tr/a-z/A-Z/; + $fname .= ".MOD"; + } else { + die "Unrecognized mangle_scheme!\n"; + } + + return $fname; + +} + +#-------------------------------------------------------------------------------------- + +sub usage { + ($ProgName = $0) =~ s!.*/!!; # name of program + die <; + close( FILEPATH ); +} else { + @paths = (); +} +chomp @paths; +unshift(@paths, '.'); +foreach $dir (@paths) { # (could check that directories exist here) + $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name + ($dir) = glob $dir; # Expand tildes in path names. +} + +# Loop through the directories and add each filename as a hash key. This +# automatically eliminates redunancies. +%src = (); +foreach $dir (@paths) { + @filenames = (glob("$dir/*.[Ffc]"), glob("$dir/*.[Ff]90"), glob("$dir/*.cpp")); + foreach $filename (@filenames) { + $filename =~ s!.*/!!; # remove part before last slash + $src{$filename} = 1; + } + @templates = glob("$dir/*.F90.in"); + foreach $filename (@templates) { + $filename =~ s!.*/!!; # remove part before last slash + my $dfile = $filename; + $dfile =~ s/\.in//; + delete $src{$dfile} if(defined $src{$dfile}); + $src{$filename} = 1; + } +} + +my @srcfiles; +my $foundcnt=0; +my $writenew=1; +if(-e "Srcfiles"){ # file already exists, do not update if no changes are required + open(SRC,"Srcfiles"); + @srcfiles = ; + close(SRC); + $writenew=0; + foreach $file (@srcfiles){ + chomp $file; + if($src{$file}){ + $src{$file}=0; + }else{ + $writenew=1; # A srcfile was removed + last; + } + + } + foreach $file (keys %src){ + if($src{$file} == 1){ + $writenew=1; # A srcfile was added + last; + } + } +} + +if($writenew==1){ + open(SRC,"> Srcfiles") or die "Can't open Srcfiles\n"; + + foreach $file ( sort keys %src ) { + print SRC "$file\n"; + } + + close( SRC ); +} +#-------------------------------------------------------------------------------------- + +sub usage { + ($ProgName = $0) =~ s!.*/!!; # name of program + die < {0} +""".format(os.path.basename(args[0])), + description=description, + formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("--caseroot", + help="Case directory to build") + + parser.add_argument("--skip-preview-namelist", action="store_true", + help="Skip calling preview-namelist during case.run") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + if args.skip_preview_namelist is None: + args.skip_preview_namelist = False + + return args.caseroot, args.skip_preview_namelist + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + sys.argv.extend([] if "ARGS_FOR_SCRIPT" not in os.environ else os.environ["ARGS_FOR_SCRIPT"].split()) + + caseroot, skip_pnl = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_run(case, skip_pnl=skip_pnl) + + sys.exit(0 if success else 1) + +if __name__ == "__main__": + _main_func(__doc__) diff --git a/template.case.test b/template.case.test new file mode 100755 index 0000000000..340e161b94 --- /dev/null +++ b/template.case.test @@ -0,0 +1,75 @@ +#!/usr/bin/env python +{{ batchdirectives }} +""" +This is the system test submit script for CIME. This should only ever be called +by case.submit when on batch system. This script only exists as a way of providing +batch directives. Use case.submit from the command line to run your case. +""" +import os, sys +os.chdir( '{{ caseroot }}') + +_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * + +from CIME.case_test import case_test +from CIME.case import Case + +import argparse, doctest + +############################################################################### +def parse_command_line(args, description): +############################################################################### + parser = argparse.ArgumentParser( + usage="""\n%s [] [--verbose] +OR +%s --help +OR +%s --test + +\033[1mEXAMPLES:\033[0m + \033[1;32m# case.test SMS\033[0m + > %s +""" % ((os.path.basename(args[0]), ) * 4), + +description=description, + +formatter_class=argparse.ArgumentDefaultsHelpFormatter +) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("testname", nargs="?",default=None, + help="Name of the test to run, default is set in TESTCASE in env_test.xml") + + parser.add_argument("--caseroot", + help="Case directory to build") + + parser.add_argument("--reset", action="store_true", + help="Reset the case to its original state as defined by config_tests.xml") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + return args.caseroot, args.testname, args.reset + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + sys.argv.extend([] if "ARGS_FOR_SCRIPT" not in os.environ else os.environ["ARGS_FOR_SCRIPT"].split()) + + caseroot, testname, reset = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_test(case, testname, reset) + + sys.exit(0 if success else 1) + +if (__name__ == "__main__"): + _main_func(__doc__) diff --git a/template.st_archive b/template.st_archive new file mode 100755 index 0000000000..4ed2f2023c --- /dev/null +++ b/template.st_archive @@ -0,0 +1,79 @@ +#!/usr/bin/env python +# Batch system directives +{{ batchdirectives }} + +""" +template to create a case short term archiving script. This should only ever be called +by case.submit when on batch system. This script only exists as a way of providing +batch directives. Use case.submit from the command line to run your case. +""" + +import sys, os, time +os.chdir( '{{ caseroot }}') + +_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * +from CIME.case import Case +from CIME.case_st_archive import case_st_archive + +logger = logging.getLogger(__name__) + + +############################################################################### +def parse_command_line(args, description): +############################################################################### + + parser = argparse.ArgumentParser( + usage="""\n{0} [--verbose] +OR +{0} --help +OR +{0} --test + +\033[1mEXAMPLES:\033[0m + \033[1;32m# case.run SMS\033[0m + > {0} +""".format(os.path.basename(args[0])), + +description=description, + +formatter_class=argparse.ArgumentDefaultsHelpFormatter +) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("--caseroot", default=os.getcwd(), + help="Case directory to build") + + parser.add_argument("--no-incomplete-logs", default=False, action="store_true", + help="Whether to archive logs which have been completed or not") + + parser.add_argument("--copy-only", default=False, action="store_true", + help="Copy instead of move the files to be archived") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + return args.caseroot, args.no_incomplete_logs, args.copy_only + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + caseroot, no_incomplete_logs, copy_only = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_st_archive(case, archive_incomplete_logs=not no_incomplete_logs, copy_only=copy_only) + + sys.exit(0 if success else 1) + +############################################################################### + +if __name__ == "__main__": + _main_func(__doc__) diff --git a/userdefined_laptop_template/README.md b/userdefined_laptop_template/README.md new file mode 100644 index 0000000000..1a0e03b663 --- /dev/null +++ b/userdefined_laptop_template/README.md @@ -0,0 +1,131 @@ +Building CIME on an UNSUPPORTED local machine +--------------------------------------------- + +These directions are for a Mac OS X 10.9 or 10.10 laptop using +homebrew or macports to install the required software. The procedure +is similar for a linux workstation or cluster, you will just use +different package management tools to install the third party +libraries. + +Setup +===== + + - install xcode, including the command line tools. Failure to + install the command line tools is the most likely cause if you + get an error about the compilers not being able to create + executables. + + - install third party libraries from homebrew or macports. + + - home brew + + Install science tap : + + brew install gcc --without-multilib cmake mpich hdf5 --enable-fortran netcdf --enable-fortran + + + - macports + + sudo port install mpich +gcc48 hdf5-18 +mpich netcdf-fortran +gcc48 +mpich cmake + + Note: If you see an error while running create_newcase that + indicates perl can't find XML::LibXML, you may need to install + p5-xml-libxml as well. + + + - Some of the shell scripts used by cesm hard code "gmake" instead + of using the GMAKE variable from env_build.xml. To work around + this, you should install gnu make, or simply create a link from + make to gmake in you path. + + mkdir -p ${HOME}/local/bin + ln -s `whereis make` ${HOME}/local/bin/gmake + cat >> ${HOME}/.bashrc < + + + + + + -DFORTRANUNDERSCORE -DNO_R16 + + + -fopenmp + + + /usr/local/bin/gfortran + /usr/bin/cc + /usr/bin/c++ + /usr/local/bin/mpif90 + /usr/local/bin/mpicc + /usr/local/bin/mpicxx + FORTRAN + TRUE + /usr/local + + $(shell $(NETCDF_PATH)/bin/nf-config --flibs) -framework Accelerate + + + + + diff --git a/userdefined_laptop_template/config_machines.xml b/userdefined_laptop_template/config_machines.xml new file mode 100644 index 0000000000..2d1005c5d0 --- /dev/null +++ b/userdefined_laptop_template/config_machines.xml @@ -0,0 +1,33 @@ + + + + + __USEFUL_DESCRIPTION__ + something.matching.your.machine.hostname + Darwin + gnu + mpich + $ENV{HOME}/projects/scratch + $ENV{HOME}/projects/cesm-inputdata + $ENV{HOME}/projects/ptclm-data + $ENV{HOME}/projects/scratch/archive/$CASE + $ENV{HOME}/projects/baselines + $CIMEROOT/tools/cprnc/build/cprnc + 4 + none + __YOUR_NAME_HERE__ + 4 + 4 + + mpiexec_mpt + + -np $TOTALPES + --prepend-rank + + + + + + diff --git a/userdefined_laptop_template/config_pes.xml b/userdefined_laptop_template/config_pes.xml new file mode 100644 index 0000000000..0464137703 --- /dev/null +++ b/userdefined_laptop_template/config_pes.xml @@ -0,0 +1,31 @@ + + + + + + $MAX_TASKS_PER_NODE 1 0 + + + + 1 1 0 + + + + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + + + 2 1 + 2 + + + + From 620d6692f227f5dd7caeab9c21e6392ebb0cad7b Mon Sep 17 00:00:00 2001 From: James Foucar Date: Tue, 7 Nov 2017 16:27:27 -0700 Subject: [PATCH 4/6] Remove hardcoded mail option for PBS These machines should use the standard way to setup mailing options (flags to case.submit) instead of hardcoding it into config_batch. [BFB] --- Depends.babbageKnc | 6 + Depends.bluewaters | 5 + Depends.corip1 | 5 + Depends.cray | 6 + Depends.gnu | 2 + Depends.intel | 40 + Depends.intel14 | 28 + Depends.intelmic | 6 + Depends.intelmic14 | 6 + Depends.mira | 22 + Depends.nag | 4 + Makefile | 858 +++++++ README | 15 + config_batch.xml | 491 ++++ config_compilers.xml | 1113 ++++++++++ config_machines.xml | 1965 +++++++++++++++++ config_pio.xml | 344 +++ mkDepends | 452 ++++ mkSrcfiles | 96 + nag_mpi_argument.txt | 4 + template.case.run | 80 + template.case.test | 75 + template.st_archive | 79 + userdefined_laptop_template/README.md | 131 ++ .../config_compilers.xml | 30 + .../config_machines.xml | 33 + userdefined_laptop_template/config_pes.xml | 31 + 27 files changed, 5927 insertions(+) create mode 100644 Depends.babbageKnc create mode 100755 Depends.bluewaters create mode 100644 Depends.corip1 create mode 100644 Depends.cray create mode 100644 Depends.gnu create mode 100644 Depends.intel create mode 100644 Depends.intel14 create mode 100644 Depends.intelmic create mode 100644 Depends.intelmic14 create mode 100644 Depends.mira create mode 100644 Depends.nag create mode 100644 Makefile create mode 100644 README create mode 100644 config_batch.xml create mode 100644 config_compilers.xml create mode 100644 config_machines.xml create mode 100644 config_pio.xml create mode 100755 mkDepends create mode 100755 mkSrcfiles create mode 100644 nag_mpi_argument.txt create mode 100755 template.case.run create mode 100755 template.case.test create mode 100755 template.st_archive create mode 100644 userdefined_laptop_template/README.md create mode 100644 userdefined_laptop_template/config_compilers.xml create mode 100644 userdefined_laptop_template/config_machines.xml create mode 100644 userdefined_laptop_template/config_pes.xml diff --git a/Depends.babbageKnc b/Depends.babbageKnc new file mode 100644 index 0000000000..f5a6f335cc --- /dev/null +++ b/Depends.babbageKnc @@ -0,0 +1,6 @@ + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< + +quadrature_mod.o: quadrature_mod.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -DIS_ACCELERATOR $< diff --git a/Depends.bluewaters b/Depends.bluewaters new file mode 100755 index 0000000000..e113298e08 --- /dev/null +++ b/Depends.bluewaters @@ -0,0 +1,5 @@ +# + ifeq ($(strip $(COMPILER)),pgi) + progseasalts_intr.o: progseasalts_intr.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -Mnovect $< +endif diff --git a/Depends.corip1 b/Depends.corip1 new file mode 100644 index 0000000000..81be8f3f16 --- /dev/null +++ b/Depends.corip1 @@ -0,0 +1,5 @@ +# Workaround for ICE in intel/2016.0.109 +ifeq (CPRINTEL,$(findstring CPRINTEL, $(FFLAGS))) +RtmMod.o: RtmMod.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) -O1 $< +endif diff --git a/Depends.cray b/Depends.cray new file mode 100644 index 0000000000..b6023391ea --- /dev/null +++ b/Depends.cray @@ -0,0 +1,6 @@ +NOOPTOBJS= ice_boundary.o dyn_comp.o unicon.o + +$(NOOPTOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< + + diff --git a/Depends.gnu b/Depends.gnu new file mode 100644 index 0000000000..2d53247217 --- /dev/null +++ b/Depends.gnu @@ -0,0 +1,2 @@ +geopk.o:geopk.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fcray-pointer $< diff --git a/Depends.intel b/Depends.intel new file mode 100644 index 0000000000..5369c3f714 --- /dev/null +++ b/Depends.intel @@ -0,0 +1,40 @@ +# +PERFOBJS=\ +prim_advection_mod.o \ +edge_mod.o \ +derivative_mod.o \ +bndry_mod.o \ +prim_advance_mod.o + +# CLM's SatellitePhenologyMod is compiled incorrectly with intel 15.0.0 at -O2 +REDUCED_OPT_OBJS=\ +SatellitePhenologyMod.o + +# shr_wv_sat_mod does not need to have better than ~0.1% precision, and benefits +# enormously from a lower precision in the vector functions. +REDUCED_PRECISION_OBJS=\ +shr_wv_sat_mod.o + +SHR_RANDNUM_FORT_OBJS=\ +kissvec_mod.o \ +mersennetwister_mod.o \ +dSFMT_interface.o \ +shr_RandNum_mod.o + +SHR_RANDNUM_C_OBJS=\ +dSFMT.o \ +dSFMT_utils.o \ +kissvec.o + +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -no-prec-div $< + $(REDUCED_OPT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O1 $< + $(REDUCED_PRECISION_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fimf-precision=low -fp-model fast $< + $(SHR_RANDNUM_FORT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -fp-model fast -no-prec-div -no-prec-sqrt -override-limits $< + $(SHR_RANDNUM_C_OBJS): %.o: %.c + $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) -O3 -fp-model fast $< +endif diff --git a/Depends.intel14 b/Depends.intel14 new file mode 100644 index 0000000000..32e4747d7a --- /dev/null +++ b/Depends.intel14 @@ -0,0 +1,28 @@ +# +# 12/03/2012 the intel compiler on yellowstone 12.1.5 20120612 +# does not converge the pH computation without the -CU flag +# root cause has not been determined. JPE +# this problem is resolved in intel 13.0.1 +#ecosys_mod.o: ecosys_mod.F90 +# $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -CU $< + + + +PERFOBJS=\ +prim_advection_mod_base.o \ +vertremap_mod_base.o \ +edge_mod_base.o \ +derivative_mod_base.o \ +bndry_mod_base.o \ +prim_advance_mod.o \ +uwshcu.o \ +wetdep.o + +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -no-prec-div $< + $(REDUCED_OPT_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O1 $< + $(REDUCED_PRECISION_OBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fimf-precision=low -fp-model fast $< +endif diff --git a/Depends.intelmic b/Depends.intelmic new file mode 100644 index 0000000000..6f05aee44a --- /dev/null +++ b/Depends.intelmic @@ -0,0 +1,6 @@ + +#derivative_mod_base.o: derivative_mod_base.F90 +# $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) -O1 $< + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< diff --git a/Depends.intelmic14 b/Depends.intelmic14 new file mode 100644 index 0000000000..6f05aee44a --- /dev/null +++ b/Depends.intelmic14 @@ -0,0 +1,6 @@ + +#derivative_mod_base.o: derivative_mod_base.F90 +# $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) -O1 $< + +shr_ncread_mod.o: shr_ncread_mod.F90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< diff --git a/Depends.mira b/Depends.mira new file mode 100644 index 0000000000..c786f6248a --- /dev/null +++ b/Depends.mira @@ -0,0 +1,22 @@ +# These routines have problems with stacksize when omp is invoked add -qsmallstack to resolve +SSOBJS = shr_reprosum_mod.o mo_sethet.o mo_drydep.o + +$(SSOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -qsmallstack $< + +time_management.o: time_management.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -qsmp=noauto:noomp $< + +# These routines benefit from -qnostrict without violating the bfb test +PERFOBJS=\ +prim_advection_mod.o \ +edge_mod.o \ +derivative_mod.o \ +bndry_mod.o \ +prim_advance_mod.o \ +uwshcu.o \ +wetdep.o +ifeq ($(DEBUG),FALSE) + $(PERFOBJS): %.o: %.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -O3 -qnostrict $< +endif diff --git a/Depends.nag b/Depends.nag new file mode 100644 index 0000000000..d7e4894aa1 --- /dev/null +++ b/Depends.nag @@ -0,0 +1,4 @@ +wrap_mpi.o: wrap_mpi.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< +fft99.o: fft99.F90 + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS_NOOPT) $(FREEFLAGS) $< diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..1b0e4defed --- /dev/null +++ b/Makefile @@ -0,0 +1,858 @@ +#=============================================================================== +# +# Common Makefile: a framework for building all CIME components and more +# +#=============================================================================== + +# Set up special characters +null := +comma := , + +# Load dependency search path. +dirs := . +dirs += $(shell cat Filepath) + +cpp_dirs := $(dirs) +# Add INCROOT to path for Depends and Include +MINCROOT := +ifdef INCROOT + cpp_dirs += $(INCROOT) + MINCROOT := $(INCROOT) +endif + +# Expand any tildes in directory names. Change spaces to colons. +VPATH := $(foreach dir,$(cpp_dirs),$(wildcard $(dir))) +VPATH := $(subst $(space),:,$(VPATH)) + +RM := rm +CP := cp + +exec_se: $(EXEC_SE) Depends +complib: $(COMPLIB) Depends + +# Determine whether to compile threaded or not +# Set the THREADDIR for the shared build +# based on the threaded build status +compile_threaded = false +ifeq ($(strip $(SMP)),TRUE) + compile_threaded = true + THREADDIR = threads +else + ifeq ($(strip $(BUILD_THREADED)),TRUE) + compile_threaded = true + THREADDIR = threads + else + THREADDIR = nothreads + endif +endif + +# set the debug directory based on the debug status +ifeq ($(strip $(DEBUG)),TRUE) + DEBUGDIR = debug +else + DEBUGDIR = nodebug +endif + +ifeq ($(strip $(USE_ESMF_LIB)), TRUE) + ESMFDIR = esmf +else + ESMFDIR = noesmf +endif + +# Determine whether any C++ code will be included in the build; +# currently, C++ code is included if and only if we're linking to the +# trilinos library. +ifeq ($(strip $(USE_TRILINOS)), TRUE) + USE_CXX = true +else + USE_CXX = false +endif + +ifndef MOD_SUFFIX + MOD_SUFFIX := mod +endif + +#=============================================================================== +# set CPP options (must use this before any flags or cflags settings) +#=============================================================================== + +CPPDEFS := $(USER_CPPDEFS) + +# Unless DEBUG mode is enabled, use NDEBUG to turn off assert statements. +ifneq ($(strip $(DEBUG)),TRUE) + CPPDEFS += -DNDEBUG +endif + +# USE_ESMF_LIB is currently only defined in env_build.xml +ifeq ($(USE_ESMF_LIB), TRUE) + CPPDEFS += -DUSE_ESMF_LIB +endif + +ifeq ($(strip $(MPILIB)),mpi-serial) + CPPDEFS += -DNO_MPI2 +else + CPPDEFS += -DHAVE_MPI +endif +ifeq ($(compile_threaded), true) + CPPDEFS += -DTHREADED_OMP +endif + +ifeq (,$(EXEROOT)) + EXEROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) EXEROOT --value) +endif +ifeq (,$(BUILD_THREADED)) + BUILD_THREADED = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) BUILD_THREADED --value) +endif + +ifeq (,$(LIBROOT)) + LIBROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) LIBROOT --value) +endif +ifeq (,$(SHAREDLIBROOT)) + SHAREDLIBROOT = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) SHAREDLIBROOT --value) +endif +ifeq (,$(COMPILER)) + COMPILER = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) COMPILER --value) +endif +ifeq (,$(NINST_VALUE)) + NINST_VALUE = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) NINST_VALUE --value) +endif +ifeq (,$(MPILIB)) + MPILIB = $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) MPILIB --value) +endif +ifeq ($(strip $(PIO_VERSION)),1) + CPPDEFS += -DPIO1 +endif + + + +ifeq (,$(SHAREDPATH)) + SHAREDPATH = $(COMPILER)/$(MPILIB)/$(DEBUGDIR)/$(THREADDIR) +endif +INSTALL_SHAREDPATH = $(EXEROOT)/$(SHAREDPATH) + +include $(CASEROOT)/Macros.make +# Decide whether to use a C++ or Fortran linker, based on whether we +# are using any C++ code and the compiler-dependent CXX_LINKER variable +ifeq ($(USE_CXX), true) + # The following is essentially an "if... elseif... else", but gmake + # 3.80 and earlier doesn't support elseif + ifeq ($(CXX_LINKER), CXX) + LD := $(MPICXX) + endif + ifeq ($(CXX_LINKER), FORTRAN) + LD := $(MPIFC) + endif +endif +# Use this if LD has not already been defined. +ifeq ($(origin LD), default) + ifeq ($(strip $(MPILIB)),mpi-serial) + LD := $(SFC) + else + LD := $(MPIFC) + endif +endif + + + +ifeq ($(USE_CXX), true) + ifeq ($(SUPPORTS_CXX), FALSE) + $(error Fatal attempt to include C++ code on a compiler/machine combo that has not been set up to support C++) + endif +endif + +# Not clear how to escape commas for libraries with their own configure +# script, and they don't need this defined anyway, so leave this out of +# FPPDEFS. +ifeq ($(HAS_F2008_CONTIGUOUS),TRUE) + CONTIGUOUS_FLAG := -DUSE_CONTIGUOUS=contiguous, +else + CONTIGUOUS_FLAG := -DUSE_CONTIGUOUS= +endif + +ifdef CPRE + CONTIGUOUS_FLAG := $(subst $(comma),\\$(comma),$(CONTIGUOUS_FLAG)) + CONTIGUOUS_FLAG := $(patsubst -D%,$(CPRE)%,$(CONTIGUOUS_FLAG)) +endif + +ifndef AR + AR := ar +endif + +ifdef NETCDF_C_PATH + ifndef NETCDF_FORTRAN_PATH + $(error "NETCDF_C_PATH specified without NETCDF_FORTRAN_PATH") + endif + NETCDF_SEPARATE:=true + ifndef INC_NETCDF_C + INC_NETCDF_C:=$(NETCDF_C_PATH)/include + endif + ifndef INC_NETCDF_FORTRAN + INC_NETCDF_FORTRAN:=$(NETCDF_FORTRAN_PATH)/include + endif + ifndef LIB_NETCDF_C + LIB_NETCDF_C:=$(NETCDF_C_PATH)/lib + endif + ifndef LIB_NETCDF_FORTRAN + LIB_NETCDF_FORTRAN:=$(NETCDF_C_PATH)/lib + endif + else ifdef NETCDF_FORTRAN_PATH + $(error "NETCDF_FORTRAN_PATH specified without NETCDF_C_PATH") + else ifdef NETCDF_PATH + NETCDF_SEPARATE:=false + ifndef INC_NETCDF + INC_NETCDF:=$(NETCDF_PATH)/include + endif + ifndef LIB_NETCDF + LIB_NETCDF:=$(NETCDF_PATH)/lib + endif +else + # No Netcdf is an error unless target is clean or DEP + ifneq ($(MAKECMDGOALS), db_files) + ifneq ($(MAKECMDGOALS), db_flags) + ifeq (,$(findstring clean,$(MAKECMDGOALS))) + $(error NETCDF not found: Define NETCDF_PATH or NETCDF_C_PATH and NETCDF_FORTRAN_PATH in config_machines.xml or config_compilers.xml) + endif + endif + endif +endif + + +ifeq ($(MPILIB),mpi-serial) + ifdef PNETCDF_PATH + undefine PNETCDF_PATH + endif +else + ifdef PNETCDF_PATH + ifndef $(INC_PNETCDF) + INC_PNETCDF:=$(PNETCDF_PATH)/include + endif + ifndef LIB_PNETCDF + LIB_PNETCDF:=$(PNETCDF_PATH)/lib + endif + endif +endif +ifeq ($(strip $(USE_TRILINOS)), TRUE) + ifdef TRILINOS_PATH + ifndef INC_TRILINOS + INC_TRILINOS:=$(TRILINOS_PATH)/include + endif + ifndef LIB_TRILINOS + LIB_TRILINOS:=$(TRILINOS_PATH)/lib + endif + else + $(error TRILINOS_PATH must be defined when USE_TRILINOS is TRUE) + endif + + # get a bunch of variables related to this trilinos installation; + # these variables begin with "Trilinos_" + include $(INC_TRILINOS)/Makefile.export.Trilinos +endif + + +# Set HAVE_SLASHPROC on LINUX systems which are not bluegene or Darwin (OSx) + +ifeq ($(findstring -DLINUX,$(CPPDEFS)),-DLINUX) + ifneq ($(findstring DBG,$(CPPDEFS)),DBG) + ifneq ($(findstring Darwin,$(CPPDEFS)),Darwin) + CPPDEFS += -DHAVE_SLASHPROC + endif + endif +endif + +ifdef CPRE + FPPDEFS := $(subst $(comma),\\$(comma),$(CPPDEFS)) + FPPDEFS := $(patsubst -D%,$(CPRE)%,$(FPPDEFS)) +else + FPPDEFS := $(CPPDEFS) +endif + + +#=============================================================================== +# Set config args for pio and mct to blank and then enable serial +#=============================================================================== +ifndef CONFIG_ARGS + CONFIG_ARGS := +endif + +ifeq ($(findstring pio,$(MODEL)),pio) + CONFIG_ARGS+= --enable-timing + ifeq ($DEBUG,TRUE) + CONFIG_ARGS+= --enable-debug + endif +endif + +#=============================================================================== +# User-specified INCLDIR +#=============================================================================== + +INCLDIR := -I. +ifdef USER_INCLDIR + INCLDIR += $(USER_INCLDIR) +endif + +#=============================================================================== +# MPI-serial library (part of MCT) +#=============================================================================== + +ifeq ($(strip $(MPILIB)), mpi-serial) + CC := $(SCC) + FC := $(SFC) + CXX := $(SCXX) + MPIFC := $(SFC) + MPICC := $(SCC) + MPICXX := $(SCXX) + CONFIG_ARGS += MCT_PATH=$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial +else + CC := $(MPICC) + FC := $(MPIFC) + CXX := $(MPICXX) + ifdef MPI_PATH + INC_MPI := $(MPI_PATH)/include + LIB_MPI := $(MPI_PATH)/lib + endif +endif +CSM_SHR_INCLUDE:=$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/include +# This is needed so that dependancies are found +VPATH+=$(CSM_SHR_INCLUDE) +#=============================================================================== +# Set include paths (needed after override for any model specific builds below) +#=============================================================================== +INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CSM_SHR_INCLUDE) + +ifeq ($(NETCDF_SEPARATE), false) + INCLDIR += -I$(INC_NETCDF) +else ifeq ($(NETCDF_SEPARATE), true) + INCLDIR += -I$(INC_NETCDF_C) -I$(INC_NETCDF_FORTRAN) +endif +ifdef MOD_NETCDF + INCLDIR += -I$(MOD_NETCDF) +endif +ifdef INC_MPI + INCLDIR += -I$(INC_MPI) +endif +ifdef INC_PNETCDF + INCLDIR += -I$(INC_PNETCDF) +endif +ifdef INC_TRILINOS + INCLDIR += -I$(INC_TRILINOS) +endif + +ifndef MCT_LIBDIR + MCT_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef PIO_LIBDIR + PIO_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef GPTL_LIBDIR + GPTL_LIBDIR=$(INSTALL_SHAREDPATH)/lib +endif + +ifndef GLC_DIR + GLC_DIR=$(EXEROOT)/glc +endif +ifndef CISM_LIBDIR + CISM_LIBDIR=$(GLC_DIR)/lib +endif + +INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CIMEROOT)/src/share/util \ + -I$(CIMEROOT)/src/share/include -I$(CIMEROOT)/src/share/RandNum/include + +ifeq ($(MODEL),driver) + INCLDIR += -I$(EXEROOT)/atm/obj -I$(EXEROOT)/ice/obj -I$(EXEROOT)/ocn/obj -I$(EXEROOT)/glc/obj -I$(EXEROOT)/rof/obj -I$(EXEROOT)/wav/obj -I$(EXEROOT)/esp/obj +# nagfor and gcc have incompatible LDFLAGS. +# nagfor requires the weird "-Wl,-Wl,," syntax. +# If done in config_compilers.xml, we break MCT. + ifeq ($(strip $(COMPILER)),nag) + ifeq ($(NETCDF_SEPARATE), false) + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_PATH)/lib + else ifeq ($(NETCDF_SEPARATE), true) + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_C_PATH)/lib + SLIBS += -Wl,-Wl,,-rpath=$(NETCDF_FORTRAN_PATH)/lib + endif + endif +else + ifeq ($(strip $(COMPILER)),nag) + ifeq ($(DEBUG), TRUE) + ifeq ($(strip $(MACH)),hobart) + # GCC needs to be able to link to + # nagfor runtime to get autoconf + # tests to work. + CFLAGS += -Wl,--as-needed,--allow-shlib-undefined + SLIBS += -L$(COMPILER_PATH)/lib/NAG_Fortran -lf60rts + endif + endif + endif +endif + +# +# Use the MCT dir for the cache for all configure calls because it is the first one +# +CFLAGS+=$(CPPDEFS) +CXXFLAGS := $(CFLAGS) + +CONFIG_ARGS += CC="$(CC)" FC="$(FC)" MPICC="$(MPICC)" \ + MPIFC="$(MPIFC)" FCFLAGS="$(FFLAGS) $(FREEFLAGS) $(INCLDIR)" \ + CPPDEFS="$(CPPDEFS)" CFLAGS="$(CFLAGS) -I.. $(INCLDIR)" LDFLAGS="$(LDFLAGS)" + +ifeq ($(NETCDF_SEPARATE), false) + CONFIG_ARGS += NETCDF_PATH=$(NETCDF_PATH) +else ifeq ($(NETCDF_SEPARATE), true) + # The mct library needs the NetCDF_C library + CONFIG_ARGS += NETCDF_PATH=$(NETCDF_C_PATH) +endif + +ifeq ($(COMPILER),nag) + CONFIG_ARGS += LIBS="$(SLIBS)" +endif + +FFLAGS += $(FPPDEFS) +FFLAGS_NOOPT += $(FPPDEFS) + + +ifeq ($(findstring -cosp,$(CAM_CONFIG_OPTS)),-cosp) + # The following is for the COSP simulator code: + COSP_LIBDIR:=$(abspath $(EXEROOT)/atm/obj/cosp) +endif + +ifeq ($(MODEL),cam) + # These RRTMG files take an extraordinarily long time to compile with optimization. + # Until mods are made to read the data from files, just remove optimization from + # their compilation. +rrtmg_lw_k_g.o: rrtmg_lw_k_g.f90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< +rrtmg_sw_k_g.o: rrtmg_sw_k_g.f90 + $(FC) -c $(FPPFLAGS) $(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS_NOOPT) $< + + +ifdef COSP_LIBDIR +INCLDIR+=-I$(COSP_LIBDIR) -I$(COSP_LIBDIR)/../ -I../$(INSTALL_SHAREDPATH)/include -I../$(CSM_SHR_INCLUDE) +$(COSP_LIBDIR)/libcosp.a: cam_abortutils.o + $(MAKE) -C $(COSP_LIBDIR) F90='$(FC)' F90FLAGS='$(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS) $(FC_AUTO_R8)' \ + F90FLAGS_noauto='$(INCLDIR) $(INCS) $(FREEFLAGS) $(FFLAGS)' \ + F90FLAGS_fixed='$(INCLDIR) $(INCS) $(FIXEDFLAGS) $(FFLAGS) $(FC_AUTO_R8)' + +cospsimulator_intr.o: $(COSP_LIBDIR)/libcosp.a +endif + +endif + +# Set esmf.mk location with ESMF_LIBDIR having precedent over ESMFMKFILE +CCSM_ESMFMKFILE := undefined_CCSM_ESMFMKFILE +ifdef ESMFMKFILE + CCSM_ESMFMKFILE := $(ESMFMKFILE) +endif +ifdef ESMF_LIBDIR + CCSM_ESMFMKFILE := $(ESMF_LIBDIR)/esmf.mk +endif + + +# System libraries (netcdf, mpi, pnetcdf, esmf, trilinos, etc.) + +ifeq ($(NETCDF_SEPARATE), false) + SLIBS += -L$(LIB_NETCDF) -lnetcdff -lnetcdf +else ifeq ($(NETCDF_SEPARATE), true) + SLIBS += -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf +endif + +ifdef LIB_PNETCDF + SLIBS += -L$(LIB_PNETCDF) -lpnetcdf +endif +ifdef LAPACK_LIBDIR + SLIBS += -L$(LAPACK_LIBDIR) -llapack -lblas +endif +ifdef LIB_MPI + ifndef MPI_LIB_NAME + SLIBS += -L$(LIB_MPI) -lmpi + else + SLIBS += -L$(LIB_MPI) -l$(MPI_LIB_NAME) + endif +endif + +# For compiling and linking with external ESMF. +# If linking to external ESMF library then include esmf.mk +# ESMF_F90COMPILEPATHS +# ESMF_F90LINKPATHS +# ESMF_F90LINKRPATHS +# ESMF_F90ESMFLINKLIBS +ifeq ($(USE_ESMF_LIB), TRUE) + -include $(CCSM_ESMFMKFILE) + FFLAGS += $(ESMF_F90COMPILEPATHS) + SLIBS += $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) $(ESMF_F90ESMFLINKLIBS) +endif + +# Add trilinos libraries; too be safe, we include all libraries included in the trilinos build, +# as well as all necessary third-party libraries +ifeq ($(strip $(USE_TRILINOS)), TRUE) + SLIBS += -L$(LIB_TRILINOS) $(Trilinos_LIBRARIES) $(Trilinos_TPL_LIBRARY_DIRS) $(Trilinos_TPL_LIBRARIES) +endif + +# Add libraries and flags that we need on the link line when C++ code is included +# We need to do these additions after CONFIG_ARGS is set, because they can sometimes break configure for mct, etc., +# if they are added to LDFLAGS in CONFIG_ARGS. +ifeq ($(USE_CXX), true) + ifdef CXX_LIBS + SLIBS += $(CXX_LIBS) + endif + + ifdef CXX_LDFLAGS + LDFLAGS += $(CXX_LDFLAGS) + endif +endif + +# Machine stuff to appear last on the link step +ifndef MLIBS + MLIBS := +endif + +#------------------------------------------------------------------------------ +# Drive configure scripts for support libraries (mct) +#------------------------------------------------------------------------------ + +$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/Makefile.conf: + @echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \ + $(CONFIG_SHELL) $(CIMEROOT)/src/externals/mct/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/src/externals/mct + +$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial/Makefile.conf: + @echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \ + $(CONFIG_SHELL) $(CIMEROOT)/src/externals/mct/mpi-serial/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/src/externals/mct/mpi-serial + +ifeq ($(PIO_VERSION),2) +# This is a pio2 library + PIOLIB = $(PIO_LIBDIR)/libpiof.a $(PIO_LIBDIR)/libpioc.a + PIOLIBNAME = -lpiof -lpioc + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio2 +else +# This is a pio1 library + PIOLIB = $(PIO_LIBDIR)/libpio.a + PIOLIBNAME = -lpio + ifneq ("$(wildcard $(CIMEROOT)/src/externals/pio1/pio)", "") + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio1 + else + PIO_SRC_DIR = $(CIMEROOT)/src/externals/pio1/pio + endif +endif + +MCTLIBS = $(MCT_LIBDIR)/libmct.a $(MCT_LIBDIR)/libmpeu.a + +GPTLLIB = $(GPTL_LIBDIR)/libgptl.a + +ULIBS += -L$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/lib -lcsm_share -L$(INSTALL_SHAREDPATH)/lib $(PIOLIBNAME) -lgptl -lmct -lmpeu + +#------------------------------------------------------------------------------ +# Drive cmake script for cism and pio +#------------------------------------------------------------------------------ + +ifndef CMAKE_OPTS + CMAKE_OPTS := +endif +# note that the fortran flags include neither the FREEFLAGS nor the +# FIXEDFLAGS, so that both free & fixed code can be built (cmake +# doesn't seem to be able to differentiate between free & fixed +# fortran flags) +CMAKE_OPTS += -D CMAKE_Fortran_FLAGS:STRING="$(FFLAGS) $(INCLDIR)" \ + -D CMAKE_C_FLAGS:STRING="$(CFLAGS) $(INCLDIR)" \ + -D CMAKE_CXX_FLAGS:STRING="$(CXXFLAGS) $(INCLDIR)" \ + -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -D GPTL_PATH:STRING=$(INSTALL_SHAREDPATH) \ + -D PIO_ENABLE_TESTS:BOOL=OFF \ + -D USER_CMAKE_MODULE_PATH:LIST="$(CIMEROOT)/src/CMake;$(CIMEROOT)/src/externals/pio2/cmake" \ + +# Allow for separate installations of the NetCDF C and Fortran libraries +ifeq ($(NETCDF_SEPARATE), false) + CMAKE_OPTS += -D NetCDF_PATH:PATH=$(NETCDF_PATH) +else ifeq ($(NETCDF_SEPARATE), true) + CMAKE_OPTS += -D NetCDF_C_PATH:PATH=$(NETCDF_C_PATH) \ + -D NetCDF_Fortran_DIR:PATH=$(NETCDF_FORTRAN_PATH) +endif + +ifdef PNETCDF_PATH + CMAKE_OPTS += -D PnetCDF_PATH:STRING="$(PNETCDF_PATH)" +else + CMAKE_OPTS += -D WITH_PNETCDF:LOGICAL=FALSE -D PIO_USE_MPIIO:LOGICAL=FALSE +endif + +# NAG doesn't get along too nicely with PnetCDF Fortran interfaces. +ifeq ($(COMPILER),nag) + ifeq ($(PIO_VERSION),1) + CMAKE_OPTS += -D WITH_PNETCDF:LOGICAL=FALSE -D PIO_USE_MPIIO:LOGICAL=FALSE + endif +endif + +ifdef PIO_FILESYSTEM_HINTS + CMAKE_OPTS += -D PIO_FILESYSTEM_HINTS:STRING="$(PIO_FILESYSTEM_HINTS)" +endif + +# This captures the many cism-specific options to cmake +CMAKE_OPTS += $(USER_CMAKE_OPTS) + +# CMake doesn't seem to like it when you define compilers via -D +# CMAKE_C_COMPILER, etc., when you rerun cmake with an existing +# cache. So doing this via environment variables instead. +ifndef CMAKE_ENV_VARS + CMAKE_ENV_VARS := +endif +CMAKE_ENV_VARS += CC=$(CC) \ + CXX=$(CXX) \ + FC=$(FC) \ + LDFLAGS="$(LDFLAGS)" + + +# We declare $(GLC_DIR)/Makefile to be a phony target so that cmake is +# always rerun whenever invoking 'make $(GLC_DIR)/Makefile'; this is +# desirable to pick up any new source files that may have been added +.PHONY: $(GLC_DIR)/Makefile +$(GLC_DIR)/Makefile: + cd $(GLC_DIR); \ + $(CMAKE_ENV_VARS) cmake $(CMAKE_OPTS) $(CIMEROOT)/../components/cism/glimmer-cism + +$(PIO_LIBDIR)/Makefile: + cd $(PIO_LIBDIR); \ + $(CMAKE_ENV_VARS) cmake $(CMAKE_OPTS) $(PIO_SRC_DIR) + +#------------------------------------------------------------------------------- +# Build & include dependency files +#------------------------------------------------------------------------------- + +touch_filepath: + touch Filepath + +# Get list of files and build dependency file for all .o files +# using perl scripts mkSrcfiles and mkDepends +# if a source is of form .F90.in strip the .in before creating the list of objects +SOURCES := $(shell cat Srcfiles) +BASENAMES := $(basename $(basename $(SOURCES))) +OBJS := $(addsuffix .o, $(BASENAMES)) +INCS := $(foreach dir,$(cpp_dirs),-I$(dir)) + +CASETOOLS := $(CASEROOT)/Tools + +Depends: Srcfiles Deppath + $(CASETOOLS)/mkDepends $(USER_MKDEPENDS_OPTS) Deppath Srcfiles > $@ + +Deppath: Filepath + $(CP) -f Filepath $@ + @echo "$(MINCROOT)" >> $@ + +Srcfiles: Filepath + $(CASETOOLS)/mkSrcfiles + +Filepath: + @echo "$(VPATH)" > $@ + + +#------------------------------------------------------------------------------- +# echo file names, paths, compile flags, etc. used during build +#------------------------------------------------------------------------------- + +db_files: + @echo " " + @echo "* MACFILE := $(MACFILE)" + @echo "* VPATH := $(VPATH)" + @echo "* INCS := $(INCS)" + @echo "* OBJS := $(OBJS)" +db_flags: + @echo " " + @echo "* cc := $(CC) $(CFLAGS) $(INCS) $(INCLDIR)" + @echo "* .F.o := $(FC) $(FFLAGS) $(FIXEDFLAGS) $(INCS) $(INCLDIR)" + @echo "* .F90.o := $(FC) $(FFLAGS) $(FREEFLAGS) $(INCS) $(INCLDIR)" + ifeq ($(USE_CXX), true) + @echo "* .cpp.o := $(CXX) $(CXXFLAGS) $(INCS) $(INCLDIR)" + endif + +#------------------------------------------------------------------------------- +# Rules used for the tests run by "configure -test" +#------------------------------------------------------------------------------- + +test_fc: test_fc.o + $(LD) -o $@ test_fc.o $(LDFLAGS) +ifeq ($(NETCDF_SEPARATE), false) +test_nc: test_nc.o + $(LD) -o $@ test_nc.o -L$(LIB_NETCDF) -lnetcdff -lnetcdf $(LDFLAGS) +else ifeq ($(NETCDF_SEPARATE), true) +test_nc: test_nc.o + $(LD) -o $@ test_nc.o -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf $(LDFLAGS) +endif +test_mpi: test_mpi.o + $(LD) -o $@ test_mpi.o $(LDFLAGS) +test_esmf: test_esmf.o + $(LD) -o $@ test_esmf.o $(LDFLAGS) + +#------------------------------------------------------------------------------- +# create list of component libraries +#------------------------------------------------------------------------------ +CLMVER = $(filter $(CLM_CONFIG_OPTS), clm5_0 clm4_5) +ifeq ($(CLMVER),$(null)) + LNDOBJDIR = $(EXEROOT)/lnd/obj + LNDLIBDIR=$(LIBROOT) + LNDLIB := liblnd.a + INCLDIR += -I$(LNDOBJDIR) +else + LNDOBJDIR = $(SHAREDLIBROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/clm/obj + LNDLIBDIR = $(EXEROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/lib + LNDLIB := libclm.a + INCLDIR += -I$(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/include + ifeq ($(MODEL),clm) + INCLUDE_DIR = $(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/include + endif +endif + + +ifeq ($(ULIBDEP),$(null)) + ifneq ($(LIBROOT),$(null)) + ULIBDEP += $(LIBROOT)/libatm.a + ULIBDEP += $(LIBROOT)/libice.a + ULIBDEP += $(LNDLIBDIR)/$(LNDLIB) + ULIBDEP += $(LIBROOT)/libocn.a + ULIBDEP += $(LIBROOT)/librof.a + ULIBDEP += $(LIBROOT)/libglc.a + ULIBDEP += $(LIBROOT)/libwav.a + ULIBDEP += $(LIBROOT)/libesp.a + ifeq ($(COMP_GLC), cism) + ULIBDEP += $(CISM_LIBDIR)/libglimmercismfortran.a + ifeq ($(CISM_USE_TRILINOS), TRUE) + ULIBDEP += $(CISM_LIBDIR)/libglimmercismcpp.a + endif + endif + ifeq ($(OCN_SUBMODEL),moby) + ULIBDEP += $(LIBROOT)/libmoby.a + endif + endif +endif + +ifdef COSP_LIBDIR + ULIBDEP += $(COSP_LIBDIR)/libcosp.a +endif + + +ifndef CLIBS + ifdef ULIBDEP + # For each occurrence of something like /path/../foo/libbar.a in ULIBDEP, + # CLIBS will contain -L/path/../foo -lbar + CLIBS := $(foreach LIBDEP,$(strip $(ULIBDEP)), -L$(dir $(LIBDEP)) $(patsubst lib%.a,-l%,$(notdir $(LIBDEP)))) + endif +endif + +# libcsm_share.a is in ULIBDEP, but -lcsm_share is in ULIBS rather than CLIBS, +# so this needs to be added after creating CLIBS above +CSMSHARELIB = $(INSTALL_SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/lib/libcsm_share.a +ULIBDEP += $(CSMSHARELIB) + +#------------------------------------------------------------------------------- +# build rules: +#------------------------------------------------------------------------------- + +.SUFFIXES: +.SUFFIXES: .F90 .F .f90 .f .c .cpp .o .in + +ifeq ($(MPILIB),mpi-serial) + MPISERIAL = $(INSTALL_SHAREDPATH)/lib/libmpi-serial.a + MLIBS += $(MPISERIAL) + CMAKE_OPTS += -DMPI_C_INCLUDE_PATH=$(INSTALL_SHAREDPATH)/include \ + -DMPI_Fortran_INCLUDE_PATH=$(INSTALL_SHAREDPATH)/include \ + -DMPI_C_LIBRARIES=$(INSTALL_SHAREDPATH)/lib/libmpi-serial.a \ + -DMPI_Fortran_LIBRARIES=$(INSTALL_SHAREDPATH)/lib/libmpi-serial.a +endif + +$(MCTLIBS) : $(MPISERIAL) + +$(PIOLIB) : $(MPISERIAL) $(GPTLLIB) + +$(CSMSHARELIB): $(MCTLIBS) $(PIOLIB) $(GPTLLIB) +ifneq ($(MODEL),csm_share) + $(OBJS): $(CSMSHARELIB) +endif + +$(EXEC_SE): $(OBJS) $(ULIBDEP) $(CSMSHARELIB) $(MCTLIBS) $(PIOLIB) $(GPTLLIB) + $(LD) -o $(EXEC_SE) $(OBJS) $(CLIBS) $(ULIBS) $(SLIBS) $(MLIBS) $(LDFLAGS) + +ifdef INCLUDE_DIR + $(COMPLIB): $(OBJS) + $(AR) -r $(COMPLIB) $(OBJS) + $(CP) *.$(MOD_SUFFIX) *.h $(INCLUDE_DIR) +else + $(COMPLIB): $(OBJS) + $(AR) -r $(COMPLIB) $(OBJS) +endif + +.c.o: + $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) $< +.F.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FIXEDFLAGS) $< +.f.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FIXEDFLAGS) $< +.f90.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $< +.F90.o: + $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) $< + +.cpp.o: + $(CXX) -c $(INCLDIR) $(INCS) $(CXXFLAGS) $< + +%.F90: %.F90.in + $(CIMEROOT)/src/externals/genf90/genf90.pl $< > $@ + +cleanatm: + $(RM) -f $(LIBROOT)/libatm.a + $(RM) -fr $(EXEROOT)/atm/obj + +cleancpl: + $(RM) -fr $(EXEROOT)/cpl/obj + +cleanocn: + $(RM) -f $(LIBROOT)/libocn.a + $(RM) -fr $(EXEROOT)/ocn/obj + +cleanwav: + $(RM) -f $(LIBROOT)/libwav.a + $(RM) -fr $(EXEROOT)/wav/obj + +cleanglc: + $(RM) -f $(LIBROOT)/libglc.a + $(RM) -fr $(EXEROOT)/glc + +cleanesp: + $(RM) -f $(LIBROOT)/libesp.a + $(RM) -fr $(EXEROOT)/esp/obj + +cleanice: + $(RM) -f $(LIBROOT)/libice.a + $(RM) -fr $(EXEROOT)/ice/obj + +cleanrof: + $(RM) -f $(LIBROOT)/librof.a + $(RM) -fr $(EXEROOT)/rof/obj + +cleanlnd: + $(RM) -f $(LNDLIBDIR)/$(LNDLIB) + $(RM) -fr $(LNDOBJDIR) + +cleancsmshare: + $(RM) -f $(CSMSHARELIB) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/$(NINST_VALUE)/csm_share + +cleanpio: + $(RM) -f $(PIO_LIBDIR)/libpio* + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/pio + +cleanmct: + $(RM) -f $(MCTLIBS) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/mct + +cleangptl: + $(RM) -f $(GPTLLIB) + $(RM) -fr $(SHAREDLIBROOT)/$(SHAREDPATH)/gptl + +clean: cleanatm cleanocn cleanwav cleanglc cleanesp cleanice cleanrof cleanlnd + +realclean: clean cleancsmshare cleanpio cleanmct cleangptl + +# the if-tests prevent DEPS files from being created when they're not needed +ifneq ($(MAKECMDGOALS), db_files) +ifneq ($(MAKECMDGOALS), db_flags) +ifeq (,$(findstring clean,$(MAKECMDGOALS))) + -include Depends $(CASEROOT)/Depends.$(COMPILER) $(CASEROOT)/Depends.$(MACH) +endif +endif +endif diff --git a/README b/README new file mode 100644 index 0000000000..3bafbe274e --- /dev/null +++ b/README @@ -0,0 +1,15 @@ +config_pes_pop.xml +current assumptions: + prognostic: pop, cice + data: datm, drof + stub: slnd, sglc +DATM.+XLND.+CICE.+POP.+DROF.+SGLC +The current attributes that are supported are + lcompset_matchN= (where N can be any number) + pecount=[S,M,L,XL] + +Please refer to the documentation in the config_machines.xml and config_compilers.xml files. + + + + diff --git a/config_batch.xml b/config_batch.xml new file mode 100644 index 0000000000..1bce3dea66 --- /dev/null +++ b/config_batch.xml @@ -0,0 +1,491 @@ + + + + + + + + + + + + + + + + + + + + + + + + + qstat + qsub + qdel + -v + + (\d+) + --dependencies + %H:%M:%s + -M + + + + + + + + + + + + + + + qstat + qsub + qdel + -v + #COBALT + (\d+) + --dependencies + -M + + + + + + + + + + + + + bjobs + bsub + bkill + < + #BSUB + <(\d+)> + -w 'done(jobid)' + %H:%M + -u + + + + + + + + + -n {{ total_tasks }} + -R "span[ptile={{ tasks_per_node }}]" + -N + -a {{ poe }} + -o {{ job_id }}.%J + -e {{ job_id }}.%J + -J {{ job_id }} + + + + + qstat + qsub + qdel + -v + #PBS + ^(\S+)$ + -W depend=afterok:jobid + %H:%M:%S + -M + -m + , bea, b, e, a + + + + + + + -N {{ job_id }} + -r {{ rerunnable }} + + -j oe + -V + + + + + squeue + scancel + #SBATCH + (\d+)$ + --dependency=afterok:jobid + %H:%M:%S + --mail-user + --mail-type + none, all, begin, end, fail + + + + + + + --job-name={{ job_id }} + --nodes={{ num_nodes }} + --ntasks-per-node={{ tasks_per_node }} + --output={{ job_id }} + --exclusive + + + + + + + -S {{ shell }} + + + + + + + -S {{ shell }} + + + + + + + -S {{ shell }} + + + batch + + + + + + + -l nodes={{ num_nodes }}:ppn={{ tasks_per_node }}:xe + -S {{ shell }} + + + regular + debug + + + + + + + -S {{ shell }} + + + + + + ^(\d+) + + -A $PROJECT + -l mppwidth={{ mppwidth }} + -l nodes={{ num_nodes }} + -S {{ shell }} + + + + + + + -S {{ shell }} + + + + + + + -A cpo + -l {{ partition }} + -l size={{ mppsize }} + -E + -d $RUNDIR + -o $RUNDIR/$CASE.out + -S /bin/bash + + + debug + batch + + + + + + + -l nodes={{ num_nodes }}:ppn={{ tasks_per_node }} + -S {{ shell }} + + + short + medium + long + overnight + monster + + + + + + sbatch + #MSUB + + -A ees + -l gres=lscratchd + + + + + + -S {{ shell }} + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} + + + regular + + + + + + -S {{ shell }} + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} + + + regular + + + + + + default + + + + + + default + + + + + sbatch + + queue + + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=bro + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=has + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=ivy + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + -W group_list=$PROJECT + -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}:model=san + -l place=scatter:excl + -S {{ shell }} + + + normal + + + + + + sbatch + #MSUB + + + -A ees + -l nodes={{ num_nodes }} + -l gres=lscratchd + + + + + sbatch + + batch + + + + + sbatch + + -C haswell + + + regular + + + + + + sbatch + + -C knl,quad,cache + -S 2 + + + regular + + + + + + sbatch + + regular + debug + + + + + ssh stampede.tacc.utexas.edu cd $CASEROOT ; sbatch + + normal + development + + + + + sbatch + + default + + + + + + + -S {{ shell }} + + + + + sbatch + + + + + caldera + regular + capability + premium + + + + + sbatch + + --qos=lr_normal + --partition=lr3 + --account={{ project }} + + + lr3 + + + + + sbatch + + --qos=lr_normal + --partition=lr2 + --account={{ project }} + + + lr2 + + + + + + + + $BUILD_COMPLETE and not $TEST + + + + $BUILD_COMPLETE and $TEST + + + + 1 + + case.run or case.test + $DOUT_S + + + + diff --git a/config_compilers.xml b/config_compilers.xml new file mode 100644 index 0000000000..515f6f3e41 --- /dev/null +++ b/config_compilers.xml @@ -0,0 +1,1113 @@ + + + + + + + -DOS + -D_USE_FLOW_CONTROL + + FALSE + + + + + -h noomp + -g -O0 + -O2 + + + + -DFORTRANUNDERSCORE -DNO_R16 -DCPRCRAY + -DDIR=NOOP + -DDIR=NOOP + + + -s real64 + + + -f free -N 255 -h byteswapio -x dir + -h noomp + -g -O0 -K trap=fp -m1 + -O2,ipa2 -em + + + -O1,fp2,ipa0,scalar0,vector0 + + TRUE + + -Wl,--allow-multiple-definition -h byteswapio + + + + + + -std=gnu99 + -fopenmp + -g -Wall -Og -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds + -O + + + + -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU + + FORTRAN + + -fdefault-real-8 + + + + -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none + -fopenmp + + -g -Wall -Og -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds + -O + + + -O0 + + + -ffixed-form + + + -ffree-form + + FALSE + + -fopenmp + + mpicc + mpicxx + mpif90 + gcc + g++ + gfortran + TRUE + + + + + -g -qfullpath -qmaxmem=-1 + -O3 + -qsmp=omp + -qsmp=omp:noopt + + + + -DFORTRAN_SAME -DCPRIBM + + -WF,-D + + -qrealsize=8 + + + -g -qfullpath -qmaxmem=-1 + -O2 -qstrict -qinline=auto + -qsmp=omp + -qinitauto=7FF7FFFF -qflttrap=ov:zero:inv:en + -qsmp=omp:noopt + -C + + + -qsuffix=f=f -qfixed=132 + + + -qsuffix=f=f90:cpp=F90 + + TRUE + + -qsmp=omp + -qsmp=omp:noopt + + + + + + -qno-opt-dynamic-align -fp-model precise -std=gnu99 + -qopenmp + -O2 -debug minimal + -O0 -g + + + + -DFORTRANUNDERSCORE -DCPRINTEL + + + -cxxlib + + FORTRAN + + -r8 + + + -qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source + -qopenmp + -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created + -O2 -debug minimal + + + -O0 + -qopenmp + + + -fixed -132 + + + -free + + TRUE + + -qopenmp + + mpicc + mpicxx + mpif90 + icc + icpc + ifort + + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl=cluster + -mkl + + TRUE + + + + + -std=gnu99 + -g + + + -DFORTRANUNDERSCORE -DNO_CRAY_POINTERS -DNO_SHR_VMATH -DCPRNAG + + + -r8 + + + + + -Wp,-macro=no_com -convert=BIG_ENDIAN -indirect $ENV{CIMEROOT}/config/cesm/machines/nag_mpi_argument.txt + + -ieee=full -O2 + + + -C=all -g -time -f2003 -ieee=stop + -gline + + -mismatch_all + + + -Wp,-macro=no_com -convert=BIG_ENDIAN -indirect $ENV{CIMEROOT}/config/cesm/machines/nag_mpi_argument.txt + -ieee=full + + + + -g -time -f2003 -ieee=stop + -gline + + + -fixed + + + -free + + FALSE + mpicc + mpif90 + gcc + nagfor + + + + + -gopt -time + -mp + + + + + + + + + + + + + + + + + + + + + + + + + + + + -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16 -DCPRPGI + + CXX + + -r8 + + + -i4 -gopt -time -Mextend -byteswapio -Mflushz -Kieee + -mp + -O0 -g -Ktrap=fp -Mbounds -Kieee + -Mnovect + -Mnovect + -Mnovect + -Mnovect + -Mnovect + -Mnovect + + + -O0 -g -Ktrap=fp -Mbounds -Kieee + -mp + + + -Mfixed + + + -Mfree + + + + FALSE + + -time -Wl,--allow-multiple-definition + -mp + + mpicc + mpicxx + mpif90 + pgcc + pgc++ + pgf95 + + + + + -qarch=auto -qtune=auto -qcache=auto + + /usr/bin/bash + + -qarch=auto -qtune=auto -qcache=auto -qsclk=micro + -qspill=6000 + + + -qsigtrap=xl__trcedump + -bdatapsize:64K -bstackpsize:64K -btextpsize:32K + + mpcc_r + mpxlf2003_r + cc_r + xlf2003_r + + -lmassv -lessl + -lmass + + + + + + --build=powerpc-bgp-linux --host=powerpc64-suse-linux + + + -DLINUX + + + -g -qfullpath -qmaxmem=-1 -qspillsize=2500 -qextname=flush + -O3 -qstrict -qinline=auto + -qsmp=omp + -qsmp=omp:noopt + + + -Wl,--relax -Wl,--allow-multiple-definition + + + + + + -DCMAKE_SYSTEM_NAME=Catamount + + + -DLINUX + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + cc + CC + ftn + $ENV{NETCDF_DIR} + lustre + $ENV{PARALLEL_NETCDF_DIR} + cc + CC + ftn + + + + + -DSYSDARWIN + + + + + + -heap-arrays + + + + + + -DHAVE_PAPI + + lustre + + + + + -O2 + -nofma + + + -lmpichf90_pgi $ENV{PGI_PATH}/linux86-64/$ENV{PGI_VERSION}/lib/f90main.o + + + -O2 + -nofma + + TRUE + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi -L$ENV{MKL_PATH} -lmkl_rt + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + --host=Linux + + + -xCORE-AVX2 + + + -xCORE-AVX2 + + + -L$(NETCDF_DIR) -lnetcdff -Wl,--as-needed,-L$(NETCDF_DIR)/lib -lnetcdff -lnetcdf + + + -DHAVE_PAPI -DHAVE_SLASHPROC + + + -mkl + + + FALSE + + + + + + --host=Linux + + + -xMIC-AVX512 + + + -xMIC-AVX512 + + + -L$(NETCDF_DIR) -lnetcdff -Wl,--as-needed,-L$(NETCDF_DIR)/lib -lnetcdff -lnetcdf + + + -DHAVE_SLASHPROC + + + -mkl -lmemkind -zmuldefs + + + FALSE + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 + -nomp + + + --host=Linux + + + -DLINUX + + + -O2 + -nomp + + + -nomp + + $ENV{NETCDF_HOME} + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 + + + --host=Linux + + + -DHAVE_PAPI + + + -O2 + + + -L$ENV{NETCDF_DIR} -lnetcdff -Wl,--as-needed,-L$ENV{NETCDF_DIR}/lib -lnetcdff -lnetcdf + + + + + + -O2 + + + -O2 + + + -Wl,-rpath /usr/local/tools/netcdf-pgi-4.1.3/lib + + mpich + /usr/local/tools/mvapich2-pgi-1.7/ + /usr/local/tools/netcdf-pgi-4.1.3 + + $SHELL{/usr/local/tools/netcdf-pgi-4.1.3/bin/nc-config --flibs} + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + /usr/lib64 + mpich + $ENV{NETCDF_PATH} + + -L$NETCDF_PATH/lib -lnetcdff -lnetcdf + + + + + + -lifcore + + + -lifcore + -mcmodel medium + + + -lquadmath + -Wl,-rpath,${NETCDF_PATH}/lib + -Wl,-rpath,$ENV{COMPILER_PATH}/lib/intel64 + -Wl,-rpath,$ENV{COMPILER_PATH}/mkl/lib/intel64 + -Wl,-rpath,$ENV{MPI_PATH}/lib + -lifcore + + + -mkl=cluster + + /fs/cgd/csm/tools/pFUnit/pFUnit3.2.8_hobart_Intel15.0.2_noMPI_noOpenMP + + + + + + -DNO_C_SIZEOF + + + -lpthread + + + -L/usr/local/nag/lib/NAG_Fortran + + + + + + -O0 + + + -O0 + + + -lgomp + -Wl,-R${NETCDF_PATH}/lib + -Wl,-R$ENV{COMPILER_PATH}/lib + -Wl,-R$ENV{COMPILER_PATH}/libso + + + + + + -lm + -ldl + + + + + + + -framework Accelerate + + + + + mpixlc_r + mpixlf2003_r + /bgsys/local/netcdf/ + gpfs + /bgsys/local/parallel-netcdf/v1.3.1 + mpixlc_r + mpixlf2003_r + + -L/bgsys/local/netcdf/lib -lnetcdf -L/bgsys/drivers/ppcfloor/comm/lib + + + + + /projects/install/rhel6-x86_64/ACME/AlbanyTrilinos/Albany/build/install + + -O2 + + + --host=Linux + + + -lstdc++ -lmpi_cxx + + + -O2 + + $ENV{NETCDFROOT} + $ENV{PNETCDFROOT} + + $SHELL{${NETCDF_PATH}/bin/nf-config --flibs} -lblas -llapack + + + + + + -qfloat=nomaf + + + -qfloat=nomaf + + $ENV{HDF5} + + + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf77_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlc_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf2003_r + /soft/libraries/netcdf/4.3.3-f4.4.1/cnk-xl/current/ + gpfs + /soft/libraries/pnetcdf/1.6.1/cnk-xl/current/ + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlc_r + /home/pkcoff/mpich-sandboxes/master/install-production/bin/mpixlf2003_r + + -L${NETCDF_PATH}/lib -lnetcdff -lnetcdf -L$ENV{HDF5}/lib -lhdf5_hl -lhdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -L/soft/libraries/alcf/current/xl/LAPACK/lib -llapack -L/soft/libraries/alcf/current/xl/BLAS/lib -lblas -L/bgsys/drivers/ppcfloor/comm/sys/lib + + + + + + -O2 + + + --host=Linux + + + -DLINUX + + + -O2 + + $ENV{NETCDF_LIB}/.. + lustre + + -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi + + + + + + -O2 -xCORE-AVX2 + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xCORE-AVX2 + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xAVX + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -O2 -xAVX + + icc + mpi + $ENV{MPI_ROOT} + $ENV{NETCDF} + + -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf + + /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + + + + + -Wl,-rpath /usr/local/tools/netcdf-pgi-4.1.3/lib + + mpich + /usr/local/tools/mvapich2-pgi-1.7/ + /usr/local/tools/netcdf-pgi-4.1.3 + + $SHELL{/usr/local/tools/netcdf-pgi-4.1.3/bin/nc-config --flibs} + + + + + + -O2 + + + --host=Linux + + /projects/ccsm/esmf-6.3.0rp1/lib/libO/Linux.intel.64.openmpi.default + + -O2 + + $ENV{NETCDFROOT} + lustre + $ENV{PNETCDFROOT} + + -L${NETCDF_PATH}/lib -lnetcdff -L/projects/ccsm/BLAS-intel -lblas_LINUX + + + + + + -DHAVE_NANOTIME + + $ENV{TACC_NETCDF_DIR} + lustre + $ENV{TACC_PNETCDF_DIR} + + + + + -xHost + + + -xHost + -mcmodel medium + + + -L$ENV{TACC_HDF5_LIB} -lhdf5 + + + $SHELL{${NETCDF_PATH}/bin/nf-config --flibs} -L$ENV{TACC_HDF5_LIB} -lhdf5 + + $ENV{TRILINOS_PATH} + + + + + -xMIC-AVX512 + + + -xMIC-AVX512 + + + --host=Linux + + + -L$(NETCDF_DIR)/lib -lnetcdff -L$(NETCDF_DIR)/lib -lnetcdf -Wl,-rpath -Wl,$(NETCDF_DIR)/lib + + + + + + /soft/libraries/hdf5/1.8.10/cnk-xl/current/ + + + mpixlf77_r + mpixlc_r + mpixlf2003_r + /soft/libraries/netcdf/4.3.0-f4.2/cnk-xl/V1R2M0-20131211/ + gpfs + /soft/libraries/pnetcdf/1.3.1/cnk-xl/current/ + mpixlc_r + mpixlf2003_r + + -L${NETCDF_PATH}/lib -lnetcdff -lnetcdf -L/soft/libraries/hdf5/1.8.10/cnk-xl/current/lib -lhdf5_hl -lhdf5 -L/soft/libraries/alcf/current/xl/ZLIB/lib -lz -L/soft/libraries/alcf/current/xl/LAPACK/lib -llapack -L/soft/libraries/alcf/current/xl/BLAS/lib -lblas -L/bgsys/drivers/ppcfloor/comm/sys/lib + + + + + + + + + + + + + + USERDEFINED_MUST_EDIT_THIS + + + # USERDEFINED $SHELL{${NETCDF_PATH}/bin/nc-config --flibs} + + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + + -DNO_MPIMOD + + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + -qopt-report -xCORE_AVX2 -no-fma + + + -qopt-report -xCORE_AVX2 -no-fma + + + -DPIO_ENABLE_LOGGING=ON + + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_noMPI_noOpenMP + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_MPI_openMP + + FALSE + + + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + + + + -vec-report + + + -vec-report + + + -DPIO_ENABLE_LOGGING=ON + + + + + /glade/apps/opt/lib + gcc + gfortran + + + + + -xHost + + + -DINTEL_MKL -DHAVE_SSE2 + + + -xHost + + mpiicpc + /glade/apps/opt/papi/5.3.0/intel/12.1.5/include/ + /glade/apps/opt/papi/5.3.0/intel/12.1.5/lib64 + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.1_yellowstone_Intel15.0.1_noMPI_noOpenMP + $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.1_Intel15.0.1_MPI + + icc + ifort + ${MPICC} + ${MPIFC} + + -Wl,-rpath ${PAPI_LIB} -L${PAPI_LIB} -lpapi + + $ENV{TRILINOS_PATH} + + + + + -O + + + -O + + + -llapack -lblas + + pgcc + pgfortran + + + + + -DHAVE_VPRINTF -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + + -lnetcdff -lnetcdf -mkl + + + -ftrapuv + + + -ftrapuv + + $ENV{NETCDF_DIR} + + + + + -DHAVE_VPRINTF -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + + -lnetcdff -lnetcdf -mkl + + + -ftrapuv + + + -ftrapuv + + $ENV{NETCDF_DIR} + + + diff --git a/config_machines.xml b/config_machines.xml new file mode 100644 index 0000000000..d4515959f2 --- /dev/null +++ b/config_machines.xml @@ -0,0 +1,1965 @@ + + + + + + + + ORNL XE6, os is CNL, 32 pes/node, batch system is PBS + h2o + CNL + pgi,cray,gnu + mpich + /scratch/sciteam/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/inputdata/atm/datm7 + /scratch/sciteam/$USER/archive/$CASE + $ENV{CESMDATAROOT}/ccsm_baselines + $ENV{CESMDATAROOT}/tools/ccsm_cprnc/cprnc + 8 + pbs + cseg + 32 + 16 + TRUE + + aprun + + -n $TOTALPES + + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/3.2.10.3/bin/modulecmd perl + /opt/modules/3.2.10.3/bin/modulecmd python + module + module + + PrgEnv-pgi + PrgEnv-cray + PrgEnv-gnu + pgi + cray + + + PrgEnv-pgi + pgi pgi/16.3.0 + + + PrgEnv-gnu/4.2.84 + gcc gcc/4.8.2 + + + PrgEnv-cray + cce cce/8.4.6 + + + papi/5.3.2 + cray-mpich cray-mpich/7.3.3 + cray-libsci cray-libsci/16.03.1 + torque/6.0.2 + + + cray-netcdf-hdf5parallel/4.4.0 + cray-parallel-netcdf/1.7.0 + + + cray-netcdf/4.4.0 + + + cmake/3.1.3 + darshan + /sw/modulefiles/CESM + CESM-ENV + + + + 64M + + + + + Brutus Linux Cluster ETH (pgi(9.0-1)/intel(10.1.018) with openi(1.4.1)/mvapich2(1.4rc2), 16 pes/node, batch system LSF, added by UB + LINUX + pgi,intel + openmpi,mpich + /cluster/work/uwis/$USER + /cluster/work/uwis/ccsm/inputdata + /cluster/work/uwis/ccsm/inputdata/atm/datm7 + /cluster/work/uwis/$USER/archive/$CASE + /cluster/work/uwis/ccsm/ccsm_baselines + /cluster/work/uwis/ccsm/tools/cprnc/cprnc + 1 + lsf + tcraig -at- ucar.edu + 16 + 16 + + mpirun + + -hostfile $ENV{PBS_JOBID} + -ppn $MAX_MPITASKS_PER_NODE + -n $TOTALPES + + + + ompirun + + + + + /etc/profile.d/modules.perl + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + + /usr/bin/modulecmd perl + module + module + + + + + intel/10.1.018 + + + pgi/9.0-1 + + + mvapich2/1.4rc2 + + + open_mpi/1.4.1 + + + netcdf/4.0.1 + + + + 64M + + + + + + Example port to centos7 linux system with gcc, netcdf, pnetcdf and mpich + using modules from http://www.admin-magazine.com/HPC/Articles/Environment-Modules + + regex.expression.matching.your.machine + LINUX + https://howto.get.out + gnu + mpich + none + + $ENV{HOME}/cesm/scratch + $ENV{HOME}/cesm/inputdata + $ENV{HOME}/cesm/inputdata/lmwg + $ENV{HOME}/cesm/archive/$CASE + $ENV{HOME}/cesm/cesm_baselines + $ENV{HOME}/cesm/tools/cime/tools/cprnc/cprnc + gmake + 8 + none + me@my.address + 8 + 8 + FALSE + + mpiexec + + -np {{ total_tasks }} + + + + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/python.py + /usr/share/Modules/init/csh + /usr/share/Modules/init/sh + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + + + compiler/gnu/7.2.0 + mpi/gcc/mpich-3.2 + tool/netcdf/4.4.1.1/gcc + tool/parallel-netcdf/mpich + + + + 256M + + + -1 + + + + + NCAR SGI platform, os is Linux, 36 pes/node, batch system is PBS + .*.cheyenne.ucar.edu + LINUX + intel,gnu + mpt,openmpi + /glade/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/cesm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc.cheyenne + 8 + pbs + cseg + + 36 + 36 + TRUE + + mpiexec_mpt + + -np $TOTALPES + -p "%g:" + + omplace -tm open64 + + + + mpirun + + -np $TOTALPES + + + + + /opt/sgi/mpt/mpt-2.15/bin/mpirun $ENV{UNIT_TEST_HOST} -np 1 + + + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/perl + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/env_modules_python.py + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/csh + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/init/sh + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/libexec/lmod perl + /glade/u/apps/ch/opt/lmod/7.2.1/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.2 + + + intel/17.0.1 + esmf_libs + mkl + + + esmf-7.0.0-defio-mpi-g + + + esmf-7.0.0-defio-mpi-O + + + esmf-7.0.0-ncdfio-uni-g + + + esmf-7.0.0-ncdfio-uni-O + + + gnu/6.3.0 + openblas/0.2.14 + + + mpt/2.16 + netcdf-mpi/4.4.1.1 + pnetcdf/1.8.1 + + + openmpi/2.1.0 + netcdf/4.4.1.1 + + + ncarcompilers/0.4.1 + + + netcdf/4.4.1.1 + + + + 256M + /glade/scratch/$USER + 16 + + + + false + + + -1 + + + + + PNL Haswell cluster, OS is Linux, batch system is SLURM + LINUX + intel,pgi + mvapich2,openmpi,intelmpi,mvapich + /pic/scratch/$USER + /pic/scratch/tcraig/IRESM/inputdata + /pic/scratch/tcraig/IRESM/inputdata/atm/datm7 + /pic/scratch/$USER/cases/archive/$CASE + /pic/scratch/tcraig/IRESM/ccsm_baselines + /people/tcraig/bin/cprnc + 8 + slurm + tcraig -at- ucar.edu + 24 + 24 + FALSE + + srun + + --mpi=none + --ntasks=$TOTALPES + --cpu_bind=sockets --cpu_bind=verbose + --kill-on-bad-exit + + + + srun + + --ntasks=$TOTALPES + --cpu_bind=sockets --cpu_bind=verbose + --kill-on-bad-exit + + + + mpirun + + -n $TOTALPES + + + + mpirun + + -n $TOTALPES + + + + /share/apps/modules/Modules/3.2.10/init/perl.pm + /etc/profile.d/modules.csh + /etc/profile.d/modules.sh + /share/apps/modules/Modules/3.2.10/bin/modulecmd perl + module + module + + + + + perl/5.20.0 + cmake/2.8.12 + + + intel/15.0.1 + netcdf/4.3.2 + mkl/15.0.1 + + + pgi/14.10 + netcdf/4.3.2 + + + mvapich2/2.1 + + + mvapich2/2.1 + + + intelmpi/5.0.1.035 + + + openmpi/1.8.3 + + + + 64M + + + $MLIB_LIB + /share/apps/netcdf/4.3.2/intel/15.0.1 + + + /share/apps/netcdf/4.3.2/pgi/14.10 + + + + + + + NERSC XC40 Haswell, os is CNL, 32 pes/node, batch system is Slurm + cori + CNL + intel,gnu,cray + mpt + $ENV{SCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.corip1/cprnc + 8 + slurm + cseg + 64 + 32 + + srun + + --label + -n $TOTALPES + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-sandybridge + craype-ivybridge + craype + + + + PrgEnv-intel + intel intel/17.0.1.132 + /global/project/projectdirs/ccsm1/modulefiles/cori + + + esmf/6.3.0rp1-defio-intel2016-mpi-O + + + esmf/6.3.0rp1-defio-intel2016-mpiuni-O + + + + PrgEnv-cray + cce cce/8.5.7 + + + PrgEnv-gnu + gcc gcc/6.2.0 + + + cray-memkind + papi/5.4.1.3 + craype craype/2.5.7 + + + cray-libsci/16.09.1 + + + cray-mpich/7.4.4 + + + cray-hdf5/1.10.0 + cray-netcdf/4.4.1 + + + cray-netcdf-hdf5parallel/4.3.3.1 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + cmake/3.5.2 + + + + 256M + + + + + + + NERSC XC* KNL, os is CNL, 68 pes/node, batch system is Slurm + CNL + intel,gnu,cray + mpt + $ENV{SCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.corip1/cprnc + 8 + slurm + cseg + 256 + 64 + + srun + + --label + -n $TOTALPES + -c 4 --cpu_bind=cores + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + craype-mic-knl + craype-haswell + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + + + PrgEnv-intel + intel intel/17.0.3.191 + /global/project/projectdirs/ccsm1/modulefiles/cori + + + esmf/6.3.0rp1-defio-intel2016-mpi-O + + + esmf/6.3.0rp1-defio-intel2016-mpiuni-O + + + + PrgEnv-cray + cce cce/8.5.8 + + + PrgEnv-gnu + gcc gcc/6.2.0 + + + cray-memkind + craype-mic-knl + craype craype/2.5.7 + + + cray-libsci/16.11.1 + + + cray-mpich/7.4.4 + + + cray-hdf5/1.10.0 + cray-netcdf/4.4.1 + + + cray-netcdf-hdf5parallel/4.3.3.1 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + cmake/3.5.2 + + + + 256M + + + + + PNL IBM Xeon cluster, os is Linux (pgi), batch system is SLURM + LINUX + pgi,intel + mvapich2,mvapich + /lustre/$USER + /lustre/tcraig/IRESM/inputdata + /lustre/tcraig/IRESM/inputdata/atm/datm7 + /lustre/$USER/archive/$CASE + /lustre/tcraig/IRESM/ccsm_baselines + /lustre/tcraig/IRESM/tools/cprnc/cprnc + 8 + slurm + tcraig -at- ucar.edu + 12 + 12 + + srun + + --ntasks=$TOTALPES + --cpu_bind=sockets + --cpu_bind=verbose + --kill-on-bad-exit + + + + srun + + --mpi=none + --ntasks=$TOTALPES + --cpu_bind=sockets + --cpu_bind=verbose + --kill-on-bad-exit + + + + /etc/profile.d/modules.perl + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /share/apps/modules/Modules/3.2.7/bin/modulecmd perl + module + module + + + perl/5.20.7 + cmake/3.0.0 + pgi/15.5 + mpi/mvapich2/1.5.1p1/pgi11.3 + netcdf/4.1.2/pgi + + + + 64M + + + + + NERSC XC30, os is CNL, 24 pes/node, batch system is SLURM + edison + CNL + intel,gnu,cray + mpt + $ENV{CSCRATCH} + /project/projectdirs/ccsm1/inputdata + /project/projectdirs/ccsm1/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /project/projectdirs/ccsm1/ccsm_baselines + /project/projectdirs/ccsm1/tools/cprnc.edison/cprnc + 8 + slurm + cseg + 48 + 24 + + srun + + --label + -n $TOTALPES + -c $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-parallel-hdf5 + pmi + cray-libsci + cray-mpich2 + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-sandybridge + craype-ivybridge + craype + + + + PrgEnv-intel + intel intel/16.0.3.210 + cray-libsci + /global/project/projectdirs/ccsm1/modulefiles/edison + + + esmf/6.3.0rp1-defio-intel15.0-mpi-O + + + esmf/6.3.0rp1-defio-intel15.0-mpiuni-O + + + PrgEnv-cray + cce cce/8.5.1 + cray-libsci/16.07.1 + + + PrgEnv-gnu + gcc gcc/6.1.0 + cray-libsci/16.07.1 + + + papi/5.4.3.2 + craype craype/2.5.5 + craype-ivybridge + + + cray-mpich/7.6.0 + + + cray-hdf5/1.8.16 + cray-netcdf/4.4.0 + + + cray-netcdf-hdf5parallel/4.4.0 + cray-hdf5-parallel/1.8.16 + cray-parallel-netcdf/1.7.0 + + + + + 64M + + + + + NOAA XE6, os is CNL, 24 pes/node, batch system is PBS + CNL + pgi + mpich + /lustre/fs/scratch/Julio.T.Bacmeister + /lustre/fs/scratch/Julio.T.Bacmeister/inputdata + /lustre/fs/scratch/Julio.T.Bacmeister/inputdata + /lustre/fs/scratch/Julio.T.Bacmeister/archive/$CASE + UNSET + UNSET + 8 + pbs + julio -at- ucar.edu + 24 + 24 + + aprun + + -j {{ hyperthreading }} + -n $TOTALPES + -S {{ tasks_per_numa }} + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/csh + /opt/modules/default/init/sh + /opt/modules/default/bin/modulecmd perl + module + module + + PrgEnv-pgi + PrgEnv-cray + PrgEnv-gnu + pgi + cray + + + PrgEnv-pgi + pgi pgi/12.5.0 + + + PrgEnv-gnu + torque + + + PrgEnv-cray/4.0.36 + cce/8.0.2 + + + torque/4.1.3 + netcdf-hdf5parallel/4.2.0 + parallel-netcdf/1.2.0 + + + + 64M + 1 + + + + + NCAR CGD Linux Cluster 48 pes/node, batch system is PBS + ^hob.* + LINUX + intel,pgi,nag,gnu + mvapich2,openmpi + /scratch/cluster/$USER + /fs/cgd/csm/inputdata + /project/tss + /scratch/cluster/$USER/archive/$CASE + /fs/cgd/csm/ccsm_baselines + /fs/cgd/csm/tools/cprnc_hobart/cprnc + gmake --output-sync + 4 + pbs + cseg + 48 + 48 + + mpiexec + + --machinefile $ENV{PBS_NODEFILE} + -n $TOTALPES + + + + mpiexec + + -n $TOTALPES + + + + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/python.py + /usr/share/Modules/init/csh + /usr/share/Modules/init/sh + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + + + compiler/intel/15.0.2.164 + + + tool/parallel-netcdf/1.7.0/intel/mvapich2 + + + compiler/pgi/17.04 + + + tool/parallel-netcdf/1.6.1/pgi/mvapich2 + + + compiler/nag/6.1 + + + compiler/gnu/5.4.0 + tool/parallel-netcdf/1.8.1/gnu-5.4.0/openmpi + + + + 64M + + + + + + + Customize these fields as appropriate for your system, + particularly changing MAX_TASKS_PER_NODE and MAX_MPITASKS_PER_NODE to the + number of cores on your machine. You may also want to change + instances of '$ENV{HOME}/projects' to your desired directory + organization. You can use this in either of two ways: (1) + Without making any changes, by adding `--machine homebrew` to + create_newcase or create_test (2) Copying this into a + config_machines.xml file in your personal .cime directory and + then changing the machine name (MACH="homebrew") to + your machine name and the NODENAME_REGEX to something matching + your machine's hostname. With (2), you should not need the + `--machine` argument, because the machine should be determined + automatically. However, with (2), you will also need to copy the + homebrew-specific settings in config_compilers.xml into a + config_compilers.xml file in your personal .cime directory, again + changing the machine name (MACH="homebrew") to your machine name. + + + something.matching.your.machine.hostname + Darwin + gnu + mpich + $ENV{HOME}/projects/scratch + $ENV{HOME}/projects/cesm-inputdata + $ENV{HOME}/projects/ptclm-data + $ENV{HOME}/projects/scratch/archive/$CASE + $ENV{HOME}/projects/baselines + $CIMEROOT/tools/cprnc/build/cprnc + make + 4 + none + __YOUR_NAME_HERE__ + 4 + 4 + + mpirun + + -np $TOTALPES + -prepend-rank + + + + + /usr/local + + + + + + NCAR SGI test platform, os is Linux, 36 pes/node, batch system is PBS + .*.laramie.ucar.edu + LINUX + intel,gnu + mpt + /picnic/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMDATAROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/cesm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc + 8 + pbs + cseg + + 36 + 36 + TRUE + + mpiexec_mpt + + -p "%g:" + omplace + + + + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/perl + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/env_modules_python.py + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/csh + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/init/sh + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/libexec/lmod perl + /picnic/u/apps/la/opt/lmod/6.5/gnu/4.8.5/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.0 + + + intel/16.0.3 + mkl + + + gnu/6.2.0 + + + mpt/2.15 + ncarcompilers/0.3.2 + + + netcdf/4.4.1 + + + netcdf-mpi/4.4.1 + pnetcdf/1.7.x + + + + 256M + 16 + + + + + Linux workstation for Jenkins testing + (melvin|watson) + LINUX + sonproxy.sandia.gov:80 + gnu + openmpi + /sems-data-store/ACME/timings + $ENV{HOME}/acme/scratch + /sems-data-store/ACME/inputdata + /sems-data-store/ACME/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /sems-data-store/ACME/baselines + /sems-data-store/ACME/cprnc/build/cprnc + make + 32 + acme_developer + none + jgfouca at sandia dot gov + 64 + 64 + + mpirun + + -np $TOTALPES + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + sems-gcc/5.1.0 + sems-openmpi/1.8.7 + sems-cmake/2.8.12 + sems-netcdf/4.3.2/parallel + + + + $ENV{SEMS_NETCDF_ROOT} + + + $ENV{SEMS_NETCDF_ROOT} + + + + + + ANL IBM BG/Q, os is BGP, 16 pes/node, batch system is cobalt + .*.fst.alcf.anl.gov + BGQ + ibm + ibm + /projects/$PROJECT/usr/$ENV{USER} + /projects/ccsm/inputdata + /projects/ccsm/inputdata/atm/datm7 + /projects/$PROJECT/usr/$USER/archive/$CASE + /projects/ccsm/ccsm_baselines/ + /projects/ccsm/tools/cprnc/cprnc + 4 + cobalt + cseg + 64 + 8 + TRUE + + /usr/bin/runjob + + --label short + + --ranks-per-node $MAX_MPITASKS_PER_NODE + + --np $TOTALPES + --block $COBALT_PARTNAME --envs OMP_WAIT_POLICY=active --envs BG_SMP_FAST_WAKEUP=yes $LOCARGS + --envs BG_THREADLAYOUT=1 + --envs OMP_STACKSIZE=32M + --envs OMP_NUM_THREADS=$ENV{OMP_NUM_THREADS} + + + + /etc/profile.d/00softenv.csh + /etc/profile.d/00softenv.sh + soft + soft + + +mpiwrapper-xl + @ibm-compilers-2015-02 + +cmake + +python + + + + 10000 + FALSE + 64M + /soft/libraries/hdf5/1.8.14/cnk-xl/current + + + + + PNL cluster, os is Linux (pgi), batch system is SLURM + LINUX + pgi + mpich + /pic/scratch/$USER + /pic/scratch/tcraig/IRESM/inputdata + /pic/scratch/tcraig/IRESM/inputdata/atm/datm7 + /pic/scratch/$USER/archive/$CASE + /pic/scratch/tcraig/IRESM/ccsm_baselines + /pic/scratch/tcraig/IRESM/tools/cprnc/cprnc + 8 + slurm + tcraig -at- ucar.edu + 32 + 32 + FALSE + + mpiexec_mpt + + --mpi=none + -n=$TOTALPES + --kill-on-bad-exit + + + + /share/apps/modules/Modules/3.2.7/init/perl.pm + /share/apps/modules/Modules/3.2.7/init/csh + /share/apps/modules/Modules/3.2.7/init/sh + /share/apps/modules/Modules/3.2.7/bin/modulecmd perl + module + module + + + precision/i4 + pgi/11.8 + mvapich2/1.7 + netcdf/4.1.3 + + + + 64M + + + + + NASA/AMES Linux Cluster, Linux (ia64), 2.4 GHz Broadwell Intel Xeon E5-2680v4 processors, 28 pes/node (two 14-core processors) and 128 GB of memory/node, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 28 + 28 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), 2.5 GHz Haswell Intel Xeon E5-2680v3 processors, 24 pes/node (two 12-core processors) and 128 GB of memory/node, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 24 + 24 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), Altix ICE, 2.6 GHz Sandy Bridge processors, 16 cores/node and 32 GB of memory, batch system is PBS + LINUX + intel + mpt + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 16 + 16 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + NASA/AMES Linux Cluster, Linux (ia64), Altix ICE, 2.8 GHz Ivy Bridge processors, 20 cores/node and 3.2 GB of memory per core, batch system is PBS + LINUX + intel + mpich + /nobackup/$USER + /nobackup/fvitt/csm/inputdata + /nobackup/fvitt/csm/inputdata/atm/datm7 + /nobackup/$USER/archive/$CASE + /nobackup/fvitt/cesm_baselines + /u/fvitt/bin/cprnc + 8 + pbs + fvitt -at- ucar.edu + 20 + 20 + TRUE + + mpiexec_mpt + + -n $TOTALPES + + + + /usr/share/Modules/3.2.10/init/perl.pm + /usr/share/Modules/3.2.10/init/sh + /usr/share/Modules/3.2.10/init/csh + /usr/share/Modules/3.2.10/init/python.py + /usr/bin/modulecmd perl + /usr/bin/modulecmd python + module + module + + + nas + pkgsrc + comp-intel/2016.2.181 + mpi-sgi/mpt.2.15r20 + szip/2.1.1 + hdf4/4.2.12 + hdf5/1.8.18_mpt + netcdf/4.4.1.1_mpt + + + + 1024 + 100000 + 16 + noverbose,disabled + static,balanced + 256M + + + + + CSCS Cray XE6, os is CNL, 32 pes/node, batch system is SLURM + CNL + pgi,cray,gnu + mpich + /scratch/rosa/$USER + /project/s433/cesm_inputdata + /project/s433/cesm_inputdata/atm/datm7 + /project/s433/$USER/archive/$CASE + /project/s433/ccsm_baselines + /project/s433/cesm_tools/ccsm_cprnc/cprnc + 12 + slurm + edouard.davin -at- env.ethz.ch + 32 + 32 + + aprun + + -n $TOTALPES + -N $MAX_MPITASKS_PER_NODE + -d $ENV{OMP_NUM_THREADS} + + + + + 64M + + + + + + Linux workstation at Sandia on SRN with SEMS TPL modules + (s999964|climate|penn) + LINUX + wwwproxy.sandia.gov:80 + gnu + openmpi + /sems-data-store/ACME/timings + $ENV{HOME}/acme/scratch + /sems-data-store/ACME/inputdata + /sems-data-store/ACME/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /sems-data-store/ACME/baselines + /sems-data-store/ACME/cprnc/build/cprnc + make + 32 + acme_developer + none + jgfouca at sandia dot gov + 64 + 64 + + mpirun + + -np $TOTALPES + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + sems-gcc/5.1.0 + sems-openmpi/1.8.7 + sems-cmake/2.8.12 + sems-netcdf/4.3.2/parallel + + + + $ENV{SEMS_NETCDF_ROOT} + $ENV{SEMS_NETCDF_ROOT} + + + + + SNL clust + skybridge-login + LINUX + wwwproxy.sandia.gov:80 + intel + openmpi + /projects/ccsm/timings + /gscratch/$USER/acme_scratch/skybridge + /projects/ccsm/inputdata + /projects/ccsm/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /projects/ccsm/ccsm_baselines + /projects/ccsm/cprnc/build/cprnc_wrap + 8 + acme_integration + slurm + jgfouca at sandia dot gov + 16 + 16 + TRUE + + + mpirun + + -np $TOTALPES + -npernode $MAX_MPITASKS_PER_NODE + + + + /usr/share/Modules/init/python.py + /usr/share/Modules/init/perl.pm + /usr/share/Modules/init/sh + /usr/share/Modules/init/csh + /usr/bin/modulecmd python + /usr/bin/modulecmd perl + module + module + + + sems-env + sems-git + sems-python/2.7.9 + gnu/4.9.2 + intel/intel-15.0.3.187 + libraries/intel-mkl-15.0.2.164 + libraries/intel-mkl-15.0.2.164 + + + openmpi-intel/1.8 + sems-hdf5/1.8.12/parallel + sems-netcdf/4.3.2/parallel + sems-hdf5/1.8.12/base + sems-netcdf/4.3.2/base + + + + $ENV{SEMS_NETCDF_ROOT} + 64M + + + $ENV{SEMS_NETCDF_ROOT} + + + + + TACC DELL, os is Linux, 16 pes/node, batch system is SLURM + .*stampede + LINUX + intel + mvapich2,impi + $ENV{SCRATCH} + /scratch/projects/xsede/CESM/inputdata + /scratch/projects/xsede/CESM/inputdata/lmwg + $WORK/archive/$CASE + /scratch/projects/xsede/CESM/ccsm_baselines + /scratch/projects/xsede/CESM/tools/cprnc/cprnc + 4 + slurm + cseg + 16 + 16 + + + ibrun + + + ibrun + + + /opt/apps/lmod/lmod/init/perl + /opt/apps/lmod/lmod/init/env_modules_python.py + /opt/apps/lmod/lmod/init/sh + /opt/apps/lmod/lmod/init/csh + /opt/apps/lmod/lmod/libexec/lmod perl + /opt/apps/lmod/lmod/libexec/lmod python + module + module + + + TACC + python/2.7.12 + intel/15.0.2 + perl/5.16.2 + cmake/3.1.0 + + + mvapich2 + pnetcdf/1.6.1 + parallel-netcdf/4.3.3.1 + + + mvapich2 + impi + pnetcdf/1.6.0 + parallel-netcdf/4.3.3.1 + + + netcdf/4.3.3.1 + + + + 256M + /scratch/projects/xsede/CESM/perl5/lib/perl5/x86_64-linux-thread-multi:/scratch/projects/xsede/CESM/perl5/lib/perl5 + + + + + Lawrencium LR3 cluster at LBL, OS is Linux (intel), batch system is SLURM + n0*.lr3.lbl.gov + LINUX + intel + openmpi + /global/scratch/$ENV{USER} + /global/scratch/$ENV{USER}/cesm_input_datasets/ + /global/scratch/$ENV{USER}/cesm_input_datasets/atm/datm7 + $CIME_OUTPUT_ROOT/cesm_archive/$CASE + $CIME_OUTPUT_ROOT/cesm_baselines + /$CIME_OUTPUT_ROOT/cesm_tools/cprnc/cprnc + 4 + slurm + rgknox and gbisht at lbl dot gov + 16 + 16 + TRUE + + mpirun + + + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /usr/Modules/init/perl.pm + /usr/Modules/python.py + module + module + /usr/Modules/bin/modulecmd perl + /usr/Modules/bin/modulecmd python + + + cmake + perl xml-libxml switch python/2.7.11 + + + intel/2015.6.233 + mkl + + + netcdf/4.4.0-intel-s + + + openmpi + netcdf/4.4.0-intel-p + + + + + + Lawrencium LR2 cluster at LBL, OS is Linux (intel), batch system is SLURM + n0*.lr2.lbl.gov + LINUX + intel + openmpi + /global/scratch/$ENV{USER} + /global/scratch/$ENV{USER}/cesm_input_datasets/ + /global/scratch/$ENV{USER}/cesm_input_datasets/atm/datm7 + $CIME_OUTPUT_ROOT/cesm_archive/$CASE + $CIME_OUTPUT_ROOT/cesm_baselines + /$CIME_OUTPUT_ROOT/cesm_tools/cprnc/cprnc + 4 + slurm + rgknox and gbisht at lbl dot gov + 12 + 12 + TRUE + + mpirun + + + /etc/profile.d/modules.sh + /etc/profile.d/modules.csh + /usr/Modules/init/perl.pm + /usr/Modules/python.py + module + module + /usr/Modules/bin/modulecmd perl + /usr/Modules/bin/modulecmd python + + + cmake + perl xml-libxml switch python/2.7.11 + + + intel/2015.6.233 + mkl + + + netcdf/4.4.0-intel-s + + + openmpi + netcdf/4.4.0-intel-p + + + + + + ALCF Cray XC* KNL, os is CNL, 64 pes/node, batch system is cobalt + theta.* + CNL + intel,gnu,cray + mpt + EarlyPerf_theta + /projects/EarlyPerf_theta/cesm/scratch/$USER + /projects/EarlyPerf_theta/cesm/inputdata + /projects/EarlyPerf_theta/cesm/inputdata/atm/datm7 + $CIME_OUTPUT_ROOT/archive/$CASE + /projects/EarlyPerf_theta/cesm/baselines + /projects/EarlyPerf_theta/cesm/tools/cprnc/cprnc + 8 + cobalt_theta + cseg + 64 + 64 + TRUE + + aprun + + -n $TOTALPES + -N $MAX_MPITASKS_PER_NODE + --cc depth -d $OMP_NUM_THREADS + -e OMP_STACKSIZE=64M + -e OMP_NUM_THREADS=$OMP_NUM_THREADS + + + + /opt/modules/default/init/perl.pm + /opt/modules/default/init/python.py + /opt/modules/default/init/sh + /opt/modules/default/init/csh + /opt/modules/default/bin/modulecmd perl + /opt/modules/default/bin/modulecmd python + module + module + + PrgEnv-intel + PrgEnv-cray + PrgEnv-gnu + intel + cce + cray-parallel-netcdf + cray-hdf5-parallel + pmi + cray-libsci + cray-mpich + cray-netcdf + cray-hdf5 + cray-netcdf-hdf5parallel + craype-mic-knl + craype + + + + PrgEnv-intel/6.0.3 + intel intel/17.0.0.098 + cray-libsci + + + + PrgEnv-cray/6.0.3 + cce cce/8.5.4 + + + PrgEnv-gnu/6.0.3 + gcc gcc/6.2.0 + + + papi/5.4.3.3 + craype craype/2.5.7 + + + cray-libsci/16.09.1 + + + cray-mpich/7.4.4 + + + cray-netcdf-hdf5parallel/4.4.1 + cray-hdf5-parallel/1.10.0 + cray-parallel-netcdf/1.7.0 + + + + + + NCAR IBM, os is Linux, 16 pes/node, batch system is LSF + .*yellowstone + LINUX + intel,pgi,gnu,intel15 + mpich2,pempi + /glade/scratch/$USER + $ENV{CESMDATAROOT}/inputdata + $ENV{CESMROOT}/lmwg + $CIME_OUTPUT_ROOT/archive/$CASE + $ENV{CESMDATAROOT}/ccsm_baselines + $ENV{CESMDATAROOT}/tools/cime/tools/cprnc/cprnc + /glade/apps/opt/perlmods/lib64/perl5:/glade/apps/opt/perlmods/share/perl5 + 8 + lsf + cseg + 30 + 15 + TRUE + + + mpirun.lsf + + + TARGET_PROCESSOR_LIST=AUTO_SELECT $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + $ENV{CESMDATAROOT}/tools/bin/launch + + + + unset MP_PE_AFFINITY; unset MP_TASK_AFFINITY; unset MP_CPU_BIND_LIST; $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + $ENV{CESMDATAROOT}/tools/bin/hybrid_launch + + + + $ENV{CESMDATAROOT}/tools/bin/mpirun + + -n $TOTALPES + -tpn {{ tasks_per_node }} + + + + /glade/apps/opt/lmod/lmod/init/perl + /glade/apps/opt/lmod/lmod/init/env_modules_python.py + /glade/apps/opt/lmod/lmod/init/csh + /glade/apps/opt/lmod/lmod/init/sh + /glade/apps/opt/lmod/lmod/libexec/lmod perl + /glade/apps/opt/lmod/lmod/libexec/lmod python + module + module + + + ncarenv/1.0 + ncarbinlibs/1.1 + perlmods + gmake/4.1 + python + all-python-libs + git + + + intel/15.0.3 + mkl/11.1.2 + trilinos/11.10.2 + esmf + + + esmf-7.0.0-ncdfio-mpi-g + + + esmf-7.0.0-defio-mpi-O + + + esmf-7.0.0-ncdfio-uni-g + + + esmf-7.0.0-ncdfio-uni-O + + + pgi/15.10 + + + gnu/5.2.0 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + netcdf/4.3.3.1 + + + netcdf-mpi/4.3.3.1 + pnetcdf/1.6.1 + + + ncarcompilers/1.0 + cmake/3.0.2 + all-python-libs + + + + 256M + yes + 2 + yes + us + unordered + yes + + + 0 + + + $MPILIB + + + + ${EXEROOT}/cesm.exe + >> cesm.log.$LID 2>&1 + + + diff --git a/config_pio.xml b/config_pio.xml new file mode 100644 index 0000000000..ffe58e936e --- /dev/null +++ b/config_pio.xml @@ -0,0 +1,344 @@ + + + + + + + + + + + $MAX_MPITASKS_PER_NODE + 60 + + + + + + + + + + pnetcdf + netcdf + + + + + + $PIO_VERSION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + netcdf + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mkDepends b/mkDepends new file mode 100755 index 0000000000..d9bcbdd87b --- /dev/null +++ b/mkDepends @@ -0,0 +1,452 @@ +#!/usr/bin/env perl + +# Generate dependencies in a form suitable for inclusion into a Makefile. +# The source filenames are provided in a file, one per line. Directories +# to be searched for the source files and for their dependencies are provided +# in another file, one per line. Output is written to STDOUT. +# +# For CPP type dependencies (lines beginning with #include), or for Fortran +# include dependencies, the dependency search is recursive. Only +# dependencies that are found in the specified directories are included. +# So, for example, the standard include file stdio.h would not be included +# as a dependency unless /usr/include were one of the specified directories +# to be searched. +# +# For Fortran module USE dependencies (lines beginning with a case +# insensitive "USE", possibly preceded by whitespace) the Fortran compiler +# must be able to access the .mod file associated with the .o file that +# contains the module. In order to correctly generate these dependencies +# the following restriction must be observed. +# +# ** All modules that are to be contained in the dependency list must be +# ** contained in one of the source files in the list provided on the command +# ** line. +# +# The reason for this restriction is that the modules have a nominal dependence +# on the .o files. If a module is being used for which the source code is not +# available (e.g., a module from a library), then adding a .o dependency for +# that module is a mistake because make will attempt to build that .o file, and +# will fail if the source code is not available. +# +# Original version: B. Eaton +# Climate Modelling Section, NCAR +# Feb 2001 +# +# ChangeLog: +# ----------------------------------------------------------------------------- +# Modifications to Brian Eaton's original to relax the restrictions on +# source file name matching module name and only one module per source +# file. Also added a new "-d depfile" option which allows an additional +# file to be added to every dependence. +# +# +# Tom Henderson +# Global Systems Division, NOAA/OAR +# Mar 2011 +# ----------------------------------------------------------------------------- +# Several updates: +# +# - Remove limitation that modules cannot be named "procedure". +# +# - Allow optional "::" in use statement (Fortran 2003). +# +# - Instead of having .o files depend on other .o files directly, +# have them depend indirectly through the .mod files. This allows +# the compiler to have discretion over whether to update a .mod, +# and prevents cascading recompilation when it does not. +# +# +# Sean Santos +# CESM Software Engineering Group, NCAR +# Mar 2013 +# ----------------------------------------------------------------------------- +# More updates: +# +# - Restore ability to recognize .mod files in the path, if there's no source +# file that provides the same module. +# +# - Allow "non_intrinsic" keyword (Fortran 2003). +# +# Sean Santos +# CESM Software Engineering Group, NCAR +# Mar 2013 +# ----------------------------------------------------------------------------- + + +use Getopt::Std; +use File::Basename; + +# Check for usage request. +@ARGV >= 2 or usage(); + +# Process command line. +my %opt = (); +getopts( "t:wd:m:", \%opt ) or usage(); +my $filepath_arg = shift() or usage(); +my $srcfile_arg = shift() or usage(); +@ARGV == 0 or usage(); # Check that all args were processed. + +my $obj_dir = ""; +if ( defined $opt{'t'} ) { $obj_dir = $opt{'t'}."/"; } + +my $additional_file = ""; +if ( defined $opt{'d'} ) { $additional_file = $opt{'d'}; } + +my $mangle_scheme = "lower"; +if ( defined $opt{'m'} ) { $mangle_scheme = $opt{'m'}; } + +open(FILEPATH, $filepath_arg) or die "Can't open $filepath_arg: $!\n"; +open(SRCFILES, $srcfile_arg) or die "Can't open $srcfile_arg: $!\n"; + +# Make list of paths to use when looking for files. +# Prepend "." so search starts in current directory. This default is for +# consistency with the way GNU Make searches for dependencies. +my @file_paths = ; +close(FILEPATH); +chomp @file_paths; +unshift(@file_paths,'.'); +foreach $dir (@file_paths) { # (could check that directories exist here) + $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name + ($dir) = glob $dir; # Expand tildes in path names. +} + +# Make list of files containing source code. +my @src = ; +close(SRCFILES); +chomp @src; + +my %module_files = (); + +# Attempt to parse each file for /^\s*module/ and extract module names +# for each file. +my ($f, $name, $path, $suffix, $mod); +my @suffixes = ('\.[fF]90', '\.[fF]','\.F90\.in' ); +foreach $f (@src) { + ($name, $path, $suffix) = fileparse($f, @suffixes); + # find the file in the list of directorys (in @file_paths) + my $file_path = find_file($f); + open(FH, $file_path) or die "Can't open $file_path: $!\n"; + while ( ) { + # Search for module definitions. + if ( /^\s*MODULE\s+(\w+)\s*(\!.*)?$/i ) { + ($mod = $1) =~ tr/A-Z/a-z/; + if ( defined $module_files{$mod} ) { + die "Duplicate definitions of module $mod in $module_files{$mod} and $name: $!\n"; + } + $module_files{$mod} = $name; + } + } + close( FH ); +} + +# Now make a list of .mod files in the file_paths. If a source dependency +# can't be found based on the module_files list above, then maybe a .mod +# module dependency can if the mod file is visible. +my %trumod_files = (); +my ($dir); +my ($f, $name, $path, $suffix, $mod); +# This might not be clear: we want to mangle a "\" so that it will escape +# the "." in .mod or .MOD +my @suffixes = (mangle_modfile("\\")); +foreach $dir (@file_paths) { + # Similarly, this gets us $dir/*.mod or $dir/*.MOD + @filenames = (glob("$dir/".mangle_modfile("*"))); + foreach $f (@filenames) { + ($name, $path, $suffix) = fileparse($f, @suffixes); + ($mod = $name) =~ tr/A-Z/a-z/; + $trumod_files{$mod} = $name; + } +} + +#print STDERR "\%module_files\n"; +#while ( ($k,$v) = each %module_files ) { +# print STDERR "$k => $v\n"; +#} + +# Find module and include dependencies of the source files. +my ($file_path, $rmods, $rincs); +my %file_modules = (); +my %file_includes = (); +my @check_includes = (); +my %modules_used = (); +foreach $f ( @src ) { + + # Find the file in the seach path (@file_paths). + unless ($file_path = find_file($f)) { + if (defined $opt{'w'}) {print STDERR "$f not found\n";} + next; + } + + # Find the module and include dependencies. + ($rmods, $rincs) = find_dependencies( $file_path ); + + # Remove redundancies (a file can contain multiple procedures that have + # the same dependencies). + $file_modules{$f} = rm_duplicates($rmods); + $file_includes{$f} = rm_duplicates($rincs); + + # Make a list of all include files. + push @check_includes, @{$file_includes{$f}}; +} + +print STDERR "\%file_modules\n"; +while ( ($k,$v) = each %file_modules ) { + print STDERR "$k => @$v\n"; +} +print STDERR "\%file_includes\n"; +while ( ($k,$v) = each %file_includes ) { + print STDERR "$k => @$v\n"; +} +print STDERR "\@check_includes\n"; +print STDERR "@check_includes\n"; + +# Find include file dependencies. +my %include_depends = (); +while (@check_includes) { + $f = shift @check_includes; + if (defined($include_depends{$f})) { next; } + + # Mark files not in path so they can be removed from the dependency list. + unless ($file_path = find_file($f)) { + $include_depends{$f} = -1; + next; + } + + # Find include file dependencies. + ($rmods, $include_depends{$f}) = find_dependencies($file_path); + + # Add included include files to the back of the check_includes list so + # that their dependencies can be found. + push @check_includes, @{$include_depends{$f}}; + + # Add included modules to the include_depends list. + if ( @$rmods ) { push @{$include_depends{$f}}, @$rmods; } +} + +#print STDERR "\%include_depends\n"; +#while ( ($k,$v) = each %include_depends ) { +# print STDERR (ref $v ? "$k => @$v\n" : "$k => $v\n"); +#} + +# Remove include file dependencies that are not in the Filepath. +my $i, $ii; +foreach $f (keys %include_depends) { + + unless (ref $include_depends{$f}) { next; } + $rincs = $include_depends{$f}; + unless (@$rincs) { next; } + $ii = 0; + $num_incs = @$rincs; + for ($i = 0; $i < $num_incs; ++$i) { + if ($include_depends{$$rincs[$ii]} == -1) { + splice @$rincs, $ii, 1; + next; + } + ++$ii; + } +} + +# Substitute the include file dependencies into the %file_includes lists. +foreach $f (keys %file_includes) { + my @expand_incs = (); + + # Initialize the expanded %file_includes list. + my $i; + unless (@{$file_includes{$f}}) { next; } + foreach $i (@{$file_includes{$f}}) { + push @expand_incs, $i unless ($include_depends{$i} == -1); + } + unless (@expand_incs) { + $file_includes{$f} = []; + next; + } + + # Expand + for ($i = 0; $i <= $#expand_incs; ++$i) { + push @expand_incs, @{ $include_depends{$expand_incs[$i]} }; + } + + $file_includes{$f} = rm_duplicates(\@expand_incs); +} + +#print STDERR "expanded \%file_includes\n"; +#while ( ($k,$v) = each %file_includes ) { +# print STDERR "$k => @$v\n"; +#} + +# Print dependencies to STDOUT. + +print "# Declare all module files used to build each object.\n"; + +foreach $f (sort keys %file_modules) { + my $file; + if($f =~ /\.F90\.in$/){ + $f =~ /(.+)\.F90\.in/; + $file = $1; + }else{ + $f =~ /(.+)\./; + $file = $1; + } + $target = $obj_dir."$file.o"; + print "$target : $f @{$file_modules{$f}} @{$file_includes{$f}} $additional_file \n"; +} + +print "# The following section relates each module to the corresponding file.\n"; +$target = mangle_modfile("%"); +print "$target : \n"; +print "\t\@\:\n"; + +foreach $mod (sort keys %modules_used) { + my $mod_fname = $obj_dir.mangle_modfile($mod); + my $obj_fname = $obj_dir.$module_files{$mod}.".o"; + print "$mod_fname : $obj_fname\n"; + +} + +#-------------------------------------------------------------------------------------- + +sub find_dependencies { + + # Find dependencies of input file. + # Use'd Fortran 90 modules are returned in \@mods. + # Files that are "#include"d by the cpp preprocessor are returned in \@incs. + + # Check for circular dependencies in \@mods. This type of dependency + # is a consequence of having multiple modules defined in the same file, + # and having one of those modules depend on the other. + + my( $file ) = @_; + my( @mods, @incs ); + + open(FH, $file) or die "Can't open $file: $!\n"; + + # Construct the makefile target associated with this file. This is used to + # check for circular dependencies. + my ($name, $path, $suffix, $target); + my @suffixes = ('\.[fF]90', '\.[fF]','\.F90\.in' ); + ($name, $path, $suffix) = fileparse($file, @suffixes); + $target = "$name.o"; + my $include; + while ( ) { + # Search for "#include" and strip filename when found. + if ( /^#include\s+[<"](.*)[>"]/ ) { + $include = $1; + } + # Search for Fortran include dependencies. + elsif ( /^\s*include\s+['"](.*)['"]/ ) { #" for emacs fontlock + $include = $1; + } + if(defined($include)){ + if($include =~ /shr_assert.h/){ + push @mods, "$obj_dir".mangle_modfile("shr_assert_mod"); + } + push @incs, $include; + undef $include; + } + # Search for module dependencies. + elsif ( /^\s*USE(?:\s+|\s*\:\:\s*|\s*,\s*non_intrinsic\s*\:\:\s*)(\w+)/i ) { + # Return dependency in the form of a .mod file + ($module = $1) =~ tr/A-Z/a-z/; + if ( defined $module_files{$module} ) { + # Check for circular dependency + unless ("$module_files{$module}.o" eq $target) { + $modules_used{$module} = (); + push @mods, "$obj_dir".mangle_modfile($module); + } + } + # If we already have a .mod file around. + elsif ( defined $trumod_files{$module} ) { + push @mods, "$obj_dir".mangle_modfile($trumod_files{$module}); + } + } + } + close( FH ); + return (\@mods, \@incs); +} + +#-------------------------------------------------------------------------------------- + +sub find_file { + +# Search for the specified file in the list of directories in the global +# array @file_paths. Return the first occurance found, or the null string if +# the file is not found. + + my($file) = @_; + my($dir, $fname); + + foreach $dir (@file_paths) { + $fname = "$dir/$file"; + if ( -f $fname ) { return $fname; } + } + return ''; # file not found +} + +#-------------------------------------------------------------------------------------- + +sub rm_duplicates { + +# Return a list with duplicates removed. + + my ($in) = @_; # input arrary reference + my @out = (); + my $i; + my %h = (); + foreach $i (@$in) { + $h{$i} = ''; + } + @out = keys %h; + return \@out; +} + +#-------------------------------------------------------------------------------------- + +sub mangle_modfile { + +# Return the name of the module file corresponding +# to a given module. + + my ($mod) = @_; + my $fname; + + if ($mangle_scheme eq "lower") { + ($fname = $mod) =~ tr/A-Z/a-z/; + $fname .= ".mod"; + } elsif ($mangle_scheme eq "upper") { + ($fname = $mod) =~ tr/a-z/A-Z/; + $fname .= ".MOD"; + } else { + die "Unrecognized mangle_scheme!\n"; + } + + return $fname; + +} + +#-------------------------------------------------------------------------------------- + +sub usage { + ($ProgName = $0) =~ s!.*/!!; # name of program + die <; + close( FILEPATH ); +} else { + @paths = (); +} +chomp @paths; +unshift(@paths, '.'); +foreach $dir (@paths) { # (could check that directories exist here) + $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name + ($dir) = glob $dir; # Expand tildes in path names. +} + +# Loop through the directories and add each filename as a hash key. This +# automatically eliminates redunancies. +%src = (); +foreach $dir (@paths) { + @filenames = (glob("$dir/*.[Ffc]"), glob("$dir/*.[Ff]90"), glob("$dir/*.cpp")); + foreach $filename (@filenames) { + $filename =~ s!.*/!!; # remove part before last slash + $src{$filename} = 1; + } + @templates = glob("$dir/*.F90.in"); + foreach $filename (@templates) { + $filename =~ s!.*/!!; # remove part before last slash + my $dfile = $filename; + $dfile =~ s/\.in//; + delete $src{$dfile} if(defined $src{$dfile}); + $src{$filename} = 1; + } +} + +my @srcfiles; +my $foundcnt=0; +my $writenew=1; +if(-e "Srcfiles"){ # file already exists, do not update if no changes are required + open(SRC,"Srcfiles"); + @srcfiles = ; + close(SRC); + $writenew=0; + foreach $file (@srcfiles){ + chomp $file; + if($src{$file}){ + $src{$file}=0; + }else{ + $writenew=1; # A srcfile was removed + last; + } + + } + foreach $file (keys %src){ + if($src{$file} == 1){ + $writenew=1; # A srcfile was added + last; + } + } +} + +if($writenew==1){ + open(SRC,"> Srcfiles") or die "Can't open Srcfiles\n"; + + foreach $file ( sort keys %src ) { + print SRC "$file\n"; + } + + close( SRC ); +} +#-------------------------------------------------------------------------------------- + +sub usage { + ($ProgName = $0) =~ s!.*/!!; # name of program + die < {0} +""".format(os.path.basename(args[0])), + description=description, + formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("--caseroot", + help="Case directory to build") + + parser.add_argument("--skip-preview-namelist", action="store_true", + help="Skip calling preview-namelist during case.run") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + if args.skip_preview_namelist is None: + args.skip_preview_namelist = False + + return args.caseroot, args.skip_preview_namelist + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + sys.argv.extend([] if "ARGS_FOR_SCRIPT" not in os.environ else os.environ["ARGS_FOR_SCRIPT"].split()) + + caseroot, skip_pnl = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_run(case, skip_pnl=skip_pnl) + + sys.exit(0 if success else 1) + +if __name__ == "__main__": + _main_func(__doc__) diff --git a/template.case.test b/template.case.test new file mode 100755 index 0000000000..340e161b94 --- /dev/null +++ b/template.case.test @@ -0,0 +1,75 @@ +#!/usr/bin/env python +{{ batchdirectives }} +""" +This is the system test submit script for CIME. This should only ever be called +by case.submit when on batch system. This script only exists as a way of providing +batch directives. Use case.submit from the command line to run your case. +""" +import os, sys +os.chdir( '{{ caseroot }}') + +_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * + +from CIME.case_test import case_test +from CIME.case import Case + +import argparse, doctest + +############################################################################### +def parse_command_line(args, description): +############################################################################### + parser = argparse.ArgumentParser( + usage="""\n%s [] [--verbose] +OR +%s --help +OR +%s --test + +\033[1mEXAMPLES:\033[0m + \033[1;32m# case.test SMS\033[0m + > %s +""" % ((os.path.basename(args[0]), ) * 4), + +description=description, + +formatter_class=argparse.ArgumentDefaultsHelpFormatter +) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("testname", nargs="?",default=None, + help="Name of the test to run, default is set in TESTCASE in env_test.xml") + + parser.add_argument("--caseroot", + help="Case directory to build") + + parser.add_argument("--reset", action="store_true", + help="Reset the case to its original state as defined by config_tests.xml") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + return args.caseroot, args.testname, args.reset + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + sys.argv.extend([] if "ARGS_FOR_SCRIPT" not in os.environ else os.environ["ARGS_FOR_SCRIPT"].split()) + + caseroot, testname, reset = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_test(case, testname, reset) + + sys.exit(0 if success else 1) + +if (__name__ == "__main__"): + _main_func(__doc__) diff --git a/template.st_archive b/template.st_archive new file mode 100755 index 0000000000..4ed2f2023c --- /dev/null +++ b/template.st_archive @@ -0,0 +1,79 @@ +#!/usr/bin/env python +# Batch system directives +{{ batchdirectives }} + +""" +template to create a case short term archiving script. This should only ever be called +by case.submit when on batch system. This script only exists as a way of providing +batch directives. Use case.submit from the command line to run your case. +""" + +import sys, os, time +os.chdir( '{{ caseroot }}') + +_LIBDIR = os.path.join("{{ cimeroot }}", "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * +from CIME.case import Case +from CIME.case_st_archive import case_st_archive + +logger = logging.getLogger(__name__) + + +############################################################################### +def parse_command_line(args, description): +############################################################################### + + parser = argparse.ArgumentParser( + usage="""\n{0} [--verbose] +OR +{0} --help +OR +{0} --test + +\033[1mEXAMPLES:\033[0m + \033[1;32m# case.run SMS\033[0m + > {0} +""".format(os.path.basename(args[0])), + +description=description, + +formatter_class=argparse.ArgumentDefaultsHelpFormatter +) + + CIME.utils.setup_standard_logging_options(parser) + + parser.add_argument("--caseroot", default=os.getcwd(), + help="Case directory to build") + + parser.add_argument("--no-incomplete-logs", default=False, action="store_true", + help="Whether to archive logs which have been completed or not") + + parser.add_argument("--copy-only", default=False, action="store_true", + help="Copy instead of move the files to be archived") + + args = CIME.utils.parse_args_and_handle_standard_logging_options(args, parser) + + if args.caseroot is not None: + os.chdir(args.caseroot) + + return args.caseroot, args.no_incomplete_logs, args.copy_only + +############################################################################### +def _main_func(description): +############################################################################### + if ("--test" in sys.argv): + test_results = doctest.testmod(verbose=True) + sys.exit(1 if test_results.failed > 0 else 0) + + caseroot, no_incomplete_logs, copy_only = parse_command_line(sys.argv, description) + with Case(caseroot, read_only=False) as case: + success = case_st_archive(case, archive_incomplete_logs=not no_incomplete_logs, copy_only=copy_only) + + sys.exit(0 if success else 1) + +############################################################################### + +if __name__ == "__main__": + _main_func(__doc__) diff --git a/userdefined_laptop_template/README.md b/userdefined_laptop_template/README.md new file mode 100644 index 0000000000..1a0e03b663 --- /dev/null +++ b/userdefined_laptop_template/README.md @@ -0,0 +1,131 @@ +Building CIME on an UNSUPPORTED local machine +--------------------------------------------- + +These directions are for a Mac OS X 10.9 or 10.10 laptop using +homebrew or macports to install the required software. The procedure +is similar for a linux workstation or cluster, you will just use +different package management tools to install the third party +libraries. + +Setup +===== + + - install xcode, including the command line tools. Failure to + install the command line tools is the most likely cause if you + get an error about the compilers not being able to create + executables. + + - install third party libraries from homebrew or macports. + + - home brew + + Install science tap : + + brew install gcc --without-multilib cmake mpich hdf5 --enable-fortran netcdf --enable-fortran + + + - macports + + sudo port install mpich +gcc48 hdf5-18 +mpich netcdf-fortran +gcc48 +mpich cmake + + Note: If you see an error while running create_newcase that + indicates perl can't find XML::LibXML, you may need to install + p5-xml-libxml as well. + + + - Some of the shell scripts used by cesm hard code "gmake" instead + of using the GMAKE variable from env_build.xml. To work around + this, you should install gnu make, or simply create a link from + make to gmake in you path. + + mkdir -p ${HOME}/local/bin + ln -s `whereis make` ${HOME}/local/bin/gmake + cat >> ${HOME}/.bashrc < + + + + + + -DFORTRANUNDERSCORE -DNO_R16 + + + -fopenmp + + + /usr/local/bin/gfortran + /usr/bin/cc + /usr/bin/c++ + /usr/local/bin/mpif90 + /usr/local/bin/mpicc + /usr/local/bin/mpicxx + FORTRAN + TRUE + /usr/local + + $(shell $(NETCDF_PATH)/bin/nf-config --flibs) -framework Accelerate + + + + + diff --git a/userdefined_laptop_template/config_machines.xml b/userdefined_laptop_template/config_machines.xml new file mode 100644 index 0000000000..2d1005c5d0 --- /dev/null +++ b/userdefined_laptop_template/config_machines.xml @@ -0,0 +1,33 @@ + + + + + __USEFUL_DESCRIPTION__ + something.matching.your.machine.hostname + Darwin + gnu + mpich + $ENV{HOME}/projects/scratch + $ENV{HOME}/projects/cesm-inputdata + $ENV{HOME}/projects/ptclm-data + $ENV{HOME}/projects/scratch/archive/$CASE + $ENV{HOME}/projects/baselines + $CIMEROOT/tools/cprnc/build/cprnc + 4 + none + __YOUR_NAME_HERE__ + 4 + 4 + + mpiexec_mpt + + -np $TOTALPES + --prepend-rank + + + + + + diff --git a/userdefined_laptop_template/config_pes.xml b/userdefined_laptop_template/config_pes.xml new file mode 100644 index 0000000000..0464137703 --- /dev/null +++ b/userdefined_laptop_template/config_pes.xml @@ -0,0 +1,31 @@ + + + + + + $MAX_TASKS_PER_NODE 1 0 + + + + 1 1 0 + + + + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + 1 1 0 + + + 2 1 + 2 + + + + From 0c1811e73c72dfcb7e1837f7da574904187136ca Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 10 Nov 2017 12:56:53 -0700 Subject: [PATCH 5/6] add optional COST_PER_NODE --- config_machines.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config_machines.xml b/config_machines.xml index cae0e21d67..c9099d2b88 100644 --- a/config_machines.xml +++ b/config_machines.xml @@ -572,6 +572,7 @@ cseg 256 64 + 68 srun @@ -1843,6 +1844,7 @@ cseg 30 15 + 16 TRUE