dtcenter/MET

Enhancement for next MET and METPLUS Release: Adding Exports to Log File

Closed this issue · 3 comments

Replace italics below with details for this issue.

Describe the Enhancement

Currently when running compile.sh the script exports these values in lines 336-347

export CC
export CXX
export FC
export F77
export F90

echo "export  CC=${CC}"
echo "export CXX=${CXX}"
echo "export  FC=${FC}"
echo "export F77=${F77}"
echo "export F90=${F90}"
echo

I fell that the MET_PYTHON_CC and MET_PYTHON_LD exports should be added to this echo command so that they are somewhere in the default log file. It seems that several errors are caused by these two exports not being done properly so by having them exported and echoed ,for anyone that keeps a log file of the compile script, will help future debugging and error finding.

Time Estimate

Estimate the amount of work required here.
5 mins

Hi @HathewayWill. Thanks for this suggested enhancement. I believe what you are looking for already exists. Please take a look at this snippet from a compile_MET_all.log file that you created on Wed Jul 19 2023 from the installation of MET11.1, where you can see the following output:

Compiling MET at Wed Jul 19 17:30:22 PDT 2023
MET Configuration settings...
export MET_FONT_DIR=/Users/workhorse/DTC_11.1/MET-11.1.0/fonts
export MET_GRIB2CLIB=/Users/workhorse/DTC_11.1/MET-11.1.0/external_libs/lib
export MET_GSL=/Users/workhorse/DTC_11.1/MET-11.1.0/external_libs
export MET_PYTHON_CC=-I/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -I/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-\
common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
export MET_TARBALL=/Users/workhorse/DTC_11.1/MET-11.1.0/tar_files/v11.1.0.tar.gz
export MET_PYTHON_BIN_EXE=/usr/local/bin/python3
export MET_GRIB2CINC=/Users/workhorse/DTC_11.1/MET-11.1.0/external_libs/include
export MET_NETCDF=/Users/workhorse/DTC_11.1/MET-11.1.0/external_libs
export MET_PYTHON=/usr/local
export MET_PYTHON_LD=-L/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin -lpython3.10 -ldl -framework CoreFoundation -L/usr/local/lib -lpython3.10
export MET_HDF5=/Users/workhorse/DTC_11.1/MET-11.1.0/external_libs
export MET_SUBDIR=/Users/workhorse/DTC_11.1/MET-11.1.0
export MET_BUFRLIB=/Users/workhorse/DTC_11.1/MET-11.1.0/external_libs/lib

Note that all of the MET_ variables are printed before MET is compiled. If your compilation script errors out prior to the compilation of MET those variables will not be printed, however, those variables are not used in the compilation of any of the external libraries, so they are irrelevant until MET gets compiled.

Please also note that the values for MET_PYTHON_CC and MET_PYTHON_LD are also present in the config.log file when compiling MET. Please see the snippet from the config.log file that you sent to me at the same time as the compile_MET_all.log referenced above.

MET_PYTHON_CC='-I/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -I/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common\
 -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
MET_PYTHON_LD='-L/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin -lpython3.10 -ldl -framework CoreFoundation -L/usr/local/lib -lpython3.10'

Please let us know if this satisfies the enhancement you were hoping for.

It does

Thank you @HathewayWill. I will close this issue.