From af38cc95b6e3d87980871ad6498069dc47b494fc Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Sat, 25 Feb 2017 06:08:10 -0700 Subject: [PATCH] fix an issue with nag debug and add ARCHIVE_SPEC_FILE to acme config_files.xml --- cime_config/acme/config_files.xml | 24 ++++++++++++ cime_config/cesm/machines/Makefile | 61 +++++++++++++++--------------- 2 files changed, 55 insertions(+), 30 deletions(-) diff --git a/cime_config/acme/config_files.xml b/cime_config/acme/config_files.xml index bae4be6ab1b..5de576173c3 100644 --- a/cime_config/acme/config_files.xml +++ b/cime_config/acme/config_files.xml @@ -120,6 +120,30 @@ file containing specification of all pe-layouts for primary component (for documentation only - DO NOT EDIT) $CIMEROOT/cime_config/xml_schemas/config_pes.xsd + + char + + $CIMEROOT/cime_config/acme/config_archive.xml + $CIMEROOT/driver_cpl/cime_config/config_archive.xml + + $CIMEROOT/components/data_comps/drof/cime_config/config_archive.xml + $CIMEROOT/components/data_comps/datm/cime_config/config_archive.xml + $CIMEROOT/components/data_comps/dice/cime_config/config_archive.xml + $CIMEROOT/components/data_comps/dlnd/cime_config/config_archive.xml + $CIMEROOT/components/data_comps/docn/cime_config/config_archive.xml + $CIMEROOT/components/data_comps/dwav/cime_config/config_archive.xml + + + + case_last + env_case.xml + file containing specification of archive files for each component (for documentation only - DO NOT EDIT) + $CIMEROOT/cime_config/xml_schemas/config_archive.xsd + char diff --git a/cime_config/cesm/machines/Makefile b/cime_config/cesm/machines/Makefile index e9a25c401b4..9d26fadb3d7 100644 --- a/cime_config/cesm/machines/Makefile +++ b/cime_config/cesm/machines/Makefile @@ -363,6 +363,35 @@ endif INCLDIR += -I$(INSTALL_SHAREDPATH)/include -I$(CIMEROOT)/share/csm_share/shr \ -I$(CIMEROOT)/share/csm_share/include -I$(CIMEROOT)/share/shr_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 # @@ -389,8 +418,8 @@ FFLAGS_NOOPT += $(FPPDEFS) ifeq ($(findstring -cosp,$(CAM_CONFIG_OPTS)),-cosp) -# The following is for the COSP simulator code: -COSP_LIBDIR:=$(EXEROOT)/atm/obj/cosp + # The following is for the COSP simulator code: + COSP_LIBDIR:=$(EXEROOT)/atm/obj/cosp endif ifeq ($(MODEL),cam) @@ -433,34 +462,6 @@ else ifeq ($(NETCDF_SEPARATE), true) SLIBS += -L$(LIB_NETCDF_FORTRAN) -L$(LIB_NETCDF_C) -lnetcdff -lnetcdf endif - -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 - ifdef LIB_PNETCDF SLIBS += -L$(LIB_PNETCDF) -lpnetcdf endif