From 50b77c0217a5d9c5e876a28d01b7234662daa295 Mon Sep 17 00:00:00 2001 From: johnhg Date: Fri, 7 May 2021 19:28:04 -0600 Subject: [PATCH] Feature 1778 debug (#1785) * Per #1778, please see https://github.com/dtcenter/MET/issues/1778#issuecomment-834800531 for details. Basically, when doing development, compile with the -g debug option. Otherwise, remove it by default. * Per #1778, update stale URL's in the README and configure.ac file. Also, change the default MET version from 8.1 to development. --- met/README | 8 ++++---- met/configure.ac | 13 ++++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/met/README b/met/README index 3b0c6edba8..91965d9cd5 100644 --- a/met/README +++ b/met/README @@ -20,8 +20,8 @@ This is the main directory for the Model Evaluation Tools source code release. ================================================================================ For questions, please: -- Refer to the MET User's Guide in the /doc sub-directory. -- Refer to the MET website: http://www.dtcenter.org/met/users +- Refer to the MET User's Guide: https://met.readthedocs.io/en/latest +- Refer to the MET website: http://dtcenter.org/community-code/model-evaluation-tools-met - Send mail to met_help@ucar.edu. Dependencies @@ -52,7 +52,7 @@ Dependencies - It is suggested that the following tools be used in conjunction with MET: - Unified Post-Processor - - http://www.dtcenter.org/wrf-nmm/users + - http://dtcenter.org/community-code/unified-post-processor-upp NOTE: The required libraries should be compiled with the same set of compilers to be used in compiling MET. @@ -63,7 +63,7 @@ How to compile and run? For more detailed instructions on building MET and for a list of supported platforms and compilers, please refer to the MET User's Guide in the doc/ sub-directory, or the MET Online Tutorial: - http://www.dtcenter.org/met/users/support/online_tutorial + http://dtcenter.org/community-code/model-evaluation-tools-met/online-tutorial - Set the $CXX and $F77 environment variables to specify the C++ and FORTRAN compilers to be used. If not set, configure will search for compilers and the diff --git a/met/configure.ac b/met/configure.ac index 104612c287..dac13bfa64 100644 --- a/met/configure.ac +++ b/met/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([MET], [m4_esyscmd_s(echo ${MET_BUILD_VERSION:-8.1})], [met_help@ucar.edu], [], [http://www.dtcenter.org/met/users]) +AC_INIT([MET], [m4_esyscmd_s(echo ${MET_BUILD_VERSION:-development})], [met_help@ucar.edu], [], [http://dtcenter.org/community-code/model-evaluation-tools-met]) AC_CONFIG_SRCDIR([src/tools/tc_utils/tc_dland/tc_dland.cc]) AC_CONFIG_HEADERS([config.h]) @@ -1041,11 +1041,14 @@ CPPFLAGS=$CPPFLAGS' -DMET_BASE="\"$(pkgdatadir)\""' AC_SUBST(FC_LIBS, [-lgfortran]) -# The CXXFLAGS default to "-O2 -g". The optimization is causing -# problems so just set it to "-g" if the user hasn't overridden it -# themselves. +# For GNU compilers, CFLAGS, CXXFLAGS, and FFLAGS default to "-O2 -g". +# The CXXFLAGS "-O2" optimization has caused problems in the past. +# For Intel compilers, "-g" slows down runtimes considerably (MET #1778). +# For development, retain the "-g" option. Otherwise, discard it. -: ${CXXFLAGS="-g"} +AM_COND_IF([ENABLE_DEVELOPMENT], [: ${CFLAGS="-g -O2"}], [: ${CFLAGS="-O2"}]) +AM_COND_IF([ENABLE_DEVELOPMENT], [: ${CXXFLAGS="-g"} ], [: ${CXXFLAGS=""}] ) +AM_COND_IF([ENABLE_DEVELOPMENT], [: ${FFLAGS="-g -O2"}], [: ${FFLAGS="-O2"}]) # Checks for programs.