[Met_help] [rt.rap.ucar.edu #95051] History for Issue compiling MET-9.0.1
Julie Prestopnik via RT
met_help at ucar.edu
Wed Apr 29 10:01:07 MDT 2020
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Hi, I looked in all the places listed<https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk> first and did some of Googling, but can't find the solution to this one.
I'm compiling met-9.0.1 using PGI-CE version 19.10-0. I am using the sample compile_MET_all.sh script to install into /usr/local/src/MET. The external_libs all compile fine, MET's configure runs fine, but it fails to compile met-9.0.1/src/libcode/vx_nc_obs:
Making all in vx_nc_obs
make[4]: Entering directory `/usr/local/src/MET/met-9.0.1/src/libcode/vx_nc_obs'
source='nc_obs_util.cc' object='libvx_nc_obs_a-nc_obs_util.o' libtool=no \
DEPDIR=.deps depmode=pgcc /bin/sh ../../../depcomp \
/usr/local/pgi/linux86-64/2019/bin/pgc++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/basic/vx_cal -I../../../sr
c/basic/vx_config -I../../../src/basic/vx_log -I../../../src/basic/vx_math -I../../../src/basic/vx_util -I../../../src/libcode/vx_afm -I../../../src/libcode/vx_analysis_util -I../../../src/libcode/vx_color -I../../../src/libcode/vx_data2d -I../../../src/libcode/vx_data2d_factory -I../../../src/libcode/vx_data2d_grib -I../../../src/libcode/vx_data2d_grib2 -I../../../src/libcode/vx_data2d_nccf -I../../../src/libcode/vx_data2d_nc_met -I../../../src/libcode/vx_data2d_nc_pinterp -I../../../src/libcode/vx_data2d_python -I../../../src/libcode/vx_python3_utils -I../../../src/libcode/vx_geodesy -I../../../src/libcode/vx_gis -I../../../src/libcode/vx_gnomon -I../../../src/libcode/vx_grid -I../../../src/libcode/vx_gsl_prob -I../../../src/libcode/vx_nav -I../../../src/libcode/vx_nc_obs -I../../../src/libcode/vx_nc_util -I../../../src/libcode/vx_pb_util -I../../../src/libcode/vx_plot_util -I../../../src/libcode/vx_ps -I../../../src/libcode/vx_pxm -I../../../src/libcode/vx_render -I../../!
../src/libcode/vx_regrid -I../../../src/libcode/vx_shapedata -I../../../src/libcode/vx_solar -I../../../src/libcode/vx_statistics -I../../../src/libcode/vx_stat_out -I../../../src/libcode/vx_summary -I../../../src/libcode/vx_time_series -I../../../src/libcode/vx_series_data -I../../../src/libcode/vx_tc_util -I/usr/local/src/MET/external_libs/include -I/usr/local/src/MET/external_libs/include -I/usr/local/src/MET/external_libs/include -I/usr/local/src/MET/external_libs/include -I../../basic/vx_log -I../../basic/vx_util -I/usr/local/src/anaconda3/include/python3.6m -I/usr/local/src/MET/external_libs/include -I/usr/local/src/MET/external_libs/include -I/usr/local/src/MET/external_libs/include -DBLOCK4 -DWITH_GRIB2 -DMET_BASE="\"/usr/local/src/MET/share/met\"" -c -o libvx_nc_obs_a-nc_obs_util.o `test -f 'nc_obs_util.cc' || echo './'`nc_obs_util.cc
"../../../src/basic/vx_config/config_file.h", line 83: warning: function
"Dictionary::lookup(std::string)" is hidden by "MetConfig::lookup" --
virtual function override intended?
const DictionaryEntry * lookup(const char * name);
^
"../../../src/basic/vx_config/config_file.h", line 85: warning: function
"Dictionary::lookup(std::string)" is hidden by "MetConfig::lookup" --
virtual function override intended?
const DictionaryEntry * lookup(const char * name, const ConfigObjectType expected_type);
^
"nc_obs_util.cc", line 670: internal error: assertion failed at:
"../src/statements.c", line 7953
return my_hdr_data;
^
1 catastrophic error detected in the compilation of "nc_obs_util.cc".
Compilation aborted.
pgc++-Fatal-/usr/local/pgi/linux86-64-nollvm/19.10/bin/pggpp1 TERMINATED by signal 6
Both external_libs/netcdf/netcdf-4.4.1.1/make_install.log and external_libs/netcdf/netcdf-cxx4-4.3.0/make_install.log show successful compilations.
I took a look at met-9.0.1/src/libcode/vx_nc_obs/nc_obs_util.cc, and nothing looked amiss, but I'm much better at Fortan than at C or C++.
There is no file named statements.c in the MET code or any of the external_libs (find | grep statements and locate statements.c return nothing).
I notice the flag -DMET_BASE="\"/usr/local/src/MET/share/met\"" is looking for a non-existent path, and even though /usr/local/src/MET/external_libs/share exists, /usr/local/src/MET/external_libs/share/met does not.
Searching using Google for "site:mailman.ucar.edu/pipermail/met_help my_hdr_data" or statements.c found no useful hits.
I've catted my version of the compile_MET_all.sh script (edited slightly to remove the module calls) and the my.compile script (used to set the variables) below - your gmail server rejected me trying to attach them.
Any hints?
# cat my.compile
#!/bin/csh -f
setenv TEST_BASE `pwd`
setenv MET_SUBDIR $TEST_BASE # will create met-9.0.1 inside this dir
setenv MET_TARBALL met-9.0.1.20200423.tar.gz
setenv COMPILER pgi_19.10
setenv PYTHON_MODULE python_3.6.9
setenv MET_PYTHON /usr/local/src/anaconda3/bin/python
#setenv MET_PYTHON_CC `python3-config --cflags`
#setenv MET_PYTHON_LD `python3-config --ldflags`
setenv MET_PYTHON_CC '-I/usr/local/src/anaconda3/include/python3.6m'
setenv MET_PYTHON_LD '-L/usr/local/src/anaconda3/lib/python3.6/config-3.6m-x86_64-linux-gnu -L/usr/local/src/anaconda3/lib -lpython3.6m -lpthread -ldl -lutil -lrt -lm'
setenv FC pgfortran
setenv F77 pgf77
setenv F90 pgfortran
setenv CC pgcc
setenv CXX pgc++
setenv FFLAGS '-tp=istanbul'
setenv CFLAGS '-tp=istanbul'
./compile_MET_all.sh >&! compile.out.`date +%Y-%m-%d`
# cat copile_met_all.sh
#!/bin/bash -l
echo "TEST_BASE = ${TEST_BASE? "ERROR: TEST_BASE must be set"}"
echo "COMPILER = ${COMPILER? "ERROR: COMPILER must be set"}"
echo "MET_SUBDIR = ${MET_SUBDIR? "ERROR: MET_SUBDIR must be set"}"
echo "MET_TARBALL = ${MET_TARBALL? "ERROR: MET_TARBALL must be set"}"
export LIB_DIR=${TEST_BASE}/external_libs
MET_DIR=${MET_SUBDIR}
TAR_DIR=${TEST_BASE}/tar_files
MET_TARBALL=${TAR_DIR}/${MET_TARBALL}
# Create directory for libraries
mkdir -p ${LIB_DIR}
# Check that tar files exist
if [ ! -e $TAR_DIR ]; then
echo "TAR File directory doesn't exist: ${TAR_DIR}"
exit 1
fi
# Update library linker path
export LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib:${MET_PYTHON}/lib:${LD_LIBRARY_PATH}
echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
# Constants
COMPILE_GSL=0
COMPILE_BUFRLIB=0
COMPILE_ZLIB=0
COMPILE_LIBPNG=0
COMPILE_JASPER=0
COMPILE_G2CLIB=0
COMPILE_HDF=0
COMPILE_HDFEOS=0
COMPILE_NETCDF=0
COMPILE_FREETYPE=0
COMPILE_CAIRO=0
COMPILE_MET=1
COMPILE_MET_PATCHES=0
if [ $COMPILE_MET_PATCHES -eq 1 ]; then
COMPILE_MET=1
fi
echo
echo "Compiling libraries into: ${LIB_DIR}"
if [ ! -e ${LIB_DIR}/include ]; then
mkdir ${LIB_DIR}/include
fi
if [ ! -e ${LIB_DIR}/lib ]; then
mkdir ${LIB_DIR}/lib
fi
# Load compiler version
COMPILER_FAMILY=` echo $COMPILER | cut -d'_' -f1`
COMPILER_VERSION=`echo $COMPILER | cut -d'_' -f2`
# echo "module load ${COMPILER_FAMILY}/${COMPILER_VERSION}"
# echo ${COMPILER_FAMILY}/${COMPILER_VERSION}
# module purge
# module load ${COMPILER_FAMILY}/${COMPILER_VERSION}
# if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
# module load craype
# module switch craype craype-sandybridge
# fi
if [ ${COMPILER_FAMILY} == "gnu" ]; then
export CC=`which gcc`
export CXX=`which g++`
export FC=`which gfortran`
export F77=`which gfortran`
export F90=`which gfortran`
elif [ ${COMPILER_FAMILY} == "pgi" ]; then
export CC=`which pgcc`
export CXX=`which pgc++`
export FC=`which pgf90`
export F77=`which pgf90`
export F90=`which pgf90`
elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[ ${COMPILER_FAMILY} == "ics" ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[ ${COMPILER_FAMILY} == "PrgEnv-intel" ]]; then
export CC=`which icc`
export CXX=`which icc`
export FC=`which ifort`
export F77=`which ifort`
export F90=`which ifort`
else
echo "ERROR: \${COMPILER} must start with gnu, intel, ics, ips, PrgEnv-intel, or pgi"
exit
fi
echo "export CC=${CC}"
echo "export CXX=${CXX}"
echo "export FC=${FC}"
echo "export F77=${F77}"
echo "export F90=${F90}"
# Load desired Python version
# PYTHON_NAME=` echo $PYTHON_MODULE | cut -d'_' -f1`
# PYTHON_VERSION_NUM=`echo $PYTHON_MODULE | cut -d'_' -f2`
# echo "module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}"
# echo ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
# module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
which python
python --version
# Compile GSL
if [ $COMPILE_GSL -eq 1 ]; then
if [ ${COMPILER_FAMILY} == "pgi" ]; then
vrs="1.11";
else
vrs="2.1";
fi
echo
echo "Compiling GSL_${vrs} at `date`"
mkdir -p ${LIB_DIR}/gsl
cd ${LIB_DIR}/gsl
rm -rf gsl*
tar -xf ${TAR_DIR}/gsl-${vrs}.tar.gz
cd gsl*
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
./configure --prefix=${LIB_DIR} > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
fi
# Compile BUFRLIB
if [ $COMPILE_BUFRLIB -eq 1 ]; then
vrs="v11.3.0";
echo
echo "Compiling BUFRLIB_${vrs} at `date`"
mkdir -p ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
cd ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
echo "cd `pwd`"
rm -rf *
tar -xf ${TAR_DIR}/BUFRLIB_`echo $vrs | sed 's/\./-/g'`.tar
# Copy custom preproc.sh script into here
#cp ${TAR_DIR}/preproc.sh_${vrs} preproc.sh
#./preproc.sh > make.log 2>&1
${CC} -c -DUNDERSCORE `./getdefflags_C.sh` *.c >> make.log 2>&1
# For GNU and Intel follow BUFRLIB11 instructions
if [[ ${COMPILER_FAMILY} == "gnu" ]]; then
${FC} -c -fno-second-underscore `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[ ${COMPILER_FAMILY} == "ics" ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[ ${COMPILER_FAMILY} == "PrgEnv-intel" ]]; then
${FC} -c `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
elif [[ ${COMPILER_FAMILY} == "pgi" ]]; then
${FC} -c -Mnosecond_underscore `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
fi
ar crv libbufr.a *.o >> make.log 2>&1
cp *.a ${LIB_DIR}/lib/.
fi
# Compile ZLIB using gcc, per Boi Vuong from NCO on 05/23/2019
if [ $COMPILE_ZLIB -eq 1 ]; then
echo
echo "Compiling ZLIB at `date`"
mkdir -p ${LIB_DIR}/zlib
cd ${LIB_DIR}/zlib
rm -rf zlib*
tar -xzf ${TAR_DIR}/zlib*.tar.gz
cd zlib*
echo "cd `pwd`"
# Store the original CC compiler
CC_SAVE=${CC}
echo "export CC=`which gcc`"
export CC=`which gcc`
echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
./configure --prefix=${LIB_DIR} > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
# Reset CC by to the original setting
echo "export CC=${CC_SAVE}"
export CC=${CC_SAVE}
fi
# Compile LIBPNG using gcc, per Boi Vuong from NCO on 05/23/2019
if [[ $COMPILE_LIBPNG -eq 1 && $HOST != ys* ]]; then
echo
echo "Compiling LIBPNG at `date`"
mkdir -p ${LIB_DIR}/libpng
cd ${LIB_DIR}/libpng
rm -rf libpng*
tar -xzf ${TAR_DIR}/libpng*.tar.gz
cd libpng*
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib CC=gcc CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1"
./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib CC=gcc CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
fi
# Compile JASPER using gcc, per Boi Vuong from NCO on 05/23/2019
if [ $COMPILE_JASPER -eq 1 ]; then
echo
echo "Compiling JASPER at `date`"
mkdir -p ${LIB_DIR}/jasper
cd ${LIB_DIR}/jasper
rm -rf jasper*
unzip ${TAR_DIR}/jasper*.zip > /dev/null 2>&1
cd jasper*
export CPPFLAGS="-I${LIB_DIR}/include"
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1"
./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
fi
# Compile G2CLIB
if [ $COMPILE_G2CLIB -eq 1 ]; then
echo
echo "Compiling G2CLIB at `date`"
mkdir -p ${LIB_DIR}/g2clib
cd ${LIB_DIR}/g2clib
rm -rf g2clib*
tar -xf ${TAR_DIR}/g2clib*.tar
cd g2clib*
cat makefile | \
sed -r 's/INC=.*/INC=-I${LIB_DIR}\/include -I${LIB_DIR}\/include\/jasper/g' | \
sed 's/CC=gcc/CC=${CC_COMPILER}/g' | \
sed 's/-D__64BIT__//g' \
> makefile_new
mv makefile_new makefile
export CC_COMPILER=${CC}
echo "cd `pwd`"
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
cp libg2c*.a ${LIB_DIR}/lib/libgrib2c.a
cp *.h ${LIB_DIR}/include/.
fi
# Compile HDF
# Depends on jpeg
# Edit 'mfhdf/hdiff/Makefile' as follows:
# From: LIBS = -ljpeg -lz
# To: LIBS = -ljpeg -lz -lm
if [ $COMPILE_HDF -eq 1 ]; then
echo
echo "Compiling HDF at `date`"
mkdir -p ${LIB_DIR}/hdf
cd ${LIB_DIR}/hdf
rm -rf HDF*
tar -xf ${TAR_DIR}/HDF4.2*.tar.gz
cd HDF*
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} --disable-netcdf --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log 2>&1"
./configure --prefix=${LIB_DIR} --disable-netcdf --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
cat mfhdf/hdiff/Makefile | sed 's/LIBS = -ljpeg -lz/LIBS = -ljpeg -lz -lm/g' > Makefile_NEW
mv Makefile_NEW mfhdf/hdiff/Makefile
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
fi
# Compile HDFEOS
# Depends on HDF
if [ $COMPILE_HDFEOS -eq 1 ]; then
echo
echo "Compiling HDFEOS at `date`"
mkdir -p ${LIB_DIR}/hdfeos
cd ${LIB_DIR}/hdfeos
rm -rf HDF-EOS*
tar -xzf ${TAR_DIR}/HDF-EOS*.tar.*
cd hdfeos
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} > configure.log 2>&1"
./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} --with-jpeg=${LIB_DIR} > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
cp include/*.h ${LIB_DIR}/include/.
fi
# Compile NetCDF
if [ $COMPILE_NETCDF -eq 1 ]; then
echo
echo "Compiling HDF5 at `date`"
mkdir -p ${LIB_DIR}/hdf5
cd ${LIB_DIR}/hdf5
rm -rf hdf5*
tar -xzf ${TAR_DIR}/hdf5*.tar.gz
cd hdf5*
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
echo
echo "Compiling NetCDF-C at `date`"
mkdir -p ${LIB_DIR}/netcdf
cd ${LIB_DIR}/netcdf
rm -rf netcdf*
unzip ${TAR_DIR}/netcdf-4*.zip > /dev/null 2>&1
cd netcdf-4*
export FC=''
export F90=''
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
echo
echo "Compiling NetCDF-CXX at `date`"
cd ${LIB_DIR}/netcdf
tar -xzf ${TAR_DIR}/netcdf-cxx*.tar.gz
cd netcdf-cxx*
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
fi
# Compile FREETYPE
if [ $COMPILE_FREETYPE -eq 1 ]; then
echo
echo "Compiling FREETYPE at `date`"
mkdir -p ${LIB_DIR}/freetype
cd ${LIB_DIR}/freetype
rm -rf freetype*
tar -xzf ${TAR_DIR}/freetype*.tar.gz
cd freetype*
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} --with-png=yes > configure.log 2>&1"
./configure --prefix=${LIB_DIR} --with-png=yes > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1 --with-zlib=${LIB_DIR} LDFLAGS=-L${LIB_DIR} CPPFLAGS=-I${LIB_DIR}"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
fi
# Compile CAIRO
if [ $COMPILE_CAIRO -eq 1 ]; then
echo
echo "Compiling pixman at `date`"
mkdir -p ${LIB_DIR}/pixman
cd ${LIB_DIR}/pixman
rm -rf pixman*
tar -xzf ${TAR_DIR}/pixman*.tar.gz
cd pixman*
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
./configure --prefix=${LIB_DIR} > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
echo
echo "Compiling CAIRO at `date`"
mkdir -p ${LIB_DIR}/cairo
cd ${LIB_DIR}/cairo
rm -rf cairo*
tar -xf ${TAR_DIR}/cairo*.tar*
cd cairo*
export PKG_CONFIG=`which pkg-config`
if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
export PKG_CONFIG_PATH=${LIB_DIR}/lib/pkgconfig/
fi
if [ ${COMPILER_FAMILY} == "ips" ]; then
export LD_LIBRARY_PATH=/usrx/local/prod/intel/2015UP06/lib/intel64:${LD_LIBRARY_PATH}
echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
export LDFLAGS="-shared-intel -L/${LIB_DIR}/lib -L/usrx/local/prod/intel/2018UP04/lib/intel64/"
export CPPFLAGS=-I/${LIB_DIR}/include
export CFLAGS=-I/usrx/local/prod/intel/2015UP06/include/intel64/
fi
echo "cd `pwd`"
echo "./configure --prefix=${LIB_DIR} ax_cv_c_float_words_bigendian=no LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1"
./configure --prefix=${LIB_DIR} ax_cv_c_float_words_bigendian=no LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
fi
# Compile MET
if [ $COMPILE_MET -eq 1 ]; then
echo
echo "Compiling MET at `date`"
cd ${MET_DIR}
echo "cd `pwd`"
rm -rf met*
tar -zxvf ${MET_TARBALL}
cd met*
echo "cd `pwd`"
if [ $COMPILE_MET_PATCHES -eq 1 ]; then
cp ${TAR_DIR}/met*_patches*.tar.gz .
tar -zxf met*_patches*.tar.gz
fi
export MET_NETCDF=${LIB_DIR}
export MET_BUFRLIB=${LIB_DIR}/lib
export MET_GSL=${LIB_DIR}
export MET_GRIB2C=${LIB_DIR}
export MET_HDF5=${LIB_DIR}
export MET_HDF=${LIB_DIR}
export MET_HDFEOS=${LIB_DIR}
#export MET_CAIROINC=${LIB_DIR}/include/cairo
#export MET_CAIROLIB=${LIB_DIR}/lib
#export MET_FREETYPEINC=${LIB_DIR}/include/freetype2
#export MET_FREETYPELIB=${LIB_DIR}/lib
export MET_FONT_DIR=${TEST_BASE}/fonts
export MET_PYTHON_LD=${MET_PYTHON_LD}
export MET_PYTHON_CC=${MET_PYTHON_CC}
export LDFLAGS="-Wl,--disable-new-dtags"
export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib"
export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib:${MET_NETCDF}/lib:${MET_PYTHON/lib}"
export CPPFLAGS=-I${LIB_DIR}/include
echo "MET Configuration settings..."
printenv | egrep "^MET_" | sed -r 's/^/export /g'
export OPT_ARGS=''
if [[ $COMPILER_FAMILY == "pgi" ]]; then
export OPT_ARGS="${OPT_ARGS} FFLAGS=-lpgf90"
fi
echo "cd `pwd`"
if [ -z ${PYTHON_MODULE_USE} ]; then
#echo "./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis --enable-mode_graphics --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1"
#./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis --enable-mode_graphics --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1
echo "./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1"
./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1
else
#echo "./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis --enable-mode_graphics --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log 2>&1"
#./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis --enable-mode_graphics --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log 2>&1
echo "./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log 2>&1"
./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log 2>&1
fi
ret=$?
if [ $ret != 0 ]; then
echo "configure returned with non-zero ($ret) status"
exit 1
fi
echo "make > make.log 2>&1"
make > make.log 2>&1
ret=$?
if [ $ret != 0 ]; then
echo "make returned with non-zero ($ret) status"
exit 1
fi
echo "make install > make_install.log 2>&1"
make install > make_install.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make install returned with non-zero ($ret) status"
exit 1
fi
echo "make test > make_test.log 2>&1"
make test > make_test.log 2>&1
ret=$?
if [ $? != 0 ]; then
echo "make test returned with non-zero ($ret) status"
exit 1
fi
fi
echo "Finished compiling at `date
Bart
________________________________________
Bart Brashers, Ph.D.
Senior Managing Consultant
Global Air Quality Practice Network Leader
D +1 425-412-1812
M +1 206-550-2606
bbrashers at ramboll.com<mailto:bbrashers at ramboll.com>
Ramboll
19020 33rd Avenue West
Suite 310
Lynnwood, WA 98036
USA
http://www.ramboll.com/environment-and-health
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: Issue compiling MET-9.0.1
From: John Halley Gotway
Time: Mon Apr 27 15:18:34 2020
Hello Bart,
I see you're having trouble compiling MET using PGI version 19.
Thanks for
sending a detailed description of the issue.
We do our development using the GNU compilers and most installations
using
Intel. And we do not routinely test using PGI. So I can see an issue
may
have crept up on us. I've assigned this ticket to Julie Prestopnik,
our
build engineer who handles most compilation problems.
She'll try compiling met-9.0.1 using PGI 19 on NCAR's machine,
cheyenne.
And hopefully that'll help address the issues you've run into.
Thanks,
John Halley Gotway
On Sat, Apr 25, 2020 at 5:51 PM Bart Brashers via RT
<met_help at ucar.edu>
wrote:
>
> Sat Apr 25 17:51:11 2020: Request 95051 was acted upon.
> Transaction: Ticket created by bbrashers at ramboll.com
> Queue: met_help
> Subject: Issue compiling MET-9.0.1
> Owner: Nobody
> Requestors: bbrashers at ramboll.com
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95051 >
>
>
> Hi, I looked in all the places listed<
> https://dtcenter.org/community-code/model-evaluation-tools-met/met-
help-desk>
> first and did some of Googling, but can't find the solution to this
one.
>
> I'm compiling met-9.0.1 using PGI-CE version 19.10-0. I am using the
> sample compile_MET_all.sh script to install into /usr/local/src/MET.
The
> external_libs all compile fine, MET's configure runs fine, but it
fails to
> compile met-9.0.1/src/libcode/vx_nc_obs:
>
> Making all in vx_nc_obs
> make[4]: Entering directory
> `/usr/local/src/MET/met-9.0.1/src/libcode/vx_nc_obs'
> source='nc_obs_util.cc' object='libvx_nc_obs_a-nc_obs_util.o'
libtool=no \
> DEPDIR=.deps depmode=pgcc /bin/sh ../../../depcomp \
> /usr/local/pgi/linux86-64/2019/bin/pgc++ -DHAVE_CONFIG_H -I.
-I../../..
> -I../../../src/basic/vx_cal -I../../../sr
> c/basic/vx_config -I../../../src/basic/vx_log
-I../../../src/basic/vx_math
> -I../../../src/basic/vx_util -I../../../src/libcode/vx_afm
> -I../../../src/libcode/vx_analysis_util
-I../../../src/libcode/vx_color
> -I../../../src/libcode/vx_data2d
-I../../../src/libcode/vx_data2d_factory
> -I../../../src/libcode/vx_data2d_grib
> -I../../../src/libcode/vx_data2d_grib2
> -I../../../src/libcode/vx_data2d_nccf
> -I../../../src/libcode/vx_data2d_nc_met
> -I../../../src/libcode/vx_data2d_nc_pinterp
> -I../../../src/libcode/vx_data2d_python
> -I../../../src/libcode/vx_python3_utils
-I../../../src/libcode/vx_geodesy
> -I../../../src/libcode/vx_gis -I../../../src/libcode/vx_gnomon
> -I../../../src/libcode/vx_grid -I../../../src/libcode/vx_gsl_prob
> -I../../../src/libcode/vx_nav -I../../../src/libcode/vx_nc_obs
> -I../../../src/libcode/vx_nc_util -I../../../src/libcode/vx_pb_util
> -I../../../src/libcode/vx_plot_util -I../../../src/libcode/vx_ps
> -I../../../src/libcode/vx_pxm -I../../../src/libcode/vx_render
-I../../!
> ../src/libcode/vx_regrid -I../../../src/libcode/vx_shapedata
> -I../../../src/libcode/vx_solar -I../../../src/libcode/vx_statistics
> -I../../../src/libcode/vx_stat_out -I../../../src/libcode/vx_summary
> -I../../../src/libcode/vx_time_series
-I../../../src/libcode/vx_series_data
> -I../../../src/libcode/vx_tc_util
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include -I../../basic/vx_log
> -I../../basic/vx_util -I/usr/local/src/anaconda3/include/python3.6m
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include -DBLOCK4 -DWITH_GRIB2
> -DMET_BASE="\"/usr/local/src/MET/share/met\"" -c -o
> libvx_nc_obs_a-nc_obs_util.o `test -f 'nc_obs_util.cc' || echo
> './'`nc_obs_util.cc
> "../../../src/basic/vx_config/config_file.h", line 83: warning:
function
> "Dictionary::lookup(std::string)" is hidden by
> "MetConfig::lookup" --
> virtual function override intended?
> const DictionaryEntry * lookup(const char * name);
> ^
>
> "../../../src/basic/vx_config/config_file.h", line 85: warning:
function
> "Dictionary::lookup(std::string)" is hidden by
> "MetConfig::lookup" --
> virtual function override intended?
> const DictionaryEntry * lookup(const char * name, const
> ConfigObjectType expected_type);
> ^
>
> "nc_obs_util.cc", line 670: internal error: assertion failed at:
> "../src/statements.c", line 7953
>
> return my_hdr_data;
> ^
>
> 1 catastrophic error detected in the compilation of
"nc_obs_util.cc".
> Compilation aborted.
> pgc++-Fatal-/usr/local/pgi/linux86-64-nollvm/19.10/bin/pggpp1
TERMINATED
> by signal 6
>
> Both external_libs/netcdf/netcdf-4.4.1.1/make_install.log and
> external_libs/netcdf/netcdf-cxx4-4.3.0/make_install.log show
successful
> compilations.
>
> I took a look at met-9.0.1/src/libcode/vx_nc_obs/nc_obs_util.cc, and
> nothing looked amiss, but I'm much better at Fortan than at C or
C++.
>
> There is no file named statements.c in the MET code or any of the
> external_libs (find | grep statements and locate statements.c return
> nothing).
>
> I notice the flag -DMET_BASE="\"/usr/local/src/MET/share/met\"" is
looking
> for a non-existent path, and even though
> /usr/local/src/MET/external_libs/share exists,
> /usr/local/src/MET/external_libs/share/met does not.
>
> Searching using Google for "site:mailman.ucar.edu/pipermail/met_help
> my_hdr_data" or statements.c found no useful hits.
>
> I've catted my version of the compile_MET_all.sh script (edited
slightly
> to remove the module calls) and the my.compile script (used to set
the
> variables) below - your gmail server rejected me trying to attach
them.
>
> Any hints?
>
> # cat my.compile
> #!/bin/csh -f
>
> setenv TEST_BASE `pwd`
> setenv MET_SUBDIR $TEST_BASE # will create met-9.0.1 inside this
dir
> setenv MET_TARBALL met-9.0.1.20200423.tar.gz
> setenv COMPILER pgi_19.10
> setenv PYTHON_MODULE python_3.6.9
> setenv MET_PYTHON /usr/local/src/anaconda3/bin/python
> #setenv MET_PYTHON_CC `python3-config --cflags`
> #setenv MET_PYTHON_LD `python3-config --ldflags`
> setenv MET_PYTHON_CC '-I/usr/local/src/anaconda3/include/python3.6m'
> setenv MET_PYTHON_LD
> '-L/usr/local/src/anaconda3/lib/python3.6/config-3.6m-x86_64-linux-
gnu
> -L/usr/local/src/anaconda3/lib -lpython3.6m -lpthread -ldl -lutil
-lrt -lm'
>
> setenv FC pgfortran
> setenv F77 pgf77
> setenv F90 pgfortran
> setenv CC pgcc
> setenv CXX pgc++
>
> setenv FFLAGS '-tp=istanbul'
> setenv CFLAGS '-tp=istanbul'
>
> ./compile_MET_all.sh >&! compile.out.`date +%Y-%m-%d`
>
>
>
>
> # cat copile_met_all.sh
> #!/bin/bash -l
>
> echo "TEST_BASE = ${TEST_BASE? "ERROR: TEST_BASE must be set"}"
> echo "COMPILER = ${COMPILER? "ERROR: COMPILER must be set"}"
> echo "MET_SUBDIR = ${MET_SUBDIR? "ERROR: MET_SUBDIR must be set"}"
> echo "MET_TARBALL = ${MET_TARBALL? "ERROR: MET_TARBALL must be
set"}"
>
> export LIB_DIR=${TEST_BASE}/external_libs
> MET_DIR=${MET_SUBDIR}
> TAR_DIR=${TEST_BASE}/tar_files
> MET_TARBALL=${TAR_DIR}/${MET_TARBALL}
>
> # Create directory for libraries
> mkdir -p ${LIB_DIR}
>
> # Check that tar files exist
> if [ ! -e $TAR_DIR ]; then
> echo "TAR File directory doesn't exist: ${TAR_DIR}"
> exit 1
> fi
>
> # Update library linker path
> export
>
LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib:${MET_PYTHON}/lib:${LD_LIBRARY_PATH}
> echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
>
> # Constants
> COMPILE_GSL=0
> COMPILE_BUFRLIB=0
> COMPILE_ZLIB=0
> COMPILE_LIBPNG=0
> COMPILE_JASPER=0
> COMPILE_G2CLIB=0
> COMPILE_HDF=0
> COMPILE_HDFEOS=0
> COMPILE_NETCDF=0
> COMPILE_FREETYPE=0
> COMPILE_CAIRO=0
> COMPILE_MET=1
> COMPILE_MET_PATCHES=0
>
> if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> COMPILE_MET=1
> fi
>
> echo
> echo "Compiling libraries into: ${LIB_DIR}"
>
> if [ ! -e ${LIB_DIR}/include ]; then
> mkdir ${LIB_DIR}/include
> fi
> if [ ! -e ${LIB_DIR}/lib ]; then
> mkdir ${LIB_DIR}/lib
> fi
>
> # Load compiler version
> COMPILER_FAMILY=` echo $COMPILER | cut -d'_' -f1`
> COMPILER_VERSION=`echo $COMPILER | cut -d'_' -f2`
>
> # echo "module load ${COMPILER_FAMILY}/${COMPILER_VERSION}"
> # echo ${COMPILER_FAMILY}/${COMPILER_VERSION}
> # module purge
> # module load ${COMPILER_FAMILY}/${COMPILER_VERSION}
> # if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> # module load craype
> # module switch craype craype-sandybridge
> # fi
>
> if [ ${COMPILER_FAMILY} == "gnu" ]; then
> export CC=`which gcc`
> export CXX=`which g++`
> export FC=`which gfortran`
> export F77=`which gfortran`
> export F90=`which gfortran`
> elif [ ${COMPILER_FAMILY} == "pgi" ]; then
> export CC=`which pgcc`
> export CXX=`which pgc++`
> export FC=`which pgf90`
> export F77=`which pgf90`
> export F90=`which pgf90`
> elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[ ${COMPILER_FAMILY} ==
"ics"
> ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[ ${COMPILER_FAMILY} ==
> "PrgEnv-intel" ]]; then
> export CC=`which icc`
> export CXX=`which icc`
> export FC=`which ifort`
> export F77=`which ifort`
> export F90=`which ifort`
> else
> echo "ERROR: \${COMPILER} must start with gnu, intel, ics, ips,
> PrgEnv-intel, or pgi"
> exit
> fi
>
> echo "export CC=${CC}"
> echo "export CXX=${CXX}"
> echo "export FC=${FC}"
> echo "export F77=${F77}"
> echo "export F90=${F90}"
>
> # Load desired Python version
> # PYTHON_NAME=` echo $PYTHON_MODULE | cut -d'_' -f1`
> # PYTHON_VERSION_NUM=`echo $PYTHON_MODULE | cut -d'_' -f2`
> # echo "module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}"
> # echo ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> # module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
>
> which python
> python --version
>
> # Compile GSL
> if [ $COMPILE_GSL -eq 1 ]; then
>
> if [ ${COMPILER_FAMILY} == "pgi" ]; then
> vrs="1.11";
> else
> vrs="2.1";
> fi
>
> echo
> echo "Compiling GSL_${vrs} at `date`"
> mkdir -p ${LIB_DIR}/gsl
> cd ${LIB_DIR}/gsl
> rm -rf gsl*
> tar -xf ${TAR_DIR}/gsl-${vrs}.tar.gz
> cd gsl*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile BUFRLIB
> if [ $COMPILE_BUFRLIB -eq 1 ]; then
>
> vrs="v11.3.0";
>
> echo
> echo "Compiling BUFRLIB_${vrs} at `date`"
> mkdir -p ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> cd ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> echo "cd `pwd`"
> rm -rf *
> tar -xf ${TAR_DIR}/BUFRLIB_`echo $vrs | sed 's/\./-/g'`.tar
>
> # Copy custom preproc.sh script into here
> #cp ${TAR_DIR}/preproc.sh_${vrs} preproc.sh
>
> #./preproc.sh > make.log 2>&1
> ${CC} -c -DUNDERSCORE `./getdefflags_C.sh` *.c >> make.log 2>&1
>
> # For GNU and Intel follow BUFRLIB11 instructions
> if [[ ${COMPILER_FAMILY} == "gnu" ]]; then
> ${FC} -c -fno-second-underscore `./getdefflags_F.sh` modv*.F
moda*.F
> `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[ ${COMPILER_FAMILY}
==
> "ics" ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[
${COMPILER_FAMILY} ==
> "PrgEnv-intel" ]]; then
> ${FC} -c `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f |
grep -v
> "mod[av]_"` >> make.log 2>&1
> elif [[ ${COMPILER_FAMILY} == "pgi" ]]; then
> ${FC} -c -Mnosecond_underscore `./getdefflags_F.sh` modv*.F
moda*.F
> `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> fi
>
> ar crv libbufr.a *.o >> make.log 2>&1
> cp *.a ${LIB_DIR}/lib/.
> fi
>
> # Compile ZLIB using gcc, per Boi Vuong from NCO on 05/23/2019
> if [ $COMPILE_ZLIB -eq 1 ]; then
> echo
> echo "Compiling ZLIB at `date`"
> mkdir -p ${LIB_DIR}/zlib
> cd ${LIB_DIR}/zlib
> rm -rf zlib*
> tar -xzf ${TAR_DIR}/zlib*.tar.gz
> cd zlib*
> echo "cd `pwd`"
> # Store the original CC compiler
> CC_SAVE=${CC}
> echo "export CC=`which gcc`"
> export CC=`which gcc`
> echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> # Reset CC by to the original setting
> echo "export CC=${CC_SAVE}"
> export CC=${CC_SAVE}
> fi
>
> # Compile LIBPNG using gcc, per Boi Vuong from NCO on 05/23/2019
> if [[ $COMPILE_LIBPNG -eq 1 && $HOST != ys* ]]; then
> echo
> echo "Compiling LIBPNG at `date`"
> mkdir -p ${LIB_DIR}/libpng
> cd ${LIB_DIR}/libpng
> rm -rf libpng*
> tar -xzf ${TAR_DIR}/libpng*.tar.gz
> cd libpng*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib
CC=gcc
> CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib CC=gcc
> CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile JASPER using gcc, per Boi Vuong from NCO on 05/23/2019
> if [ $COMPILE_JASPER -eq 1 ]; then
> echo
> echo "Compiling JASPER at `date`"
> mkdir -p ${LIB_DIR}/jasper
> cd ${LIB_DIR}/jasper
> rm -rf jasper*
> unzip ${TAR_DIR}/jasper*.zip > /dev/null 2>&1
> cd jasper*
> export CPPFLAGS="-I${LIB_DIR}/include"
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile G2CLIB
> if [ $COMPILE_G2CLIB -eq 1 ]; then
> echo
> echo "Compiling G2CLIB at `date`"
> mkdir -p ${LIB_DIR}/g2clib
> cd ${LIB_DIR}/g2clib
> rm -rf g2clib*
> tar -xf ${TAR_DIR}/g2clib*.tar
> cd g2clib*
> cat makefile | \
> sed -r 's/INC=.*/INC=-I${LIB_DIR}\/include
> -I${LIB_DIR}\/include\/jasper/g' | \
> sed 's/CC=gcc/CC=${CC_COMPILER}/g' | \
> sed 's/-D__64BIT__//g' \
> > makefile_new
> mv makefile_new makefile
> export CC_COMPILER=${CC}
> echo "cd `pwd`"
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> cp libg2c*.a ${LIB_DIR}/lib/libgrib2c.a
> cp *.h ${LIB_DIR}/include/.
> fi
>
> # Compile HDF
> # Depends on jpeg
> # Edit 'mfhdf/hdiff/Makefile' as follows:
> # From: LIBS = -ljpeg -lz
> # To: LIBS = -ljpeg -lz -lm
> if [ $COMPILE_HDF -eq 1 ]; then
> echo
> echo "Compiling HDF at `date`"
> mkdir -p ${LIB_DIR}/hdf
> cd ${LIB_DIR}/hdf
> rm -rf HDF*
> tar -xf ${TAR_DIR}/HDF4.2*.tar.gz
> cd HDF*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} --disable-netcdf
> --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} --disable-netcdf --with-
jpeg=${LIB_DIR}
> --with-zlib=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> cat mfhdf/hdiff/Makefile | sed 's/LIBS = -ljpeg -lz/LIBS = -ljpeg
-lz
> -lm/g' > Makefile_NEW
> mv Makefile_NEW mfhdf/hdiff/Makefile
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile HDFEOS
> # Depends on HDF
> if [ $COMPILE_HDFEOS -eq 1 ]; then
> echo
> echo "Compiling HDFEOS at `date`"
> mkdir -p ${LIB_DIR}/hdfeos
> cd ${LIB_DIR}/hdfeos
> rm -rf HDF-EOS*
> tar -xzf ${TAR_DIR}/HDF-EOS*.tar.*
> cd hdfeos
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} >
> configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR}
> --with-jpeg=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> cp include/*.h ${LIB_DIR}/include/.
> fi
>
> # Compile NetCDF
> if [ $COMPILE_NETCDF -eq 1 ]; then
>
> echo
> echo "Compiling HDF5 at `date`"
> mkdir -p ${LIB_DIR}/hdf5
> cd ${LIB_DIR}/hdf5
> rm -rf hdf5*
> tar -xzf ${TAR_DIR}/hdf5*.tar.gz
> cd hdf5*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo
> echo "Compiling NetCDF-C at `date`"
> mkdir -p ${LIB_DIR}/netcdf
> cd ${LIB_DIR}/netcdf
> rm -rf netcdf*
> unzip ${TAR_DIR}/netcdf-4*.zip > /dev/null 2>&1
> cd netcdf-4*
> export FC=''
> export F90=''
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo
> echo "Compiling NetCDF-CXX at `date`"
> cd ${LIB_DIR}/netcdf
> tar -xzf ${TAR_DIR}/netcdf-cxx*.tar.gz
> cd netcdf-cxx*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile FREETYPE
> if [ $COMPILE_FREETYPE -eq 1 ]; then
> echo
> echo "Compiling FREETYPE at `date`"
> mkdir -p ${LIB_DIR}/freetype
> cd ${LIB_DIR}/freetype
> rm -rf freetype*
> tar -xzf ${TAR_DIR}/freetype*.tar.gz
> cd freetype*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} --with-png=yes >
configure.log
> 2>&1"
> ./configure --prefix=${LIB_DIR} --with-png=yes > configure.log
2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1 --with-zlib=${LIB_DIR}
> LDFLAGS=-L${LIB_DIR} CPPFLAGS=-I${LIB_DIR}"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
>
> # Compile CAIRO
> if [ $COMPILE_CAIRO -eq 1 ]; then
>
> echo
> echo "Compiling pixman at `date`"
> mkdir -p ${LIB_DIR}/pixman
> cd ${LIB_DIR}/pixman
> rm -rf pixman*
> tar -xzf ${TAR_DIR}/pixman*.tar.gz
> cd pixman*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
>
>
> echo
> echo "Compiling CAIRO at `date`"
> mkdir -p ${LIB_DIR}/cairo
> cd ${LIB_DIR}/cairo
> rm -rf cairo*
> tar -xf ${TAR_DIR}/cairo*.tar*
> cd cairo*
> export PKG_CONFIG=`which pkg-config`
> if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> export PKG_CONFIG_PATH=${LIB_DIR}/lib/pkgconfig/
> fi
> if [ ${COMPILER_FAMILY} == "ips" ]; then
> export
>
LD_LIBRARY_PATH=/usrx/local/prod/intel/2015UP06/lib/intel64:${LD_LIBRARY_PATH}
> echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> export LDFLAGS="-shared-intel -L/${LIB_DIR}/lib
> -L/usrx/local/prod/intel/2018UP04/lib/intel64/"
> export CPPFLAGS=-I/${LIB_DIR}/include
> export CFLAGS=-
I/usrx/local/prod/intel/2015UP06/include/intel64/
> fi
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR}
ax_cv_c_float_words_bigendian=no
> LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include >
configure.log
> 2>&1"
> ./configure --prefix=${LIB_DIR} ax_cv_c_float_words_bigendian=no
> LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include >
configure.log
> 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile MET
> if [ $COMPILE_MET -eq 1 ]; then
>
> echo
> echo "Compiling MET at `date`"
> cd ${MET_DIR}
> echo "cd `pwd`"
> rm -rf met*
> tar -zxvf ${MET_TARBALL}
> cd met*
> echo "cd `pwd`"
> if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> cp ${TAR_DIR}/met*_patches*.tar.gz .
> tar -zxf met*_patches*.tar.gz
> fi
>
> export MET_NETCDF=${LIB_DIR}
> export MET_BUFRLIB=${LIB_DIR}/lib
> export MET_GSL=${LIB_DIR}
> export MET_GRIB2C=${LIB_DIR}
> export MET_HDF5=${LIB_DIR}
> export MET_HDF=${LIB_DIR}
> export MET_HDFEOS=${LIB_DIR}
> #export MET_CAIROINC=${LIB_DIR}/include/cairo
> #export MET_CAIROLIB=${LIB_DIR}/lib
> #export MET_FREETYPEINC=${LIB_DIR}/include/freetype2
> #export MET_FREETYPELIB=${LIB_DIR}/lib
> export MET_FONT_DIR=${TEST_BASE}/fonts
> export MET_PYTHON_LD=${MET_PYTHON_LD}
> export MET_PYTHON_CC=${MET_PYTHON_CC}
> export LDFLAGS="-Wl,--disable-new-dtags"
> export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib"
> export LDFLAGS="${LDFLAGS}
> -Wl,-rpath,${LIB_DIR}/lib:${MET_NETCDF}/lib:${MET_PYTHON/lib}"
> export CPPFLAGS=-I${LIB_DIR}/include
>
>
> echo "MET Configuration settings..."
> printenv | egrep "^MET_" | sed -r 's/^/export /g'
>
> export OPT_ARGS=''
> if [[ $COMPILER_FAMILY == "pgi" ]]; then
> export OPT_ARGS="${OPT_ARGS} FFLAGS=-lpgf90"
> fi
>
> echo "cd `pwd`"
> if [ -z ${PYTHON_MODULE_USE} ]; then
> #echo "./configure --prefix=${MET_DIR} --enable-grib2
--enable-modis
> --enable-mode_graphics --enable-lidar2nc ${OPT_ARGS} > configure.log
2>&1"
> #./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis
> --enable-mode_graphics --enable-lidar2nc ${OPT_ARGS} > configure.log
2>&1
> echo "./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1"
> ./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis
> --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1
> else
> #echo "./configure --prefix=${MET_DIR} --enable-grib2
--enable-modis
> --enable-mode_graphics --enable-lidar2nc --enable-python ${OPT_ARGS}
>
> configure.log 2>&1"
> #./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis
> --enable-mode_graphics --enable-lidar2nc --enable-python ${OPT_ARGS}
>
> configure.log 2>&1
> echo "./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log 2>&1"
> ./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis
> --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log 2>&1
> fi
>
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo "make test > make_test.log 2>&1"
> make test > make_test.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make test returned with non-zero ($ret) status"
> exit 1
> fi
>
> fi
>
> echo "Finished compiling at `date
>
> Bart
> ________________________________________
> Bart Brashers, Ph.D.
> Senior Managing Consultant
> Global Air Quality Practice Network Leader
>
> D +1 425-412-1812
> M +1 206-550-2606
> bbrashers at ramboll.com<mailto:bbrashers at ramboll.com>
>
> Ramboll
> 19020 33rd Avenue West
> Suite 310
> Lynnwood, WA 98036
> USA
> http://www.ramboll.com/environment-and-health
>
>
>
>
>
------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
From: Bart Brashers
Time: Mon Apr 27 16:08:52 2020
Hi John,
Do you find a significant performance difference between using the GNU
compilers and the Intel compilers? If not, then I can use the GNU
compilers.
As I understand it, gcc is pretty close to commercial compilers, but
gfortran is still noticeably slower than ifort or pgfortran. But
perhaps in MET there's not that many components that rely on Fortran?
Thanks,
Bart
-----Original Message-----
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Monday, April 27, 2020 2:19 PM
To: Bart Brashers <bbrashers at ramboll.com>
Subject: Re: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
Hello Bart,
I see you're having trouble compiling MET using PGI version 19.
Thanks for sending a detailed description of the issue.
We do our development using the GNU compilers and most installations
using Intel. And we do not routinely test using PGI. So I can see an
issue may have crept up on us. I've assigned this ticket to Julie
Prestopnik, our build engineer who handles most compilation problems.
She'll try compiling met-9.0.1 using PGI 19 on NCAR's machine,
cheyenne.
And hopefully that'll help address the issues you've run into.
Thanks,
John Halley Gotway
On Sat, Apr 25, 2020 at 5:51 PM Bart Brashers via RT
<met_help at ucar.edu>
wrote:
>
> Sat Apr 25 17:51:11 2020: Request 95051 was acted upon.
> Transaction: Ticket created by bbrashers at ramboll.com
> Queue: met_help
> Subject: Issue compiling MET-9.0.1
> Owner: Nobody
> Requestors: bbrashers at ramboll.com
> Status: new
> Ticket <URL:
>
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frt.r
>
ap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%7C01
>
%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad108d7eaf08d8e%7Cc8823c
>
91be814f89b0246c3dd789c106%7C0%7C0%7C637236191212685303&sdata=qZxN
> J1VYztm9g1QVxHtW69QODhB6%2Fj0q40HXKePZO8A%3D&reserved=0 >
>
>
> Hi, I looked in all the places listed<
>
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdtce
> nter.org%2Fcommunity-code%2Fmodel-evaluation-tools-met%2Fmet-help-
desk
>
&data=02%7C01%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad108d7
>
eaf08d8e%7Cc8823c91be814f89b0246c3dd789c106%7C0%7C0%7C6372361912126952
>
98&sdata=PYLxk0pnnsDaNGP0EviCESvqsJb7k3Zv4Fx85Bwd7h0%3D&reserv
> ed=0> first and did some of Googling, but can't find the solution to
> this one.
>
> I'm compiling met-9.0.1 using PGI-CE version 19.10-0. I am using the
> sample compile_MET_all.sh script to install into /usr/local/src/MET.
> The external_libs all compile fine, MET's configure runs fine, but
it
> fails to compile met-9.0.1/src/libcode/vx_nc_obs:
>
> Making all in vx_nc_obs
> make[4]: Entering directory
> `/usr/local/src/MET/met-9.0.1/src/libcode/vx_nc_obs'
> source='nc_obs_util.cc' object='libvx_nc_obs_a-nc_obs_util.o'
> libtool=no \ DEPDIR=.deps depmode=pgcc /bin/sh ../../../depcomp \
> /usr/local/pgi/linux86-64/2019/bin/pgc++ -DHAVE_CONFIG_H -I.
-I../../..
> -I../../../src/basic/vx_cal -I../../../sr c/basic/vx_config
> -I../../../src/basic/vx_log -I../../../src/basic/vx_math
> -I../../../src/basic/vx_util -I../../../src/libcode/vx_afm
> -I../../../src/libcode/vx_analysis_util
> -I../../../src/libcode/vx_color -I../../../src/libcode/vx_data2d
> -I../../../src/libcode/vx_data2d_factory
> -I../../../src/libcode/vx_data2d_grib
> -I../../../src/libcode/vx_data2d_grib2
> -I../../../src/libcode/vx_data2d_nccf
> -I../../../src/libcode/vx_data2d_nc_met
> -I../../../src/libcode/vx_data2d_nc_pinterp
> -I../../../src/libcode/vx_data2d_python
> -I../../../src/libcode/vx_python3_utils
> -I../../../src/libcode/vx_geodesy -I../../../src/libcode/vx_gis
> -I../../../src/libcode/vx_gnomon -I../../../src/libcode/vx_grid
> -I../../../src/libcode/vx_gsl_prob
> -I../../../src/libcode/vx_nav -I../../../src/libcode/vx_nc_obs
> -I../../../src/libcode/vx_nc_util -I../../../src/libcode/vx_pb_util
> -I../../../src/libcode/vx_plot_util -I../../../src/libcode/vx_ps
> -I../../../src/libcode/vx_pxm -I../../../src/libcode/vx_render
-I../../!
> ../src/libcode/vx_regrid -I../../../src/libcode/vx_shapedata
> -I../../../src/libcode/vx_solar -I../../../src/libcode/vx_statistics
> -I../../../src/libcode/vx_stat_out -I../../../src/libcode/vx_summary
> -I../../../src/libcode/vx_time_series
> -I../../../src/libcode/vx_series_data
> -I../../../src/libcode/vx_tc_util
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include -I../../basic/vx_log
> -I../../basic/vx_util -I/usr/local/src/anaconda3/include/python3.6m
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include
> -I/usr/local/src/MET/external_libs/include -DBLOCK4 -DWITH_GRIB2
> -DMET_BASE="\"/usr/local/src/MET/share/met\"" -c -o
> libvx_nc_obs_a-nc_obs_util.o `test -f 'nc_obs_util.cc' || echo
> './'`nc_obs_util.cc "../../../src/basic/vx_config/config_file.h",
line
> 83: warning: function
> "Dictionary::lookup(std::string)" is hidden by
> "MetConfig::lookup" --
> virtual function override intended?
> const DictionaryEntry * lookup(const char * name);
> ^
>
> "../../../src/basic/vx_config/config_file.h", line 85: warning:
function
> "Dictionary::lookup(std::string)" is hidden by
> "MetConfig::lookup" --
> virtual function override intended?
> const DictionaryEntry * lookup(const char * name, const
> ConfigObjectType expected_type);
> ^
>
> "nc_obs_util.cc", line 670: internal error: assertion failed at:
> "../src/statements.c", line 7953
>
> return my_hdr_data;
> ^
>
> 1 catastrophic error detected in the compilation of
"nc_obs_util.cc".
> Compilation aborted.
> pgc++-Fatal-/usr/local/pgi/linux86-64-nollvm/19.10/bin/pggpp1
> pgc++TERMINATED
> by signal 6
>
> Both external_libs/netcdf/netcdf-4.4.1.1/make_install.log and
> external_libs/netcdf/netcdf-cxx4-4.3.0/make_install.log show
> successful compilations.
>
> I took a look at met-9.0.1/src/libcode/vx_nc_obs/nc_obs_util.cc, and
> nothing looked amiss, but I'm much better at Fortan than at C or
C++.
>
> There is no file named statements.c in the MET code or any of the
> external_libs (find | grep statements and locate statements.c return
> nothing).
>
> I notice the flag -DMET_BASE="\"/usr/local/src/MET/share/met\"" is
> looking for a non-existent path, and even though
> /usr/local/src/MET/external_libs/share exists,
> /usr/local/src/MET/external_libs/share/met does not.
>
> Searching using Google for "site:mailman.ucar.edu/pipermail/met_help
> my_hdr_data" or statements.c found no useful hits.
>
> I've catted my version of the compile_MET_all.sh script (edited
> slightly to remove the module calls) and the my.compile script (used
> to set the
> variables) below - your gmail server rejected me trying to attach
them.
>
> Any hints?
>
> # cat my.compile
> #!/bin/csh -f
>
> setenv TEST_BASE `pwd`
> setenv MET_SUBDIR $TEST_BASE # will create met-9.0.1 inside this
dir
> setenv MET_TARBALL met-9.0.1.20200423.tar.gz
> setenv COMPILER pgi_19.10
> setenv PYTHON_MODULE python_3.6.9
> setenv MET_PYTHON /usr/local/src/anaconda3/bin/python
> #setenv MET_PYTHON_CC `python3-config --cflags` #setenv
MET_PYTHON_LD
> `python3-config --ldflags` setenv MET_PYTHON_CC
> '-I/usr/local/src/anaconda3/include/python3.6m'
> setenv MET_PYTHON_LD
> '-L/usr/local/src/anaconda3/lib/python3.6/config-3.6m-x86_64-linux-
gnu
> -L/usr/local/src/anaconda3/lib -lpython3.6m -lpthread -ldl -lutil
-lrt -lm'
>
> setenv FC pgfortran
> setenv F77 pgf77
> setenv F90 pgfortran
> setenv CC pgcc
> setenv CXX pgc++
>
> setenv FFLAGS '-tp=istanbul'
> setenv CFLAGS '-tp=istanbul'
>
> ./compile_MET_all.sh >&! compile.out.`date +%Y-%m-%d`
>
>
>
>
> # cat copile_met_all.sh
> #!/bin/bash -l
>
> echo "TEST_BASE = ${TEST_BASE? "ERROR: TEST_BASE must be set"}"
> echo "COMPILER = ${COMPILER? "ERROR: COMPILER must be set"}"
> echo "MET_SUBDIR = ${MET_SUBDIR? "ERROR: MET_SUBDIR must be set"}"
> echo "MET_TARBALL = ${MET_TARBALL? "ERROR: MET_TARBALL must be
set"}"
>
> export LIB_DIR=${TEST_BASE}/external_libs
> MET_DIR=${MET_SUBDIR}
> TAR_DIR=${TEST_BASE}/tar_files
> MET_TARBALL=${TAR_DIR}/${MET_TARBALL}
>
> # Create directory for libraries
> mkdir -p ${LIB_DIR}
>
> # Check that tar files exist
> if [ ! -e $TAR_DIR ]; then
> echo "TAR File directory doesn't exist: ${TAR_DIR}"
> exit 1
> fi
>
> # Update library linker path
> export
>
LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib:${MET_PYTHON}/lib:${LD_
> LIBRARY_PATH} echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
>
> # Constants
> COMPILE_GSL=0
> COMPILE_BUFRLIB=0
> COMPILE_ZLIB=0
> COMPILE_LIBPNG=0
> COMPILE_JASPER=0
> COMPILE_G2CLIB=0
> COMPILE_HDF=0
> COMPILE_HDFEOS=0
> COMPILE_NETCDF=0
> COMPILE_FREETYPE=0
> COMPILE_CAIRO=0
> COMPILE_MET=1
> COMPILE_MET_PATCHES=0
>
> if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> COMPILE_MET=1
> fi
>
> echo
> echo "Compiling libraries into: ${LIB_DIR}"
>
> if [ ! -e ${LIB_DIR}/include ]; then
> mkdir ${LIB_DIR}/include
> fi
> if [ ! -e ${LIB_DIR}/lib ]; then
> mkdir ${LIB_DIR}/lib
> fi
>
> # Load compiler version
> COMPILER_FAMILY=` echo $COMPILER | cut -d'_' -f1`
> COMPILER_VERSION=`echo $COMPILER | cut -d'_' -f2`
>
> # echo "module load ${COMPILER_FAMILY}/${COMPILER_VERSION}"
> # echo ${COMPILER_FAMILY}/${COMPILER_VERSION}
> # module purge
> # module load ${COMPILER_FAMILY}/${COMPILER_VERSION}
> # if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> # module load craype
> # module switch craype craype-sandybridge
> # fi
>
> if [ ${COMPILER_FAMILY} == "gnu" ]; then
> export CC=`which gcc`
> export CXX=`which g++`
> export FC=`which gfortran`
> export F77=`which gfortran`
> export F90=`which gfortran`
> elif [ ${COMPILER_FAMILY} == "pgi" ]; then
> export CC=`which pgcc`
> export CXX=`which pgc++`
> export FC=`which pgf90`
> export F77=`which pgf90`
> export F90=`which pgf90`
> elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[ ${COMPILER_FAMILY} ==
"ics"
> ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[ ${COMPILER_FAMILY} ==
> "PrgEnv-intel" ]]; then
> export CC=`which icc`
> export CXX=`which icc`
> export FC=`which ifort`
> export F77=`which ifort`
> export F90=`which ifort`
> else
> echo "ERROR: \${COMPILER} must start with gnu, intel, ics, ips,
> PrgEnv-intel, or pgi"
> exit
> fi
>
> echo "export CC=${CC}"
> echo "export CXX=${CXX}"
> echo "export FC=${FC}"
> echo "export F77=${F77}"
> echo "export F90=${F90}"
>
> # Load desired Python version
> # PYTHON_NAME=` echo $PYTHON_MODULE | cut -d'_' -f1` #
> PYTHON_VERSION_NUM=`echo $PYTHON_MODULE | cut -d'_' -f2` # echo
> "module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}"
> # echo ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> # module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
>
> which python
> python --version
>
> # Compile GSL
> if [ $COMPILE_GSL -eq 1 ]; then
>
> if [ ${COMPILER_FAMILY} == "pgi" ]; then
> vrs="1.11";
> else
> vrs="2.1";
> fi
>
> echo
> echo "Compiling GSL_${vrs} at `date`"
> mkdir -p ${LIB_DIR}/gsl
> cd ${LIB_DIR}/gsl
> rm -rf gsl*
> tar -xf ${TAR_DIR}/gsl-${vrs}.tar.gz
> cd gsl*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile BUFRLIB
> if [ $COMPILE_BUFRLIB -eq 1 ]; then
>
> vrs="v11.3.0";
>
> echo
> echo "Compiling BUFRLIB_${vrs} at `date`"
> mkdir -p ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> cd ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> echo "cd `pwd`"
> rm -rf *
> tar -xf ${TAR_DIR}/BUFRLIB_`echo $vrs | sed 's/\./-/g'`.tar
>
> # Copy custom preproc.sh script into here
> #cp ${TAR_DIR}/preproc.sh_${vrs} preproc.sh
>
> #./preproc.sh > make.log 2>&1
> ${CC} -c -DUNDERSCORE `./getdefflags_C.sh` *.c >> make.log 2>&1
>
> # For GNU and Intel follow BUFRLIB11 instructions
> if [[ ${COMPILER_FAMILY} == "gnu" ]]; then
> ${FC} -c -fno-second-underscore `./getdefflags_F.sh` modv*.F
> moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[ ${COMPILER_FAMILY}
==
> "ics" ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[
${COMPILER_FAMILY}
> == "PrgEnv-intel" ]]; then
> ${FC} -c `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f |
> grep -v "mod[av]_"` >> make.log 2>&1
> elif [[ ${COMPILER_FAMILY} == "pgi" ]]; then
> ${FC} -c -Mnosecond_underscore `./getdefflags_F.sh` modv*.F
> moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> fi
>
> ar crv libbufr.a *.o >> make.log 2>&1
> cp *.a ${LIB_DIR}/lib/.
> fi
>
> # Compile ZLIB using gcc, per Boi Vuong from NCO on 05/23/2019 if [
> $COMPILE_ZLIB -eq 1 ]; then
> echo
> echo "Compiling ZLIB at `date`"
> mkdir -p ${LIB_DIR}/zlib
> cd ${LIB_DIR}/zlib
> rm -rf zlib*
> tar -xzf ${TAR_DIR}/zlib*.tar.gz
> cd zlib*
> echo "cd `pwd`"
> # Store the original CC compiler
> CC_SAVE=${CC}
> echo "export CC=`which gcc`"
> export CC=`which gcc`
> echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> # Reset CC by to the original setting
> echo "export CC=${CC_SAVE}"
> export CC=${CC_SAVE}
> fi
>
> # Compile LIBPNG using gcc, per Boi Vuong from NCO on 05/23/2019 if
[[
> $COMPILE_LIBPNG -eq 1 && $HOST != ys* ]]; then
> echo
> echo "Compiling LIBPNG at `date`"
> mkdir -p ${LIB_DIR}/libpng
> cd ${LIB_DIR}/libpng
> rm -rf libpng*
> tar -xzf ${TAR_DIR}/libpng*.tar.gz
> cd libpng*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib
> CC=gcc CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib CC=gcc
> CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile JASPER using gcc, per Boi Vuong from NCO on 05/23/2019 if
[
> $COMPILE_JASPER -eq 1 ]; then
> echo
> echo "Compiling JASPER at `date`"
> mkdir -p ${LIB_DIR}/jasper
> cd ${LIB_DIR}/jasper
> rm -rf jasper*
> unzip ${TAR_DIR}/jasper*.zip > /dev/null 2>&1
> cd jasper*
> export CPPFLAGS="-I${LIB_DIR}/include"
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile G2CLIB
> if [ $COMPILE_G2CLIB -eq 1 ]; then
> echo
> echo "Compiling G2CLIB at `date`"
> mkdir -p ${LIB_DIR}/g2clib
> cd ${LIB_DIR}/g2clib
> rm -rf g2clib*
> tar -xf ${TAR_DIR}/g2clib*.tar
> cd g2clib*
> cat makefile | \
> sed -r 's/INC=.*/INC=-I${LIB_DIR}\/include
> -I${LIB_DIR}\/include\/jasper/g' | \
> sed 's/CC=gcc/CC=${CC_COMPILER}/g' | \
> sed 's/-D__64BIT__//g' \
> > makefile_new
> mv makefile_new makefile
> export CC_COMPILER=${CC}
> echo "cd `pwd`"
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> cp libg2c*.a ${LIB_DIR}/lib/libgrib2c.a
> cp *.h ${LIB_DIR}/include/.
> fi
>
> # Compile HDF
> # Depends on jpeg
> # Edit 'mfhdf/hdiff/Makefile' as follows:
> # From: LIBS = -ljpeg -lz
> # To: LIBS = -ljpeg -lz -lm
> if [ $COMPILE_HDF -eq 1 ]; then
> echo
> echo "Compiling HDF at `date`"
> mkdir -p ${LIB_DIR}/hdf
> cd ${LIB_DIR}/hdf
> rm -rf HDF*
> tar -xf ${TAR_DIR}/HDF4.2*.tar.gz
> cd HDF*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} --disable-netcdf
> --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} --disable-netcdf
> --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> cat mfhdf/hdiff/Makefile | sed 's/LIBS = -ljpeg -lz/LIBS = -ljpeg
> -lz -lm/g' > Makefile_NEW
> mv Makefile_NEW mfhdf/hdiff/Makefile
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile HDFEOS
> # Depends on HDF
> if [ $COMPILE_HDFEOS -eq 1 ]; then
> echo
> echo "Compiling HDFEOS at `date`"
> mkdir -p ${LIB_DIR}/hdfeos
> cd ${LIB_DIR}/hdfeos
> rm -rf HDF-EOS*
> tar -xzf ${TAR_DIR}/HDF-EOS*.tar.*
> cd hdfeos
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} >
> configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR}
> --with-jpeg=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> cp include/*.h ${LIB_DIR}/include/.
> fi
>
> # Compile NetCDF
> if [ $COMPILE_NETCDF -eq 1 ]; then
>
> echo
> echo "Compiling HDF5 at `date`"
> mkdir -p ${LIB_DIR}/hdf5
> cd ${LIB_DIR}/hdf5
> rm -rf hdf5*
> tar -xzf ${TAR_DIR}/hdf5*.tar.gz
> cd hdf5*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo
> echo "Compiling NetCDF-C at `date`"
> mkdir -p ${LIB_DIR}/netcdf
> cd ${LIB_DIR}/netcdf
> rm -rf netcdf*
> unzip ${TAR_DIR}/netcdf-4*.zip > /dev/null 2>&1
> cd netcdf-4*
> export FC=''
> export F90=''
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo
> echo "Compiling NetCDF-CXX at `date`"
> cd ${LIB_DIR}/netcdf
> tar -xzf ${TAR_DIR}/netcdf-cxx*.tar.gz
> cd netcdf-cxx*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile FREETYPE
> if [ $COMPILE_FREETYPE -eq 1 ]; then
> echo
> echo "Compiling FREETYPE at `date`"
> mkdir -p ${LIB_DIR}/freetype
> cd ${LIB_DIR}/freetype
> rm -rf freetype*
> tar -xzf ${TAR_DIR}/freetype*.tar.gz
> cd freetype*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} --with-png=yes >
configure.log
> 2>&1"
> ./configure --prefix=${LIB_DIR} --with-png=yes > configure.log
2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1 --with-zlib=${LIB_DIR}
> LDFLAGS=-L${LIB_DIR} CPPFLAGS=-I${LIB_DIR}"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
>
> # Compile CAIRO
> if [ $COMPILE_CAIRO -eq 1 ]; then
>
> echo
> echo "Compiling pixman at `date`"
> mkdir -p ${LIB_DIR}/pixman
> cd ${LIB_DIR}/pixman
> rm -rf pixman*
> tar -xzf ${TAR_DIR}/pixman*.tar.gz
> cd pixman*
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
>
>
> echo
> echo "Compiling CAIRO at `date`"
> mkdir -p ${LIB_DIR}/cairo
> cd ${LIB_DIR}/cairo
> rm -rf cairo*
> tar -xf ${TAR_DIR}/cairo*.tar*
> cd cairo*
> export PKG_CONFIG=`which pkg-config`
> if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> export PKG_CONFIG_PATH=${LIB_DIR}/lib/pkgconfig/
> fi
> if [ ${COMPILER_FAMILY} == "ips" ]; then
> export
>
LD_LIBRARY_PATH=/usrx/local/prod/intel/2015UP06/lib/intel64:${LD_LIBRARY_PATH}
> echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> export LDFLAGS="-shared-intel -L/${LIB_DIR}/lib
> -L/usrx/local/prod/intel/2018UP04/lib/intel64/"
> export CPPFLAGS=-I/${LIB_DIR}/include
> export CFLAGS=-
I/usrx/local/prod/intel/2015UP06/include/intel64/
> fi
> echo "cd `pwd`"
> echo "./configure --prefix=${LIB_DIR}
> ax_cv_c_float_words_bigendian=no LDFLAGS=-L/${LIB_DIR}/lib
> CPPFLAGS=-I/${LIB_DIR}/include > configure.log
> 2>&1"
> ./configure --prefix=${LIB_DIR} ax_cv_c_float_words_bigendian=no
> LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include >
> configure.log
> 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
> fi
>
> # Compile MET
> if [ $COMPILE_MET -eq 1 ]; then
>
> echo
> echo "Compiling MET at `date`"
> cd ${MET_DIR}
> echo "cd `pwd`"
> rm -rf met*
> tar -zxvf ${MET_TARBALL}
> cd met*
> echo "cd `pwd`"
> if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> cp ${TAR_DIR}/met*_patches*.tar.gz .
> tar -zxf met*_patches*.tar.gz
> fi
>
> export MET_NETCDF=${LIB_DIR}
> export MET_BUFRLIB=${LIB_DIR}/lib
> export MET_GSL=${LIB_DIR}
> export MET_GRIB2C=${LIB_DIR}
> export MET_HDF5=${LIB_DIR}
> export MET_HDF=${LIB_DIR}
> export MET_HDFEOS=${LIB_DIR}
> #export MET_CAIROINC=${LIB_DIR}/include/cairo
> #export MET_CAIROLIB=${LIB_DIR}/lib
> #export MET_FREETYPEINC=${LIB_DIR}/include/freetype2
> #export MET_FREETYPELIB=${LIB_DIR}/lib
> export MET_FONT_DIR=${TEST_BASE}/fonts
> export MET_PYTHON_LD=${MET_PYTHON_LD}
> export MET_PYTHON_CC=${MET_PYTHON_CC}
> export LDFLAGS="-Wl,--disable-new-dtags"
> export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib"
> export LDFLAGS="${LDFLAGS}
> -Wl,-rpath,${LIB_DIR}/lib:${MET_NETCDF}/lib:${MET_PYTHON/lib}"
> export CPPFLAGS=-I${LIB_DIR}/include
>
>
> echo "MET Configuration settings..."
> printenv | egrep "^MET_" | sed -r 's/^/export /g'
>
> export OPT_ARGS=''
> if [[ $COMPILER_FAMILY == "pgi" ]]; then
> export OPT_ARGS="${OPT_ARGS} FFLAGS=-lpgf90"
> fi
>
> echo "cd `pwd`"
> if [ -z ${PYTHON_MODULE_USE} ]; then
> #echo "./configure --prefix=${MET_DIR} --enable-grib2
> --enable-modis --enable-mode_graphics --enable-lidar2nc ${OPT_ARGS}
> configure.log 2>&1"
> #./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis
> --enable-mode_graphics --enable-lidar2nc ${OPT_ARGS} > configure.log
2>&1
> echo "./configure --prefix=${MET_DIR} --enable-grib2
> --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1"
> ./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis
> --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1
> else
> #echo "./configure --prefix=${MET_DIR} --enable-grib2
> --enable-modis --enable-mode_graphics --enable-lidar2nc
> --enable-python ${OPT_ARGS} > configure.log 2>&1"
> #./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis
> --enable-mode_graphics --enable-lidar2nc --enable-python ${OPT_ARGS}
>
> configure.log 2>&1
> echo "./configure --prefix=${MET_DIR} --enable-grib2
> --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} >
configure.log 2>&1"
> ./configure --prefix=${MET_DIR} --enable-grib2 --enable-modis
> --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log 2>&1
> fi
>
> ret=$?
> if [ $ret != 0 ]; then
> echo "configure returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo "make > make.log 2>&1"
> make > make.log 2>&1
> ret=$?
> if [ $ret != 0 ]; then
> echo "make returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo "make install > make_install.log 2>&1"
> make install > make_install.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make install returned with non-zero ($ret) status"
> exit 1
> fi
>
> echo "make test > make_test.log 2>&1"
> make test > make_test.log 2>&1
> ret=$?
> if [ $? != 0 ]; then
> echo "make test returned with non-zero ($ret) status"
> exit 1
> fi
>
> fi
>
> echo "Finished compiling at `date
>
> Bart
> ________________________________________
> Bart Brashers, Ph.D.
> Senior Managing Consultant
> Global Air Quality Practice Network Leader
>
> D +1 425-412-1812
> M +1 206-550-2606
> bbrashers at ramboll.com<mailto:bbrashers at ramboll.com>
>
> Ramboll
> 19020 33rd Avenue West
> Suite 310
> Lynnwood, WA 98036
> USA
> http://www.ramboll.com/environment-and-health
>
>
>
>
>
------------------------------------------------
Subject: Issue compiling MET-9.0.1
From: John Halley Gotway
Time: Mon Apr 27 16:12:07 2020
Bart,
The vast majority of MET is in C++ with only small amounts of FORTRAN
called by the pb2nc and tc_pairs tools. But I don't have any speed
comparisons to reference. But we do compile MET for operational use
by
NOAA labs and they prefer Intel.
Thanks,
John
On Mon, Apr 27, 2020 at 4:08 PM Bart Brashers via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95051 >
>
> Hi John,
>
> Do you find a significant performance difference between using the
GNU
> compilers and the Intel compilers? If not, then I can use the GNU
> compilers.
>
> As I understand it, gcc is pretty close to commercial compilers, but
> gfortran is still noticeably slower than ifort or pgfortran. But
perhaps in
> MET there's not that many components that rely on Fortran?
>
> Thanks,
>
> Bart
>
> -----Original Message-----
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Monday, April 27, 2020 2:19 PM
> To: Bart Brashers <bbrashers at ramboll.com>
> Subject: Re: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
>
> Hello Bart,
>
> I see you're having trouble compiling MET using PGI version 19.
Thanks
> for sending a detailed description of the issue.
>
> We do our development using the GNU compilers and most installations
using
> Intel. And we do not routinely test using PGI. So I can see an
issue may
> have crept up on us. I've assigned this ticket to Julie Prestopnik,
our
> build engineer who handles most compilation problems.
>
> She'll try compiling met-9.0.1 using PGI 19 on NCAR's machine,
cheyenne.
> And hopefully that'll help address the issues you've run into.
>
> Thanks,
> John Halley Gotway
>
> On Sat, Apr 25, 2020 at 5:51 PM Bart Brashers via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > Sat Apr 25 17:51:11 2020: Request 95051 was acted upon.
> > Transaction: Ticket created by bbrashers at ramboll.com
> > Queue: met_help
> > Subject: Issue compiling MET-9.0.1
> > Owner: Nobody
> > Requestors: bbrashers at ramboll.com
> > Status: new
> > Ticket <URL:
> >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frt.r
> >
ap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%7C01
> >
%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad108d7eaf08d8e%7Cc8823c
> >
91be814f89b0246c3dd789c106%7C0%7C0%7C637236191212685303&sdata=qZxN
> > J1VYztm9g1QVxHtW69QODhB6%2Fj0q40HXKePZO8A%3D&reserved=0 >
> >
> >
> > Hi, I looked in all the places listed<
> >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdtce
> > nter.org%2Fcommunity-code%2Fmodel-evaluation-tools-met%2Fmet-help-
desk
> >
&data=02%7C01%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad108d7
> >
eaf08d8e%7Cc8823c91be814f89b0246c3dd789c106%7C0%7C0%7C6372361912126952
> >
98&sdata=PYLxk0pnnsDaNGP0EviCESvqsJb7k3Zv4Fx85Bwd7h0%3D&reserv
> > ed=0> first and did some of Googling, but can't find the solution
to
> > this one.
> >
> > I'm compiling met-9.0.1 using PGI-CE version 19.10-0. I am using
the
> > sample compile_MET_all.sh script to install into
/usr/local/src/MET.
> > The external_libs all compile fine, MET's configure runs fine, but
it
> > fails to compile met-9.0.1/src/libcode/vx_nc_obs:
> >
> > Making all in vx_nc_obs
> > make[4]: Entering directory
> > `/usr/local/src/MET/met-9.0.1/src/libcode/vx_nc_obs'
> > source='nc_obs_util.cc' object='libvx_nc_obs_a-nc_obs_util.o'
> > libtool=no \ DEPDIR=.deps depmode=pgcc /bin/sh ../../../depcomp \
> > /usr/local/pgi/linux86-64/2019/bin/pgc++ -DHAVE_CONFIG_H -I.
-I../../..
> > -I../../../src/basic/vx_cal -I../../../sr c/basic/vx_config
> > -I../../../src/basic/vx_log -I../../../src/basic/vx_math
> > -I../../../src/basic/vx_util -I../../../src/libcode/vx_afm
> > -I../../../src/libcode/vx_analysis_util
> > -I../../../src/libcode/vx_color -I../../../src/libcode/vx_data2d
> > -I../../../src/libcode/vx_data2d_factory
> > -I../../../src/libcode/vx_data2d_grib
> > -I../../../src/libcode/vx_data2d_grib2
> > -I../../../src/libcode/vx_data2d_nccf
> > -I../../../src/libcode/vx_data2d_nc_met
> > -I../../../src/libcode/vx_data2d_nc_pinterp
> > -I../../../src/libcode/vx_data2d_python
> > -I../../../src/libcode/vx_python3_utils
> > -I../../../src/libcode/vx_geodesy -I../../../src/libcode/vx_gis
> > -I../../../src/libcode/vx_gnomon -I../../../src/libcode/vx_grid
> > -I../../../src/libcode/vx_gsl_prob
> > -I../../../src/libcode/vx_nav -I../../../src/libcode/vx_nc_obs
> > -I../../../src/libcode/vx_nc_util
-I../../../src/libcode/vx_pb_util
> > -I../../../src/libcode/vx_plot_util -I../../../src/libcode/vx_ps
> > -I../../../src/libcode/vx_pxm -I../../../src/libcode/vx_render
-I../../!
> > ../src/libcode/vx_regrid -I../../../src/libcode/vx_shapedata
> > -I../../../src/libcode/vx_solar
-I../../../src/libcode/vx_statistics
> > -I../../../src/libcode/vx_stat_out
-I../../../src/libcode/vx_summary
> > -I../../../src/libcode/vx_time_series
> > -I../../../src/libcode/vx_series_data
> > -I../../../src/libcode/vx_tc_util
> > -I/usr/local/src/MET/external_libs/include
> > -I/usr/local/src/MET/external_libs/include
> > -I/usr/local/src/MET/external_libs/include
> > -I/usr/local/src/MET/external_libs/include -I../../basic/vx_log
> > -I../../basic/vx_util
-I/usr/local/src/anaconda3/include/python3.6m
> > -I/usr/local/src/MET/external_libs/include
> > -I/usr/local/src/MET/external_libs/include
> > -I/usr/local/src/MET/external_libs/include -DBLOCK4 -DWITH_GRIB2
> > -DMET_BASE="\"/usr/local/src/MET/share/met\"" -c -o
> > libvx_nc_obs_a-nc_obs_util.o `test -f 'nc_obs_util.cc' || echo
> > './'`nc_obs_util.cc "../../../src/basic/vx_config/config_file.h",
line
> > 83: warning: function
> > "Dictionary::lookup(std::string)" is hidden by
> > "MetConfig::lookup" --
> > virtual function override intended?
> > const DictionaryEntry * lookup(const char * name);
> > ^
> >
> > "../../../src/basic/vx_config/config_file.h", line 85: warning:
function
> > "Dictionary::lookup(std::string)" is hidden by
> > "MetConfig::lookup" --
> > virtual function override intended?
> > const DictionaryEntry * lookup(const char * name, const
> > ConfigObjectType expected_type);
> > ^
> >
> > "nc_obs_util.cc", line 670: internal error: assertion failed at:
> > "../src/statements.c", line 7953
> >
> > return my_hdr_data;
> > ^
> >
> > 1 catastrophic error detected in the compilation of
"nc_obs_util.cc".
> > Compilation aborted.
> > pgc++-Fatal-/usr/local/pgi/linux86-64-nollvm/19.10/bin/pggpp1
> > pgc++TERMINATED
> > by signal 6
> >
> > Both external_libs/netcdf/netcdf-4.4.1.1/make_install.log and
> > external_libs/netcdf/netcdf-cxx4-4.3.0/make_install.log show
> > successful compilations.
> >
> > I took a look at met-9.0.1/src/libcode/vx_nc_obs/nc_obs_util.cc,
and
> > nothing looked amiss, but I'm much better at Fortan than at C or
C++.
> >
> > There is no file named statements.c in the MET code or any of the
> > external_libs (find | grep statements and locate statements.c
return
> > nothing).
> >
> > I notice the flag -DMET_BASE="\"/usr/local/src/MET/share/met\"" is
> > looking for a non-existent path, and even though
> > /usr/local/src/MET/external_libs/share exists,
> > /usr/local/src/MET/external_libs/share/met does not.
> >
> > Searching using Google for
"site:mailman.ucar.edu/pipermail/met_help
> > my_hdr_data" or statements.c found no useful hits.
> >
> > I've catted my version of the compile_MET_all.sh script (edited
> > slightly to remove the module calls) and the my.compile script
(used
> > to set the
> > variables) below - your gmail server rejected me trying to attach
them.
> >
> > Any hints?
> >
> > # cat my.compile
> > #!/bin/csh -f
> >
> > setenv TEST_BASE `pwd`
> > setenv MET_SUBDIR $TEST_BASE # will create met-9.0.1 inside
this dir
> > setenv MET_TARBALL met-9.0.1.20200423.tar.gz
> > setenv COMPILER pgi_19.10
> > setenv PYTHON_MODULE python_3.6.9
> > setenv MET_PYTHON /usr/local/src/anaconda3/bin/python
> > #setenv MET_PYTHON_CC `python3-config --cflags` #setenv
MET_PYTHON_LD
> > `python3-config --ldflags` setenv MET_PYTHON_CC
> > '-I/usr/local/src/anaconda3/include/python3.6m'
> > setenv MET_PYTHON_LD
> > '-L/usr/local/src/anaconda3/lib/python3.6/config-3.6m-x86_64-
linux-gnu
> > -L/usr/local/src/anaconda3/lib -lpython3.6m -lpthread -ldl -lutil
-lrt
> -lm'
> >
> > setenv FC pgfortran
> > setenv F77 pgf77
> > setenv F90 pgfortran
> > setenv CC pgcc
> > setenv CXX pgc++
> >
> > setenv FFLAGS '-tp=istanbul'
> > setenv CFLAGS '-tp=istanbul'
> >
> > ./compile_MET_all.sh >&! compile.out.`date +%Y-%m-%d`
> >
> >
> >
> >
> > # cat copile_met_all.sh
> > #!/bin/bash -l
> >
> > echo "TEST_BASE = ${TEST_BASE? "ERROR: TEST_BASE must be set"}"
> > echo "COMPILER = ${COMPILER? "ERROR: COMPILER must be set"}"
> > echo "MET_SUBDIR = ${MET_SUBDIR? "ERROR: MET_SUBDIR must be set"}"
> > echo "MET_TARBALL = ${MET_TARBALL? "ERROR: MET_TARBALL must be
set"}"
> >
> > export LIB_DIR=${TEST_BASE}/external_libs
> > MET_DIR=${MET_SUBDIR}
> > TAR_DIR=${TEST_BASE}/tar_files
> > MET_TARBALL=${TAR_DIR}/${MET_TARBALL}
> >
> > # Create directory for libraries
> > mkdir -p ${LIB_DIR}
> >
> > # Check that tar files exist
> > if [ ! -e $TAR_DIR ]; then
> > echo "TAR File directory doesn't exist: ${TAR_DIR}"
> > exit 1
> > fi
> >
> > # Update library linker path
> > export
> >
LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib:${MET_PYTHON}/lib:${LD_
> > LIBRARY_PATH} echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> >
> > # Constants
> > COMPILE_GSL=0
> > COMPILE_BUFRLIB=0
> > COMPILE_ZLIB=0
> > COMPILE_LIBPNG=0
> > COMPILE_JASPER=0
> > COMPILE_G2CLIB=0
> > COMPILE_HDF=0
> > COMPILE_HDFEOS=0
> > COMPILE_NETCDF=0
> > COMPILE_FREETYPE=0
> > COMPILE_CAIRO=0
> > COMPILE_MET=1
> > COMPILE_MET_PATCHES=0
> >
> > if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> > COMPILE_MET=1
> > fi
> >
> > echo
> > echo "Compiling libraries into: ${LIB_DIR}"
> >
> > if [ ! -e ${LIB_DIR}/include ]; then
> > mkdir ${LIB_DIR}/include
> > fi
> > if [ ! -e ${LIB_DIR}/lib ]; then
> > mkdir ${LIB_DIR}/lib
> > fi
> >
> > # Load compiler version
> > COMPILER_FAMILY=` echo $COMPILER | cut -d'_' -f1`
> > COMPILER_VERSION=`echo $COMPILER | cut -d'_' -f2`
> >
> > # echo "module load ${COMPILER_FAMILY}/${COMPILER_VERSION}"
> > # echo ${COMPILER_FAMILY}/${COMPILER_VERSION}
> > # module purge
> > # module load ${COMPILER_FAMILY}/${COMPILER_VERSION}
> > # if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> > # module load craype
> > # module switch craype craype-sandybridge
> > # fi
> >
> > if [ ${COMPILER_FAMILY} == "gnu" ]; then
> > export CC=`which gcc`
> > export CXX=`which g++`
> > export FC=`which gfortran`
> > export F77=`which gfortran`
> > export F90=`which gfortran`
> > elif [ ${COMPILER_FAMILY} == "pgi" ]; then
> > export CC=`which pgcc`
> > export CXX=`which pgc++`
> > export FC=`which pgf90`
> > export F77=`which pgf90`
> > export F90=`which pgf90`
> > elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[ ${COMPILER_FAMILY}
==
> "ics"
> > ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[ ${COMPILER_FAMILY}
==
> > "PrgEnv-intel" ]]; then
> > export CC=`which icc`
> > export CXX=`which icc`
> > export FC=`which ifort`
> > export F77=`which ifort`
> > export F90=`which ifort`
> > else
> > echo "ERROR: \${COMPILER} must start with gnu, intel, ics, ips,
> > PrgEnv-intel, or pgi"
> > exit
> > fi
> >
> > echo "export CC=${CC}"
> > echo "export CXX=${CXX}"
> > echo "export FC=${FC}"
> > echo "export F77=${F77}"
> > echo "export F90=${F90}"
> >
> > # Load desired Python version
> > # PYTHON_NAME=` echo $PYTHON_MODULE | cut -d'_' -f1` #
> > PYTHON_VERSION_NUM=`echo $PYTHON_MODULE | cut -d'_' -f2` # echo
> > "module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}"
> > # echo ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> > # module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> >
> > which python
> > python --version
> >
> > # Compile GSL
> > if [ $COMPILE_GSL -eq 1 ]; then
> >
> > if [ ${COMPILER_FAMILY} == "pgi" ]; then
> > vrs="1.11";
> > else
> > vrs="2.1";
> > fi
> >
> > echo
> > echo "Compiling GSL_${vrs} at `date`"
> > mkdir -p ${LIB_DIR}/gsl
> > cd ${LIB_DIR}/gsl
> > rm -rf gsl*
> > tar -xf ${TAR_DIR}/gsl-${vrs}.tar.gz
> > cd gsl*
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > fi
> >
> > # Compile BUFRLIB
> > if [ $COMPILE_BUFRLIB -eq 1 ]; then
> >
> > vrs="v11.3.0";
> >
> > echo
> > echo "Compiling BUFRLIB_${vrs} at `date`"
> > mkdir -p ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> > cd ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> > echo "cd `pwd`"
> > rm -rf *
> > tar -xf ${TAR_DIR}/BUFRLIB_`echo $vrs | sed 's/\./-/g'`.tar
> >
> > # Copy custom preproc.sh script into here
> > #cp ${TAR_DIR}/preproc.sh_${vrs} preproc.sh
> >
> > #./preproc.sh > make.log 2>&1
> > ${CC} -c -DUNDERSCORE `./getdefflags_C.sh` *.c >> make.log 2>&1
> >
> > # For GNU and Intel follow BUFRLIB11 instructions
> > if [[ ${COMPILER_FAMILY} == "gnu" ]]; then
> > ${FC} -c -fno-second-underscore `./getdefflags_F.sh` modv*.F
> > moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> > elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[
${COMPILER_FAMILY} ==
> > "ics" ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[
${COMPILER_FAMILY}
> > == "PrgEnv-intel" ]]; then
> > ${FC} -c `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f |
> > grep -v "mod[av]_"` >> make.log 2>&1
> > elif [[ ${COMPILER_FAMILY} == "pgi" ]]; then
> > ${FC} -c -Mnosecond_underscore `./getdefflags_F.sh` modv*.F
> > moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> > fi
> >
> > ar crv libbufr.a *.o >> make.log 2>&1
> > cp *.a ${LIB_DIR}/lib/.
> > fi
> >
> > # Compile ZLIB using gcc, per Boi Vuong from NCO on 05/23/2019 if
[
> > $COMPILE_ZLIB -eq 1 ]; then
> > echo
> > echo "Compiling ZLIB at `date`"
> > mkdir -p ${LIB_DIR}/zlib
> > cd ${LIB_DIR}/zlib
> > rm -rf zlib*
> > tar -xzf ${TAR_DIR}/zlib*.tar.gz
> > cd zlib*
> > echo "cd `pwd`"
> > # Store the original CC compiler
> > CC_SAVE=${CC}
> > echo "export CC=`which gcc`"
> > export CC=`which gcc`
> > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > # Reset CC by to the original setting
> > echo "export CC=${CC_SAVE}"
> > export CC=${CC_SAVE}
> > fi
> >
> > # Compile LIBPNG using gcc, per Boi Vuong from NCO on 05/23/2019
if [[
> > $COMPILE_LIBPNG -eq 1 && $HOST != ys* ]]; then
> > echo
> > echo "Compiling LIBPNG at `date`"
> > mkdir -p ${LIB_DIR}/libpng
> > cd ${LIB_DIR}/libpng
> > rm -rf libpng*
> > tar -xzf ${TAR_DIR}/libpng*.tar.gz
> > cd libpng*
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib
> > CC=gcc CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1"
> > ./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib CC=gcc
> > CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > fi
> >
> > # Compile JASPER using gcc, per Boi Vuong from NCO on 05/23/2019
if [
> > $COMPILE_JASPER -eq 1 ]; then
> > echo
> > echo "Compiling JASPER at `date`"
> > mkdir -p ${LIB_DIR}/jasper
> > cd ${LIB_DIR}/jasper
> > rm -rf jasper*
> > unzip ${TAR_DIR}/jasper*.zip > /dev/null 2>&1
> > cd jasper*
> > export CPPFLAGS="-I${LIB_DIR}/include"
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} CC=gcc > configure.log
2>&1"
> > ./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > fi
> >
> > # Compile G2CLIB
> > if [ $COMPILE_G2CLIB -eq 1 ]; then
> > echo
> > echo "Compiling G2CLIB at `date`"
> > mkdir -p ${LIB_DIR}/g2clib
> > cd ${LIB_DIR}/g2clib
> > rm -rf g2clib*
> > tar -xf ${TAR_DIR}/g2clib*.tar
> > cd g2clib*
> > cat makefile | \
> > sed -r 's/INC=.*/INC=-I${LIB_DIR}\/include
> > -I${LIB_DIR}\/include\/jasper/g' | \
> > sed 's/CC=gcc/CC=${CC_COMPILER}/g' | \
> > sed 's/-D__64BIT__//g' \
> > > makefile_new
> > mv makefile_new makefile
> > export CC_COMPILER=${CC}
> > echo "cd `pwd`"
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > cp libg2c*.a ${LIB_DIR}/lib/libgrib2c.a
> > cp *.h ${LIB_DIR}/include/.
> > fi
> >
> > # Compile HDF
> > # Depends on jpeg
> > # Edit 'mfhdf/hdiff/Makefile' as follows:
> > # From: LIBS = -ljpeg -lz
> > # To: LIBS = -ljpeg -lz -lm
> > if [ $COMPILE_HDF -eq 1 ]; then
> > echo
> > echo "Compiling HDF at `date`"
> > mkdir -p ${LIB_DIR}/hdf
> > cd ${LIB_DIR}/hdf
> > rm -rf HDF*
> > tar -xf ${TAR_DIR}/HDF4.2*.tar.gz
> > cd HDF*
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} --disable-netcdf
> > --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log
2>&1"
> > ./configure --prefix=${LIB_DIR} --disable-netcdf
> > --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > cat mfhdf/hdiff/Makefile | sed 's/LIBS = -ljpeg -lz/LIBS =
-ljpeg
> > -lz -lm/g' > Makefile_NEW
> > mv Makefile_NEW mfhdf/hdiff/Makefile
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > fi
> >
> > # Compile HDFEOS
> > # Depends on HDF
> > if [ $COMPILE_HDFEOS -eq 1 ]; then
> > echo
> > echo "Compiling HDFEOS at `date`"
> > mkdir -p ${LIB_DIR}/hdfeos
> > cd ${LIB_DIR}/hdfeos
> > rm -rf HDF-EOS*
> > tar -xzf ${TAR_DIR}/HDF-EOS*.tar.*
> > cd hdfeos
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} >
> > configure.log 2>&1"
> > ./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR}
> > --with-jpeg=${LIB_DIR} > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > cp include/*.h ${LIB_DIR}/include/.
> > fi
> >
> > # Compile NetCDF
> > if [ $COMPILE_NETCDF -eq 1 ]; then
> >
> > echo
> > echo "Compiling HDF5 at `date`"
> > mkdir -p ${LIB_DIR}/hdf5
> > cd ${LIB_DIR}/hdf5
> > rm -rf hdf5*
> > tar -xzf ${TAR_DIR}/hdf5*.tar.gz
> > cd hdf5*
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> > LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
configure.log
> 2>&1"
> > ./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> > LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
configure.log
> 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> >
> > echo
> > echo "Compiling NetCDF-C at `date`"
> > mkdir -p ${LIB_DIR}/netcdf
> > cd ${LIB_DIR}/netcdf
> > rm -rf netcdf*
> > unzip ${TAR_DIR}/netcdf-4*.zip > /dev/null 2>&1
> > cd netcdf-4*
> > export FC=''
> > export F90=''
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> > ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> >
> > echo
> > echo "Compiling NetCDF-CXX at `date`"
> > cd ${LIB_DIR}/netcdf
> > tar -xzf ${TAR_DIR}/netcdf-cxx*.tar.gz
> > cd netcdf-cxx*
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> > ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > fi
> >
> > # Compile FREETYPE
> > if [ $COMPILE_FREETYPE -eq 1 ]; then
> > echo
> > echo "Compiling FREETYPE at `date`"
> > mkdir -p ${LIB_DIR}/freetype
> > cd ${LIB_DIR}/freetype
> > rm -rf freetype*
> > tar -xzf ${TAR_DIR}/freetype*.tar.gz
> > cd freetype*
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} --with-png=yes >
configure.log
> > 2>&1"
> > ./configure --prefix=${LIB_DIR} --with-png=yes > configure.log
2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1 --with-
zlib=${LIB_DIR}
> > LDFLAGS=-L${LIB_DIR} CPPFLAGS=-I${LIB_DIR}"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > fi
> >
> >
> > # Compile CAIRO
> > if [ $COMPILE_CAIRO -eq 1 ]; then
> >
> > echo
> > echo "Compiling pixman at `date`"
> > mkdir -p ${LIB_DIR}/pixman
> > cd ${LIB_DIR}/pixman
> > rm -rf pixman*
> > tar -xzf ${TAR_DIR}/pixman*.tar.gz
> > cd pixman*
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> >
> >
> > echo
> > echo "Compiling CAIRO at `date`"
> > mkdir -p ${LIB_DIR}/cairo
> > cd ${LIB_DIR}/cairo
> > rm -rf cairo*
> > tar -xf ${TAR_DIR}/cairo*.tar*
> > cd cairo*
> > export PKG_CONFIG=`which pkg-config`
> > if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> > export PKG_CONFIG_PATH=${LIB_DIR}/lib/pkgconfig/
> > fi
> > if [ ${COMPILER_FAMILY} == "ips" ]; then
> > export
> >
>
LD_LIBRARY_PATH=/usrx/local/prod/intel/2015UP06/lib/intel64:${LD_LIBRARY_PATH}
> > echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> > export LDFLAGS="-shared-intel -L/${LIB_DIR}/lib
> > -L/usrx/local/prod/intel/2018UP04/lib/intel64/"
> > export CPPFLAGS=-I/${LIB_DIR}/include
> > export CFLAGS=-
I/usrx/local/prod/intel/2015UP06/include/intel64/
> > fi
> > echo "cd `pwd`"
> > echo "./configure --prefix=${LIB_DIR}
> > ax_cv_c_float_words_bigendian=no LDFLAGS=-L/${LIB_DIR}/lib
> > CPPFLAGS=-I/${LIB_DIR}/include > configure.log
> > 2>&1"
> > ./configure --prefix=${LIB_DIR} ax_cv_c_float_words_bigendian=no
> > LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include >
> > configure.log
> > 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> > fi
> >
> > # Compile MET
> > if [ $COMPILE_MET -eq 1 ]; then
> >
> > echo
> > echo "Compiling MET at `date`"
> > cd ${MET_DIR}
> > echo "cd `pwd`"
> > rm -rf met*
> > tar -zxvf ${MET_TARBALL}
> > cd met*
> > echo "cd `pwd`"
> > if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> > cp ${TAR_DIR}/met*_patches*.tar.gz .
> > tar -zxf met*_patches*.tar.gz
> > fi
> >
> > export MET_NETCDF=${LIB_DIR}
> > export MET_BUFRLIB=${LIB_DIR}/lib
> > export MET_GSL=${LIB_DIR}
> > export MET_GRIB2C=${LIB_DIR}
> > export MET_HDF5=${LIB_DIR}
> > export MET_HDF=${LIB_DIR}
> > export MET_HDFEOS=${LIB_DIR}
> > #export MET_CAIROINC=${LIB_DIR}/include/cairo
> > #export MET_CAIROLIB=${LIB_DIR}/lib
> > #export MET_FREETYPEINC=${LIB_DIR}/include/freetype2
> > #export MET_FREETYPELIB=${LIB_DIR}/lib
> > export MET_FONT_DIR=${TEST_BASE}/fonts
> > export MET_PYTHON_LD=${MET_PYTHON_LD}
> > export MET_PYTHON_CC=${MET_PYTHON_CC}
> > export LDFLAGS="-Wl,--disable-new-dtags"
> > export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib"
> > export LDFLAGS="${LDFLAGS}
> > -Wl,-rpath,${LIB_DIR}/lib:${MET_NETCDF}/lib:${MET_PYTHON/lib}"
> > export CPPFLAGS=-I${LIB_DIR}/include
> >
> >
> > echo "MET Configuration settings..."
> > printenv | egrep "^MET_" | sed -r 's/^/export /g'
> >
> > export OPT_ARGS=''
> > if [[ $COMPILER_FAMILY == "pgi" ]]; then
> > export OPT_ARGS="${OPT_ARGS} FFLAGS=-lpgf90"
> > fi
> >
> > echo "cd `pwd`"
> > if [ -z ${PYTHON_MODULE_USE} ]; then
> > #echo "./configure --prefix=${MET_DIR} --enable-grib2
> > --enable-modis --enable-mode_graphics --enable-lidar2nc
${OPT_ARGS} >
> configure.log 2>&1"
> > #./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> > --enable-mode_graphics --enable-lidar2nc ${OPT_ARGS} >
configure.log 2>&1
> > echo "./configure --prefix=${MET_DIR} --enable-grib2
> > --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1"
> > ./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> > --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1
> > else
> > #echo "./configure --prefix=${MET_DIR} --enable-grib2
> > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > --enable-python ${OPT_ARGS} > configure.log 2>&1"
> > #./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> > --enable-mode_graphics --enable-lidar2nc --enable-python
${OPT_ARGS} >
> > configure.log 2>&1
> > echo "./configure --prefix=${MET_DIR} --enable-grib2
> > --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} >
> configure.log 2>&1"
> > ./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> > --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log 2>&1
> > fi
> >
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "configure returned with non-zero ($ret) status"
> > exit 1
> > fi
> >
> > echo "make > make.log 2>&1"
> > make > make.log 2>&1
> > ret=$?
> > if [ $ret != 0 ]; then
> > echo "make returned with non-zero ($ret) status"
> > exit 1
> > fi
> >
> > echo "make install > make_install.log 2>&1"
> > make install > make_install.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make install returned with non-zero ($ret) status"
> > exit 1
> > fi
> >
> > echo "make test > make_test.log 2>&1"
> > make test > make_test.log 2>&1
> > ret=$?
> > if [ $? != 0 ]; then
> > echo "make test returned with non-zero ($ret) status"
> > exit 1
> > fi
> >
> > fi
> >
> > echo "Finished compiling at `date
> >
> > Bart
> > ________________________________________
> > Bart Brashers, Ph.D.
> > Senior Managing Consultant
> > Global Air Quality Practice Network Leader
> >
> > D +1 425-412-1812
> > M +1 206-550-2606
> > bbrashers at ramboll.com<mailto:bbrashers at ramboll.com>
> >
> > Ramboll
> > 19020 33rd Avenue West
> > Suite 310
> > Lynnwood, WA 98036
> > USA
> > http://www.ramboll.com/environment-and-health
> >
> >
> >
> >
> >
>
>
>
>
------------------------------------------------
Subject: Issue compiling MET-9.0.1
From: Julie Prestopnik
Time: Tue Apr 28 14:09:46 2020
Hi Bart.
We were able to reproduce the problem using pgi on Cheyenne and will
need
to look into addressing it for our next release. Thank you for
bringing
this to our attention. Were you able to compile successfully using
the GNU
compilers?
Julie
On Mon, Apr 27, 2020 at 4:12 PM John Halley Gotway via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95051 >
>
> Bart,
>
> The vast majority of MET is in C++ with only small amounts of
FORTRAN
> called by the pb2nc and tc_pairs tools. But I don't have any speed
> comparisons to reference. But we do compile MET for operational use
by
> NOAA labs and they prefer Intel.
>
> Thanks,
> John
>
> On Mon, Apr 27, 2020 at 4:08 PM Bart Brashers via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95051 >
> >
> > Hi John,
> >
> > Do you find a significant performance difference between using the
GNU
> > compilers and the Intel compilers? If not, then I can use the GNU
> > compilers.
> >
> > As I understand it, gcc is pretty close to commercial compilers,
but
> > gfortran is still noticeably slower than ifort or pgfortran. But
perhaps
> in
> > MET there's not that many components that rely on Fortran?
> >
> > Thanks,
> >
> > Bart
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT <met_help at ucar.edu>
> > Sent: Monday, April 27, 2020 2:19 PM
> > To: Bart Brashers <bbrashers at ramboll.com>
> > Subject: Re: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
> >
> > Hello Bart,
> >
> > I see you're having trouble compiling MET using PGI version 19.
Thanks
> > for sending a detailed description of the issue.
> >
> > We do our development using the GNU compilers and most
installations
> using
> > Intel. And we do not routinely test using PGI. So I can see an
issue
> may
> > have crept up on us. I've assigned this ticket to Julie
Prestopnik, our
> > build engineer who handles most compilation problems.
> >
> > She'll try compiling met-9.0.1 using PGI 19 on NCAR's machine,
cheyenne.
> > And hopefully that'll help address the issues you've run into.
> >
> > Thanks,
> > John Halley Gotway
> >
> > On Sat, Apr 25, 2020 at 5:51 PM Bart Brashers via RT
<met_help at ucar.edu>
> > wrote:
> >
> > >
> > > Sat Apr 25 17:51:11 2020: Request 95051 was acted upon.
> > > Transaction: Ticket created by bbrashers at ramboll.com
> > > Queue: met_help
> > > Subject: Issue compiling MET-9.0.1
> > > Owner: Nobody
> > > Requestors: bbrashers at ramboll.com
> > > Status: new
> > > Ticket <URL:
> > >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frt.r
> > >
ap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%7C01
> > >
%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad108d7eaf08d8e%7Cc8823c
> > >
91be814f89b0246c3dd789c106%7C0%7C0%7C637236191212685303&sdata=qZxN
> > > J1VYztm9g1QVxHtW69QODhB6%2Fj0q40HXKePZO8A%3D&reserved=0 >
> > >
> > >
> > > Hi, I looked in all the places listed<
> > >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdtce
> > > nter.org%2Fcommunity-code%2Fmodel-evaluation-tools-met%2Fmet-
help-desk
> > >
&data=02%7C01%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad108d7
> > >
eaf08d8e%7Cc8823c91be814f89b0246c3dd789c106%7C0%7C0%7C6372361912126952
> > >
98&sdata=PYLxk0pnnsDaNGP0EviCESvqsJb7k3Zv4Fx85Bwd7h0%3D&reserv
> > > ed=0> first and did some of Googling, but can't find the
solution to
> > > this one.
> > >
> > > I'm compiling met-9.0.1 using PGI-CE version 19.10-0. I am using
the
> > > sample compile_MET_all.sh script to install into
/usr/local/src/MET.
> > > The external_libs all compile fine, MET's configure runs fine,
but it
> > > fails to compile met-9.0.1/src/libcode/vx_nc_obs:
> > >
> > > Making all in vx_nc_obs
> > > make[4]: Entering directory
> > > `/usr/local/src/MET/met-9.0.1/src/libcode/vx_nc_obs'
> > > source='nc_obs_util.cc' object='libvx_nc_obs_a-nc_obs_util.o'
> > > libtool=no \ DEPDIR=.deps depmode=pgcc /bin/sh ../../../depcomp
\
> > > /usr/local/pgi/linux86-64/2019/bin/pgc++ -DHAVE_CONFIG_H -I.
-I../../..
> > > -I../../../src/basic/vx_cal -I../../../sr c/basic/vx_config
> > > -I../../../src/basic/vx_log -I../../../src/basic/vx_math
> > > -I../../../src/basic/vx_util -I../../../src/libcode/vx_afm
> > > -I../../../src/libcode/vx_analysis_util
> > > -I../../../src/libcode/vx_color -I../../../src/libcode/vx_data2d
> > > -I../../../src/libcode/vx_data2d_factory
> > > -I../../../src/libcode/vx_data2d_grib
> > > -I../../../src/libcode/vx_data2d_grib2
> > > -I../../../src/libcode/vx_data2d_nccf
> > > -I../../../src/libcode/vx_data2d_nc_met
> > > -I../../../src/libcode/vx_data2d_nc_pinterp
> > > -I../../../src/libcode/vx_data2d_python
> > > -I../../../src/libcode/vx_python3_utils
> > > -I../../../src/libcode/vx_geodesy -I../../../src/libcode/vx_gis
> > > -I../../../src/libcode/vx_gnomon -I../../../src/libcode/vx_grid
> > > -I../../../src/libcode/vx_gsl_prob
> > > -I../../../src/libcode/vx_nav -I../../../src/libcode/vx_nc_obs
> > > -I../../../src/libcode/vx_nc_util
-I../../../src/libcode/vx_pb_util
> > > -I../../../src/libcode/vx_plot_util -I../../../src/libcode/vx_ps
> > > -I../../../src/libcode/vx_pxm -I../../../src/libcode/vx_render
> -I../../!
> > > ../src/libcode/vx_regrid -I../../../src/libcode/vx_shapedata
> > > -I../../../src/libcode/vx_solar
-I../../../src/libcode/vx_statistics
> > > -I../../../src/libcode/vx_stat_out
-I../../../src/libcode/vx_summary
> > > -I../../../src/libcode/vx_time_series
> > > -I../../../src/libcode/vx_series_data
> > > -I../../../src/libcode/vx_tc_util
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include -I../../basic/vx_log
> > > -I../../basic/vx_util
-I/usr/local/src/anaconda3/include/python3.6m
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include -DBLOCK4 -DWITH_GRIB2
> > > -DMET_BASE="\"/usr/local/src/MET/share/met\"" -c -o
> > > libvx_nc_obs_a-nc_obs_util.o `test -f 'nc_obs_util.cc' || echo
> > > './'`nc_obs_util.cc
"../../../src/basic/vx_config/config_file.h", line
> > > 83: warning: function
> > > "Dictionary::lookup(std::string)" is hidden by
> > > "MetConfig::lookup" --
> > > virtual function override intended?
> > > const DictionaryEntry * lookup(const char * name);
> > > ^
> > >
> > > "../../../src/basic/vx_config/config_file.h", line 85: warning:
> function
> > > "Dictionary::lookup(std::string)" is hidden by
> > > "MetConfig::lookup" --
> > > virtual function override intended?
> > > const DictionaryEntry * lookup(const char * name, const
> > > ConfigObjectType expected_type);
> > > ^
> > >
> > > "nc_obs_util.cc", line 670: internal error: assertion failed at:
> > > "../src/statements.c", line 7953
> > >
> > > return my_hdr_data;
> > > ^
> > >
> > > 1 catastrophic error detected in the compilation of
"nc_obs_util.cc".
> > > Compilation aborted.
> > > pgc++-Fatal-/usr/local/pgi/linux86-64-nollvm/19.10/bin/pggpp1
> > > pgc++TERMINATED
> > > by signal 6
> > >
> > > Both external_libs/netcdf/netcdf-4.4.1.1/make_install.log and
> > > external_libs/netcdf/netcdf-cxx4-4.3.0/make_install.log show
> > > successful compilations.
> > >
> > > I took a look at met-9.0.1/src/libcode/vx_nc_obs/nc_obs_util.cc,
and
> > > nothing looked amiss, but I'm much better at Fortan than at C or
C++.
> > >
> > > There is no file named statements.c in the MET code or any of
the
> > > external_libs (find | grep statements and locate statements.c
return
> > > nothing).
> > >
> > > I notice the flag -DMET_BASE="\"/usr/local/src/MET/share/met\""
is
> > > looking for a non-existent path, and even though
> > > /usr/local/src/MET/external_libs/share exists,
> > > /usr/local/src/MET/external_libs/share/met does not.
> > >
> > > Searching using Google for
"site:mailman.ucar.edu/pipermail/met_help
> > > my_hdr_data" or statements.c found no useful hits.
> > >
> > > I've catted my version of the compile_MET_all.sh script (edited
> > > slightly to remove the module calls) and the my.compile script
(used
> > > to set the
> > > variables) below - your gmail server rejected me trying to
attach them.
> > >
> > > Any hints?
> > >
> > > # cat my.compile
> > > #!/bin/csh -f
> > >
> > > setenv TEST_BASE `pwd`
> > > setenv MET_SUBDIR $TEST_BASE # will create met-9.0.1 inside
this dir
> > > setenv MET_TARBALL met-9.0.1.20200423.tar.gz
> > > setenv COMPILER pgi_19.10
> > > setenv PYTHON_MODULE python_3.6.9
> > > setenv MET_PYTHON /usr/local/src/anaconda3/bin/python
> > > #setenv MET_PYTHON_CC `python3-config --cflags` #setenv
MET_PYTHON_LD
> > > `python3-config --ldflags` setenv MET_PYTHON_CC
> > > '-I/usr/local/src/anaconda3/include/python3.6m'
> > > setenv MET_PYTHON_LD
> > > '-L/usr/local/src/anaconda3/lib/python3.6/config-3.6m-x86_64-
linux-gnu
> > > -L/usr/local/src/anaconda3/lib -lpython3.6m -lpthread -ldl
-lutil -lrt
> > -lm'
> > >
> > > setenv FC pgfortran
> > > setenv F77 pgf77
> > > setenv F90 pgfortran
> > > setenv CC pgcc
> > > setenv CXX pgc++
> > >
> > > setenv FFLAGS '-tp=istanbul'
> > > setenv CFLAGS '-tp=istanbul'
> > >
> > > ./compile_MET_all.sh >&! compile.out.`date +%Y-%m-%d`
> > >
> > >
> > >
> > >
> > > # cat copile_met_all.sh
> > > #!/bin/bash -l
> > >
> > > echo "TEST_BASE = ${TEST_BASE? "ERROR: TEST_BASE must be set"}"
> > > echo "COMPILER = ${COMPILER? "ERROR: COMPILER must be set"}"
> > > echo "MET_SUBDIR = ${MET_SUBDIR? "ERROR: MET_SUBDIR must be
set"}"
> > > echo "MET_TARBALL = ${MET_TARBALL? "ERROR: MET_TARBALL must be
set"}"
> > >
> > > export LIB_DIR=${TEST_BASE}/external_libs
> > > MET_DIR=${MET_SUBDIR}
> > > TAR_DIR=${TEST_BASE}/tar_files
> > > MET_TARBALL=${TAR_DIR}/${MET_TARBALL}
> > >
> > > # Create directory for libraries
> > > mkdir -p ${LIB_DIR}
> > >
> > > # Check that tar files exist
> > > if [ ! -e $TAR_DIR ]; then
> > > echo "TAR File directory doesn't exist: ${TAR_DIR}"
> > > exit 1
> > > fi
> > >
> > > # Update library linker path
> > > export
> > >
LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib:${MET_PYTHON}/lib:${LD_
> > > LIBRARY_PATH} echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> > >
> > > # Constants
> > > COMPILE_GSL=0
> > > COMPILE_BUFRLIB=0
> > > COMPILE_ZLIB=0
> > > COMPILE_LIBPNG=0
> > > COMPILE_JASPER=0
> > > COMPILE_G2CLIB=0
> > > COMPILE_HDF=0
> > > COMPILE_HDFEOS=0
> > > COMPILE_NETCDF=0
> > > COMPILE_FREETYPE=0
> > > COMPILE_CAIRO=0
> > > COMPILE_MET=1
> > > COMPILE_MET_PATCHES=0
> > >
> > > if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> > > COMPILE_MET=1
> > > fi
> > >
> > > echo
> > > echo "Compiling libraries into: ${LIB_DIR}"
> > >
> > > if [ ! -e ${LIB_DIR}/include ]; then
> > > mkdir ${LIB_DIR}/include
> > > fi
> > > if [ ! -e ${LIB_DIR}/lib ]; then
> > > mkdir ${LIB_DIR}/lib
> > > fi
> > >
> > > # Load compiler version
> > > COMPILER_FAMILY=` echo $COMPILER | cut -d'_' -f1`
> > > COMPILER_VERSION=`echo $COMPILER | cut -d'_' -f2`
> > >
> > > # echo "module load ${COMPILER_FAMILY}/${COMPILER_VERSION}"
> > > # echo ${COMPILER_FAMILY}/${COMPILER_VERSION}
> > > # module purge
> > > # module load ${COMPILER_FAMILY}/${COMPILER_VERSION}
> > > # if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> > > # module load craype
> > > # module switch craype craype-sandybridge
> > > # fi
> > >
> > > if [ ${COMPILER_FAMILY} == "gnu" ]; then
> > > export CC=`which gcc`
> > > export CXX=`which g++`
> > > export FC=`which gfortran`
> > > export F77=`which gfortran`
> > > export F90=`which gfortran`
> > > elif [ ${COMPILER_FAMILY} == "pgi" ]; then
> > > export CC=`which pgcc`
> > > export CXX=`which pgc++`
> > > export FC=`which pgf90`
> > > export F77=`which pgf90`
> > > export F90=`which pgf90`
> > > elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[
${COMPILER_FAMILY} ==
> > "ics"
> > > ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[
${COMPILER_FAMILY} ==
> > > "PrgEnv-intel" ]]; then
> > > export CC=`which icc`
> > > export CXX=`which icc`
> > > export FC=`which ifort`
> > > export F77=`which ifort`
> > > export F90=`which ifort`
> > > else
> > > echo "ERROR: \${COMPILER} must start with gnu, intel, ics,
ips,
> > > PrgEnv-intel, or pgi"
> > > exit
> > > fi
> > >
> > > echo "export CC=${CC}"
> > > echo "export CXX=${CXX}"
> > > echo "export FC=${FC}"
> > > echo "export F77=${F77}"
> > > echo "export F90=${F90}"
> > >
> > > # Load desired Python version
> > > # PYTHON_NAME=` echo $PYTHON_MODULE | cut -d'_' -f1` #
> > > PYTHON_VERSION_NUM=`echo $PYTHON_MODULE | cut -d'_' -f2` # echo
> > > "module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}"
> > > # echo ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> > > # module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> > >
> > > which python
> > > python --version
> > >
> > > # Compile GSL
> > > if [ $COMPILE_GSL -eq 1 ]; then
> > >
> > > if [ ${COMPILER_FAMILY} == "pgi" ]; then
> > > vrs="1.11";
> > > else
> > > vrs="2.1";
> > > fi
> > >
> > > echo
> > > echo "Compiling GSL_${vrs} at `date`"
> > > mkdir -p ${LIB_DIR}/gsl
> > > cd ${LIB_DIR}/gsl
> > > rm -rf gsl*
> > > tar -xf ${TAR_DIR}/gsl-${vrs}.tar.gz
> > > cd gsl*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile BUFRLIB
> > > if [ $COMPILE_BUFRLIB -eq 1 ]; then
> > >
> > > vrs="v11.3.0";
> > >
> > > echo
> > > echo "Compiling BUFRLIB_${vrs} at `date`"
> > > mkdir -p ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> > > cd ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> > > echo "cd `pwd`"
> > > rm -rf *
> > > tar -xf ${TAR_DIR}/BUFRLIB_`echo $vrs | sed 's/\./-/g'`.tar
> > >
> > > # Copy custom preproc.sh script into here
> > > #cp ${TAR_DIR}/preproc.sh_${vrs} preproc.sh
> > >
> > > #./preproc.sh > make.log 2>&1
> > > ${CC} -c -DUNDERSCORE `./getdefflags_C.sh` *.c >> make.log
2>&1
> > >
> > > # For GNU and Intel follow BUFRLIB11 instructions
> > > if [[ ${COMPILER_FAMILY} == "gnu" ]]; then
> > > ${FC} -c -fno-second-underscore `./getdefflags_F.sh` modv*.F
> > > moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> > > elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[
${COMPILER_FAMILY} ==
> > > "ics" ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[
${COMPILER_FAMILY}
> > > == "PrgEnv-intel" ]]; then
> > > ${FC} -c `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f
|
> > > grep -v "mod[av]_"` >> make.log 2>&1
> > > elif [[ ${COMPILER_FAMILY} == "pgi" ]]; then
> > > ${FC} -c -Mnosecond_underscore `./getdefflags_F.sh` modv*.F
> > > moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> > > fi
> > >
> > > ar crv libbufr.a *.o >> make.log 2>&1
> > > cp *.a ${LIB_DIR}/lib/.
> > > fi
> > >
> > > # Compile ZLIB using gcc, per Boi Vuong from NCO on 05/23/2019
if [
> > > $COMPILE_ZLIB -eq 1 ]; then
> > > echo
> > > echo "Compiling ZLIB at `date`"
> > > mkdir -p ${LIB_DIR}/zlib
> > > cd ${LIB_DIR}/zlib
> > > rm -rf zlib*
> > > tar -xzf ${TAR_DIR}/zlib*.tar.gz
> > > cd zlib*
> > > echo "cd `pwd`"
> > > # Store the original CC compiler
> > > CC_SAVE=${CC}
> > > echo "export CC=`which gcc`"
> > > export CC=`which gcc`
> > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > # Reset CC by to the original setting
> > > echo "export CC=${CC_SAVE}"
> > > export CC=${CC_SAVE}
> > > fi
> > >
> > > # Compile LIBPNG using gcc, per Boi Vuong from NCO on 05/23/2019
if [[
> > > $COMPILE_LIBPNG -eq 1 && $HOST != ys* ]]; then
> > > echo
> > > echo "Compiling LIBPNG at `date`"
> > > mkdir -p ${LIB_DIR}/libpng
> > > cd ${LIB_DIR}/libpng
> > > rm -rf libpng*
> > > tar -xzf ${TAR_DIR}/libpng*.tar.gz
> > > cd libpng*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-
L/${LIB_DIR}/lib
> > > CC=gcc CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib
CC=gcc
> > > CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile JASPER using gcc, per Boi Vuong from NCO on 05/23/2019
if [
> > > $COMPILE_JASPER -eq 1 ]; then
> > > echo
> > > echo "Compiling JASPER at `date`"
> > > mkdir -p ${LIB_DIR}/jasper
> > > cd ${LIB_DIR}/jasper
> > > rm -rf jasper*
> > > unzip ${TAR_DIR}/jasper*.zip > /dev/null 2>&1
> > > cd jasper*
> > > export CPPFLAGS="-I${LIB_DIR}/include"
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} CC=gcc > configure.log
2>&1"
> > > ./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile G2CLIB
> > > if [ $COMPILE_G2CLIB -eq 1 ]; then
> > > echo
> > > echo "Compiling G2CLIB at `date`"
> > > mkdir -p ${LIB_DIR}/g2clib
> > > cd ${LIB_DIR}/g2clib
> > > rm -rf g2clib*
> > > tar -xf ${TAR_DIR}/g2clib*.tar
> > > cd g2clib*
> > > cat makefile | \
> > > sed -r 's/INC=.*/INC=-I${LIB_DIR}\/include
> > > -I${LIB_DIR}\/include\/jasper/g' | \
> > > sed 's/CC=gcc/CC=${CC_COMPILER}/g' | \
> > > sed 's/-D__64BIT__//g' \
> > > > makefile_new
> > > mv makefile_new makefile
> > > export CC_COMPILER=${CC}
> > > echo "cd `pwd`"
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > cp libg2c*.a ${LIB_DIR}/lib/libgrib2c.a
> > > cp *.h ${LIB_DIR}/include/.
> > > fi
> > >
> > > # Compile HDF
> > > # Depends on jpeg
> > > # Edit 'mfhdf/hdiff/Makefile' as follows:
> > > # From: LIBS = -ljpeg -lz
> > > # To: LIBS = -ljpeg -lz -lm
> > > if [ $COMPILE_HDF -eq 1 ]; then
> > > echo
> > > echo "Compiling HDF at `date`"
> > > mkdir -p ${LIB_DIR}/hdf
> > > cd ${LIB_DIR}/hdf
> > > rm -rf HDF*
> > > tar -xf ${TAR_DIR}/HDF4.2*.tar.gz
> > > cd HDF*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} --disable-netcdf
> > > --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log
2>&1"
> > > ./configure --prefix=${LIB_DIR} --disable-netcdf
> > > --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log
2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > cat mfhdf/hdiff/Makefile | sed 's/LIBS = -ljpeg -lz/LIBS =
-ljpeg
> > > -lz -lm/g' > Makefile_NEW
> > > mv Makefile_NEW mfhdf/hdiff/Makefile
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile HDFEOS
> > > # Depends on HDF
> > > if [ $COMPILE_HDFEOS -eq 1 ]; then
> > > echo
> > > echo "Compiling HDFEOS at `date`"
> > > mkdir -p ${LIB_DIR}/hdfeos
> > > cd ${LIB_DIR}/hdfeos
> > > rm -rf HDF-EOS*
> > > tar -xzf ${TAR_DIR}/HDF-EOS*.tar.*
> > > cd hdfeos
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} >
> > > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR}
> > > --with-jpeg=${LIB_DIR} > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > cp include/*.h ${LIB_DIR}/include/.
> > > fi
> > >
> > > # Compile NetCDF
> > > if [ $COMPILE_NETCDF -eq 1 ]; then
> > >
> > > echo
> > > echo "Compiling HDF5 at `date`"
> > > mkdir -p ${LIB_DIR}/hdf5
> > > cd ${LIB_DIR}/hdf5
> > > rm -rf hdf5*
> > > tar -xzf ${TAR_DIR}/hdf5*.tar.gz
> > > cd hdf5*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} --with-
zlib=${LIB_DIR}/lib
> > > LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
configure.log
> > 2>&1"
> > > ./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> > > LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
configure.log
> > 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo
> > > echo "Compiling NetCDF-C at `date`"
> > > mkdir -p ${LIB_DIR}/netcdf
> > > cd ${LIB_DIR}/netcdf
> > > rm -rf netcdf*
> > > unzip ${TAR_DIR}/netcdf-4*.zip > /dev/null 2>&1
> > > cd netcdf-4*
> > > export FC=''
> > > export F90=''
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo
> > > echo "Compiling NetCDF-CXX at `date`"
> > > cd ${LIB_DIR}/netcdf
> > > tar -xzf ${TAR_DIR}/netcdf-cxx*.tar.gz
> > > cd netcdf-cxx*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile FREETYPE
> > > if [ $COMPILE_FREETYPE -eq 1 ]; then
> > > echo
> > > echo "Compiling FREETYPE at `date`"
> > > mkdir -p ${LIB_DIR}/freetype
> > > cd ${LIB_DIR}/freetype
> > > rm -rf freetype*
> > > tar -xzf ${TAR_DIR}/freetype*.tar.gz
> > > cd freetype*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} --with-png=yes >
configure.log
> > > 2>&1"
> > > ./configure --prefix=${LIB_DIR} --with-png=yes > configure.log
2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1 --with-
zlib=${LIB_DIR}
> > > LDFLAGS=-L${LIB_DIR} CPPFLAGS=-I${LIB_DIR}"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > >
> > > # Compile CAIRO
> > > if [ $COMPILE_CAIRO -eq 1 ]; then
> > >
> > > echo
> > > echo "Compiling pixman at `date`"
> > > mkdir -p ${LIB_DIR}/pixman
> > > cd ${LIB_DIR}/pixman
> > > rm -rf pixman*
> > > tar -xzf ${TAR_DIR}/pixman*.tar.gz
> > > cd pixman*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > >
> > > echo
> > > echo "Compiling CAIRO at `date`"
> > > mkdir -p ${LIB_DIR}/cairo
> > > cd ${LIB_DIR}/cairo
> > > rm -rf cairo*
> > > tar -xf ${TAR_DIR}/cairo*.tar*
> > > cd cairo*
> > > export PKG_CONFIG=`which pkg-config`
> > > if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> > > export PKG_CONFIG_PATH=${LIB_DIR}/lib/pkgconfig/
> > > fi
> > > if [ ${COMPILER_FAMILY} == "ips" ]; then
> > > export
> > >
> >
>
LD_LIBRARY_PATH=/usrx/local/prod/intel/2015UP06/lib/intel64:${LD_LIBRARY_PATH}
> > > echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> > > export LDFLAGS="-shared-intel -L/${LIB_DIR}/lib
> > > -L/usrx/local/prod/intel/2018UP04/lib/intel64/"
> > > export CPPFLAGS=-I/${LIB_DIR}/include
> > > export CFLAGS=-
I/usrx/local/prod/intel/2015UP06/include/intel64/
> > > fi
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR}
> > > ax_cv_c_float_words_bigendian=no LDFLAGS=-L/${LIB_DIR}/lib
> > > CPPFLAGS=-I/${LIB_DIR}/include > configure.log
> > > 2>&1"
> > > ./configure --prefix=${LIB_DIR}
ax_cv_c_float_words_bigendian=no
> > > LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include >
> > > configure.log
> > > 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile MET
> > > if [ $COMPILE_MET -eq 1 ]; then
> > >
> > > echo
> > > echo "Compiling MET at `date`"
> > > cd ${MET_DIR}
> > > echo "cd `pwd`"
> > > rm -rf met*
> > > tar -zxvf ${MET_TARBALL}
> > > cd met*
> > > echo "cd `pwd`"
> > > if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> > > cp ${TAR_DIR}/met*_patches*.tar.gz .
> > > tar -zxf met*_patches*.tar.gz
> > > fi
> > >
> > > export MET_NETCDF=${LIB_DIR}
> > > export MET_BUFRLIB=${LIB_DIR}/lib
> > > export MET_GSL=${LIB_DIR}
> > > export MET_GRIB2C=${LIB_DIR}
> > > export MET_HDF5=${LIB_DIR}
> > > export MET_HDF=${LIB_DIR}
> > > export MET_HDFEOS=${LIB_DIR}
> > > #export MET_CAIROINC=${LIB_DIR}/include/cairo
> > > #export MET_CAIROLIB=${LIB_DIR}/lib
> > > #export MET_FREETYPEINC=${LIB_DIR}/include/freetype2
> > > #export MET_FREETYPELIB=${LIB_DIR}/lib
> > > export MET_FONT_DIR=${TEST_BASE}/fonts
> > > export MET_PYTHON_LD=${MET_PYTHON_LD}
> > > export MET_PYTHON_CC=${MET_PYTHON_CC}
> > > export LDFLAGS="-Wl,--disable-new-dtags"
> > > export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib"
> > > export LDFLAGS="${LDFLAGS}
> > > -Wl,-rpath,${LIB_DIR}/lib:${MET_NETCDF}/lib:${MET_PYTHON/lib}"
> > > export CPPFLAGS=-I${LIB_DIR}/include
> > >
> > >
> > > echo "MET Configuration settings..."
> > > printenv | egrep "^MET_" | sed -r 's/^/export /g'
> > >
> > > export OPT_ARGS=''
> > > if [[ $COMPILER_FAMILY == "pgi" ]]; then
> > > export OPT_ARGS="${OPT_ARGS} FFLAGS=-lpgf90"
> > > fi
> > >
> > > echo "cd `pwd`"
> > > if [ -z ${PYTHON_MODULE_USE} ]; then
> > > #echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-mode_graphics --enable-lidar2nc
${OPT_ARGS} >
> > configure.log 2>&1"
> > > #./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> > > --enable-mode_graphics --enable-lidar2nc ${OPT_ARGS} >
configure.log
> 2>&1
> > > echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log
2>&1"
> > > ./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> > > --enable-lidar2nc ${OPT_ARGS} > configure.log 2>&1
> > > else
> > > #echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > --enable-python ${OPT_ARGS} > configure.log 2>&1"
> > > #./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> > > --enable-mode_graphics --enable-lidar2nc --enable-python
${OPT_ARGS} >
> > > configure.log 2>&1
> > > echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} >
> > configure.log 2>&1"
> > > ./configure --prefix=${MET_DIR} --enable-grib2 --enable-
modis
> > > --enable-lidar2nc --enable-python ${OPT_ARGS} > configure.log
2>&1
> > > fi
> > >
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo "make test > make_test.log 2>&1"
> > > make test > make_test.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make test returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > fi
> > >
> > > echo "Finished compiling at `date
> > >
> > > Bart
> > > ________________________________________
> > > Bart Brashers, Ph.D.
> > > Senior Managing Consultant
> > > Global Air Quality Practice Network Leader
> > >
> > > D +1 425-412-1812
> > > M +1 206-550-2606
> > > bbrashers at ramboll.com<mailto:bbrashers at ramboll.com>
> > >
> > > Ramboll
> > > 19020 33rd Avenue West
> > > Suite 310
> > > Lynnwood, WA 98036
> > > USA
> > > http://www.ramboll.com/environment-and-health
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
--
Julie Prestopnik
Software Engineer
National Center for Atmospheric Research
Research Applications Laboratory
Phone: 303.497.8399
Email: jpresto at ucar.edu
My working day may not be your working day. Please do not feel
obliged to
reply to this email outside of your normal working hours.
------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
From: Bart Brashers
Time: Tue Apr 28 14:52:32 2020
Yes, after a few rounds of guessing which flags in the output of
`python3-config --ldflags` were actually required (leave off the
-Xlinker -export-dynamic).
Thanks, and I'd be happy to be a beta or rc tester for a future PGI
fix.
Bart
-----Original Message-----
From: Julie Prestopnik via RT <met_help at ucar.edu>
Sent: Tuesday, April 28, 2020 1:10 PM
To: Bart Brashers <bbrashers at ramboll.com>
Subject: Re: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
Hi Bart.
We were able to reproduce the problem using pgi on Cheyenne and will
need to look into addressing it for our next release. Thank you for
bringing this to our attention. Were you able to compile successfully
using the GNU compilers?
Julie
On Mon, Apr 27, 2020 at 4:12 PM John Halley Gotway via RT
<met_help at ucar.edu>
wrote:
>
> <URL:
>
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frt.r
>
ap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%7C01
>
%7Cbbrashers%40ramboll.com%7Ce83f871e0304416e6bc908d7ebb01b38%7Cc8823c
>
91be814f89b0246c3dd789c106%7C0%7C0%7C637237013923870785&sdata=Uc2Y
> C8mLODlzTm07qCyDegfaKW%2BDoMpIBkqxT18tJKg%3D&reserved=0 >
>
> Bart,
>
> The vast majority of MET is in C++ with only small amounts of
FORTRAN
> called by the pb2nc and tc_pairs tools. But I don't have any speed
> comparisons to reference. But we do compile MET for operational use
> by NOAA labs and they prefer Intel.
>
> Thanks,
> John
>
> On Mon, Apr 27, 2020 at 4:08 PM Bart Brashers via RT
> <met_help at ucar.edu>
> wrote:
>
> >
> > <URL:
> >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frt
> >
.rap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%
> >
7C01%7Cbbrashers%40ramboll.com%7Ce83f871e0304416e6bc908d7ebb01b38%7C
> >
c8823c91be814f89b0246c3dd789c106%7C0%7C0%7C637237013923870785&sd
> >
ata=Uc2YC8mLODlzTm07qCyDegfaKW%2BDoMpIBkqxT18tJKg%3D&reserved=0
> > >
> >
> > Hi John,
> >
> > Do you find a significant performance difference between using the
> > GNU compilers and the Intel compilers? If not, then I can use the
> > GNU compilers.
> >
> > As I understand it, gcc is pretty close to commercial compilers,
but
> > gfortran is still noticeably slower than ifort or pgfortran. But
> > perhaps
> in
> > MET there's not that many components that rely on Fortran?
> >
> > Thanks,
> >
> > Bart
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT <met_help at ucar.edu>
> > Sent: Monday, April 27, 2020 2:19 PM
> > To: Bart Brashers <bbrashers at ramboll.com>
> > Subject: Re: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
> >
> > Hello Bart,
> >
> > I see you're having trouble compiling MET using PGI version 19.
> > Thanks for sending a detailed description of the issue.
> >
> > We do our development using the GNU compilers and most
installations
> using
> > Intel. And we do not routinely test using PGI. So I can see an
> > issue
> may
> > have crept up on us. I've assigned this ticket to Julie
Prestopnik,
> > our build engineer who handles most compilation problems.
> >
> > She'll try compiling met-9.0.1 using PGI 19 on NCAR's machine,
cheyenne.
> > And hopefully that'll help address the issues you've run into.
> >
> > Thanks,
> > John Halley Gotway
> >
> > On Sat, Apr 25, 2020 at 5:51 PM Bart Brashers via RT
> > <met_help at ucar.edu>
> > wrote:
> >
> > >
> > > Sat Apr 25 17:51:11 2020: Request 95051 was acted upon.
> > > Transaction: Ticket created by bbrashers at ramboll.com
> > > Queue: met_help
> > > Subject: Issue compiling MET-9.0.1
> > > Owner: Nobody
> > > Requestors: bbrashers at ramboll.com
> > > Status: new
> > > Ticket <URL:
> > >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > rt.r
> > >
ap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%
> > > 7C01
> > >
%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad108d7eaf08d8e%7Cc8
> > > 823c
> > >
91be814f89b0246c3dd789c106%7C0%7C0%7C637236191212685303&sdata=
> > > qZxN
> > > J1VYztm9g1QVxHtW69QODhB6%2Fj0q40HXKePZO8A%3D&reserved=0 >
> > >
> > >
> > > Hi, I looked in all the places listed<
> > >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > dtce
> > > nter.org%2Fcommunity-code%2Fmodel-evaluation-tools-met%2Fmet-
help-
> > > desk
> > >
&data=02%7C01%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad1
> > > 08d7
> > >
eaf08d8e%7Cc8823c91be814f89b0246c3dd789c106%7C0%7C0%7C637236191212
> > > 6952
> > >
98&sdata=PYLxk0pnnsDaNGP0EviCESvqsJb7k3Zv4Fx85Bwd7h0%3D&re
> > > serv ed=0> first and did some of Googling, but can't find the
> > > solution to this one.
> > >
> > > I'm compiling met-9.0.1 using PGI-CE version 19.10-0. I am using
> > > the sample compile_MET_all.sh script to install into
/usr/local/src/MET.
> > > The external_libs all compile fine, MET's configure runs fine,
but
> > > it fails to compile met-9.0.1/src/libcode/vx_nc_obs:
> > >
> > > Making all in vx_nc_obs
> > > make[4]: Entering directory
> > > `/usr/local/src/MET/met-9.0.1/src/libcode/vx_nc_obs'
> > > source='nc_obs_util.cc' object='libvx_nc_obs_a-nc_obs_util.o'
> > > libtool=no \ DEPDIR=.deps depmode=pgcc /bin/sh ../../../depcomp
\
> > > /usr/local/pgi/linux86-64/2019/bin/pgc++ -DHAVE_CONFIG_H -I.
-I../../..
> > > -I../../../src/basic/vx_cal -I../../../sr c/basic/vx_config
> > > -I../../../src/basic/vx_log -I../../../src/basic/vx_math
> > > -I../../../src/basic/vx_util -I../../../src/libcode/vx_afm
> > > -I../../../src/libcode/vx_analysis_util
> > > -I../../../src/libcode/vx_color -I../../../src/libcode/vx_data2d
> > > -I../../../src/libcode/vx_data2d_factory
> > > -I../../../src/libcode/vx_data2d_grib
> > > -I../../../src/libcode/vx_data2d_grib2
> > > -I../../../src/libcode/vx_data2d_nccf
> > > -I../../../src/libcode/vx_data2d_nc_met
> > > -I../../../src/libcode/vx_data2d_nc_pinterp
> > > -I../../../src/libcode/vx_data2d_python
> > > -I../../../src/libcode/vx_python3_utils
> > > -I../../../src/libcode/vx_geodesy -I../../../src/libcode/vx_gis
> > > -I../../../src/libcode/vx_gnomon -I../../../src/libcode/vx_grid
> > > -I../../../src/libcode/vx_gsl_prob
> > > -I../../../src/libcode/vx_nav -I../../../src/libcode/vx_nc_obs
> > > -I../../../src/libcode/vx_nc_util
> > > -I../../../src/libcode/vx_pb_util
> > > -I../../../src/libcode/vx_plot_util -I../../../src/libcode/vx_ps
> > > -I../../../src/libcode/vx_pxm -I../../../src/libcode/vx_render
> -I../../!
> > > ../src/libcode/vx_regrid -I../../../src/libcode/vx_shapedata
> > > -I../../../src/libcode/vx_solar
> > > -I../../../src/libcode/vx_statistics
> > > -I../../../src/libcode/vx_stat_out
> > > -I../../../src/libcode/vx_summary
> > > -I../../../src/libcode/vx_time_series
> > > -I../../../src/libcode/vx_series_data
> > > -I../../../src/libcode/vx_tc_util
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include -I../../basic/vx_log
> > > -I../../basic/vx_util
> > > -I/usr/local/src/anaconda3/include/python3.6m
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include
> > > -I/usr/local/src/MET/external_libs/include -DBLOCK4 -DWITH_GRIB2
> > > -DMET_BASE="\"/usr/local/src/MET/share/met\"" -c -o
> > > libvx_nc_obs_a-nc_obs_util.o `test -f 'nc_obs_util.cc' || echo
> > > './'`nc_obs_util.cc
"../../../src/basic/vx_config/config_file.h",
> > > line
> > > 83: warning: function
> > > "Dictionary::lookup(std::string)" is hidden by
> > > "MetConfig::lookup" --
> > > virtual function override intended?
> > > const DictionaryEntry * lookup(const char * name);
> > > ^
> > >
> > > "../../../src/basic/vx_config/config_file.h", line 85: warning:
> function
> > > "Dictionary::lookup(std::string)" is hidden by
> > > "MetConfig::lookup" --
> > > virtual function override intended?
> > > const DictionaryEntry * lookup(const char * name, const
> > > ConfigObjectType expected_type);
> > > ^
> > >
> > > "nc_obs_util.cc", line 670: internal error: assertion failed at:
> > > "../src/statements.c", line 7953
> > >
> > > return my_hdr_data;
> > > ^
> > >
> > > 1 catastrophic error detected in the compilation of
"nc_obs_util.cc".
> > > Compilation aborted.
> > > pgc++-Fatal-/usr/local/pgi/linux86-64-nollvm/19.10/bin/pggpp1
> > > pgc++TERMINATED
> > > by signal 6
> > >
> > > Both external_libs/netcdf/netcdf-4.4.1.1/make_install.log and
> > > external_libs/netcdf/netcdf-cxx4-4.3.0/make_install.log show
> > > successful compilations.
> > >
> > > I took a look at met-9.0.1/src/libcode/vx_nc_obs/nc_obs_util.cc,
> > > and nothing looked amiss, but I'm much better at Fortan than at
C or C++.
> > >
> > > There is no file named statements.c in the MET code or any of
the
> > > external_libs (find | grep statements and locate statements.c
> > > return nothing).
> > >
> > > I notice the flag -DMET_BASE="\"/usr/local/src/MET/share/met\""
is
> > > looking for a non-existent path, and even though
> > > /usr/local/src/MET/external_libs/share exists,
> > > /usr/local/src/MET/external_libs/share/met does not.
> > >
> > > Searching using Google for
> > > "site:mailman.ucar.edu/pipermail/met_help
> > > my_hdr_data" or statements.c found no useful hits.
> > >
> > > I've catted my version of the compile_MET_all.sh script (edited
> > > slightly to remove the module calls) and the my.compile script
> > > (used to set the
> > > variables) below - your gmail server rejected me trying to
attach them.
> > >
> > > Any hints?
> > >
> > > # cat my.compile
> > > #!/bin/csh -f
> > >
> > > setenv TEST_BASE `pwd`
> > > setenv MET_SUBDIR $TEST_BASE # will create met-9.0.1 inside
this dir
> > > setenv MET_TARBALL met-9.0.1.20200423.tar.gz
> > > setenv COMPILER pgi_19.10
> > > setenv PYTHON_MODULE python_3.6.9
> > > setenv MET_PYTHON /usr/local/src/anaconda3/bin/python
> > > #setenv MET_PYTHON_CC `python3-config --cflags` #setenv
> > > MET_PYTHON_LD `python3-config --ldflags` setenv MET_PYTHON_CC
> > > '-I/usr/local/src/anaconda3/include/python3.6m'
> > > setenv MET_PYTHON_LD
> > > '-L/usr/local/src/anaconda3/lib/python3.6/config-3.6m-x86_64-
linux
> > > -gnu -L/usr/local/src/anaconda3/lib -lpython3.6m -lpthread -ldl
> > > -lutil -lrt
> > -lm'
> > >
> > > setenv FC pgfortran
> > > setenv F77 pgf77
> > > setenv F90 pgfortran
> > > setenv CC pgcc
> > > setenv CXX pgc++
> > >
> > > setenv FFLAGS '-tp=istanbul'
> > > setenv CFLAGS '-tp=istanbul'
> > >
> > > ./compile_MET_all.sh >&! compile.out.`date +%Y-%m-%d`
> > >
> > >
> > >
> > >
> > > # cat copile_met_all.sh
> > > #!/bin/bash -l
> > >
> > > echo "TEST_BASE = ${TEST_BASE? "ERROR: TEST_BASE must be set"}"
> > > echo "COMPILER = ${COMPILER? "ERROR: COMPILER must be set"}"
> > > echo "MET_SUBDIR = ${MET_SUBDIR? "ERROR: MET_SUBDIR must be
set"}"
> > > echo "MET_TARBALL = ${MET_TARBALL? "ERROR: MET_TARBALL must be
set"}"
> > >
> > > export LIB_DIR=${TEST_BASE}/external_libs
> > > MET_DIR=${MET_SUBDIR}
> > > TAR_DIR=${TEST_BASE}/tar_files
> > > MET_TARBALL=${TAR_DIR}/${MET_TARBALL}
> > >
> > > # Create directory for libraries
> > > mkdir -p ${LIB_DIR}
> > >
> > > # Check that tar files exist
> > > if [ ! -e $TAR_DIR ]; then
> > > echo "TAR File directory doesn't exist: ${TAR_DIR}"
> > > exit 1
> > > fi
> > >
> > > # Update library linker path
> > > export
> > >
LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib:${MET_PYTHON}/lib:$
> > > {LD_ LIBRARY_PATH} echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> > >
> > > # Constants
> > > COMPILE_GSL=0
> > > COMPILE_BUFRLIB=0
> > > COMPILE_ZLIB=0
> > > COMPILE_LIBPNG=0
> > > COMPILE_JASPER=0
> > > COMPILE_G2CLIB=0
> > > COMPILE_HDF=0
> > > COMPILE_HDFEOS=0
> > > COMPILE_NETCDF=0
> > > COMPILE_FREETYPE=0
> > > COMPILE_CAIRO=0
> > > COMPILE_MET=1
> > > COMPILE_MET_PATCHES=0
> > >
> > > if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> > > COMPILE_MET=1
> > > fi
> > >
> > > echo
> > > echo "Compiling libraries into: ${LIB_DIR}"
> > >
> > > if [ ! -e ${LIB_DIR}/include ]; then mkdir ${LIB_DIR}/include
fi
> > > if [ ! -e ${LIB_DIR}/lib ]; then
> > > mkdir ${LIB_DIR}/lib
> > > fi
> > >
> > > # Load compiler version
> > > COMPILER_FAMILY=` echo $COMPILER | cut -d'_' -f1`
> > > COMPILER_VERSION=`echo $COMPILER | cut -d'_' -f2`
> > >
> > > # echo "module load ${COMPILER_FAMILY}/${COMPILER_VERSION}"
> > > # echo ${COMPILER_FAMILY}/${COMPILER_VERSION}
> > > # module purge
> > > # module load ${COMPILER_FAMILY}/${COMPILER_VERSION}
> > > # if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> > > # module load craype
> > > # module switch craype craype-sandybridge
> > > # fi
> > >
> > > if [ ${COMPILER_FAMILY} == "gnu" ]; then
> > > export CC=`which gcc`
> > > export CXX=`which g++`
> > > export FC=`which gfortran`
> > > export F77=`which gfortran`
> > > export F90=`which gfortran`
> > > elif [ ${COMPILER_FAMILY} == "pgi" ]; then
> > > export CC=`which pgcc`
> > > export CXX=`which pgc++`
> > > export FC=`which pgf90`
> > > export F77=`which pgf90`
> > > export F90=`which pgf90`
> > > elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[
${COMPILER_FAMILY}
> > > ==
> > "ics"
> > > ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[
${COMPILER_FAMILY}
> > > == "PrgEnv-intel" ]]; then
> > > export CC=`which icc`
> > > export CXX=`which icc`
> > > export FC=`which ifort`
> > > export F77=`which ifort`
> > > export F90=`which ifort`
> > > else
> > > echo "ERROR: \${COMPILER} must start with gnu, intel, ics,
ips,
> > > PrgEnv-intel, or pgi"
> > > exit
> > > fi
> > >
> > > echo "export CC=${CC}"
> > > echo "export CXX=${CXX}"
> > > echo "export FC=${FC}"
> > > echo "export F77=${F77}"
> > > echo "export F90=${F90}"
> > >
> > > # Load desired Python version
> > > # PYTHON_NAME=` echo $PYTHON_MODULE | cut -d'_' -f1` #
> > > PYTHON_VERSION_NUM=`echo $PYTHON_MODULE | cut -d'_' -f2` # echo
> > > "module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}"
> > > # echo ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> > > # module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> > >
> > > which python
> > > python --version
> > >
> > > # Compile GSL
> > > if [ $COMPILE_GSL -eq 1 ]; then
> > >
> > > if [ ${COMPILER_FAMILY} == "pgi" ]; then
> > > vrs="1.11";
> > > else
> > > vrs="2.1";
> > > fi
> > >
> > > echo
> > > echo "Compiling GSL_${vrs} at `date`"
> > > mkdir -p ${LIB_DIR}/gsl
> > > cd ${LIB_DIR}/gsl
> > > rm -rf gsl*
> > > tar -xf ${TAR_DIR}/gsl-${vrs}.tar.gz
> > > cd gsl*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile BUFRLIB
> > > if [ $COMPILE_BUFRLIB -eq 1 ]; then
> > >
> > > vrs="v11.3.0";
> > >
> > > echo
> > > echo "Compiling BUFRLIB_${vrs} at `date`"
> > > mkdir -p ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> > > cd ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> > > echo "cd `pwd`"
> > > rm -rf *
> > > tar -xf ${TAR_DIR}/BUFRLIB_`echo $vrs | sed 's/\./-/g'`.tar
> > >
> > > # Copy custom preproc.sh script into here
> > > #cp ${TAR_DIR}/preproc.sh_${vrs} preproc.sh
> > >
> > > #./preproc.sh > make.log 2>&1
> > > ${CC} -c -DUNDERSCORE `./getdefflags_C.sh` *.c >> make.log
2>&1
> > >
> > > # For GNU and Intel follow BUFRLIB11 instructions
> > > if [[ ${COMPILER_FAMILY} == "gnu" ]]; then
> > > ${FC} -c -fno-second-underscore `./getdefflags_F.sh` modv*.F
> > > moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> > > elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[
> > > ${COMPILER_FAMILY} == "ics" ]] || [[ ${COMPILER_FAMILY} == "ips"
> > > ]] || [[ ${COMPILER_FAMILY} == "PrgEnv-intel" ]]; then
> > > ${FC} -c `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F *.f
|
> > > grep -v "mod[av]_"` >> make.log 2>&1
> > > elif [[ ${COMPILER_FAMILY} == "pgi" ]]; then
> > > ${FC} -c -Mnosecond_underscore `./getdefflags_F.sh` modv*.F
> > > moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> > > fi
> > >
> > > ar crv libbufr.a *.o >> make.log 2>&1
> > > cp *.a ${LIB_DIR}/lib/.
> > > fi
> > >
> > > # Compile ZLIB using gcc, per Boi Vuong from NCO on 05/23/2019
if
> > > [ $COMPILE_ZLIB -eq 1 ]; then
> > > echo
> > > echo "Compiling ZLIB at `date`"
> > > mkdir -p ${LIB_DIR}/zlib
> > > cd ${LIB_DIR}/zlib
> > > rm -rf zlib*
> > > tar -xzf ${TAR_DIR}/zlib*.tar.gz
> > > cd zlib*
> > > echo "cd `pwd`"
> > > # Store the original CC compiler
> > > CC_SAVE=${CC}
> > > echo "export CC=`which gcc`"
> > > export CC=`which gcc`
> > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > # Reset CC by to the original setting
> > > echo "export CC=${CC_SAVE}"
> > > export CC=${CC_SAVE}
> > > fi
> > >
> > > # Compile LIBPNG using gcc, per Boi Vuong from NCO on 05/23/2019
> > > if [[ $COMPILE_LIBPNG -eq 1 && $HOST != ys* ]]; then
> > > echo
> > > echo "Compiling LIBPNG at `date`"
> > > mkdir -p ${LIB_DIR}/libpng
> > > cd ${LIB_DIR}/libpng
> > > rm -rf libpng*
> > > tar -xzf ${TAR_DIR}/libpng*.tar.gz
> > > cd libpng*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-
L/${LIB_DIR}/lib
> > > CC=gcc CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib
CC=gcc
> > > CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile JASPER using gcc, per Boi Vuong from NCO on 05/23/2019
> > > if [ $COMPILE_JASPER -eq 1 ]; then
> > > echo
> > > echo "Compiling JASPER at `date`"
> > > mkdir -p ${LIB_DIR}/jasper
> > > cd ${LIB_DIR}/jasper
> > > rm -rf jasper*
> > > unzip ${TAR_DIR}/jasper*.zip > /dev/null 2>&1
> > > cd jasper*
> > > export CPPFLAGS="-I${LIB_DIR}/include"
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} CC=gcc > configure.log
2>&1"
> > > ./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile G2CLIB
> > > if [ $COMPILE_G2CLIB -eq 1 ]; then
> > > echo
> > > echo "Compiling G2CLIB at `date`"
> > > mkdir -p ${LIB_DIR}/g2clib
> > > cd ${LIB_DIR}/g2clib
> > > rm -rf g2clib*
> > > tar -xf ${TAR_DIR}/g2clib*.tar
> > > cd g2clib*
> > > cat makefile | \
> > > sed -r 's/INC=.*/INC=-I${LIB_DIR}\/include
> > > -I${LIB_DIR}\/include\/jasper/g' | \
> > > sed 's/CC=gcc/CC=${CC_COMPILER}/g' | \
> > > sed 's/-D__64BIT__//g' \
> > > > makefile_new
> > > mv makefile_new makefile
> > > export CC_COMPILER=${CC}
> > > echo "cd `pwd`"
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > cp libg2c*.a ${LIB_DIR}/lib/libgrib2c.a
> > > cp *.h ${LIB_DIR}/include/.
> > > fi
> > >
> > > # Compile HDF
> > > # Depends on jpeg
> > > # Edit 'mfhdf/hdiff/Makefile' as follows:
> > > # From: LIBS = -ljpeg -lz
> > > # To: LIBS = -ljpeg -lz -lm
> > > if [ $COMPILE_HDF -eq 1 ]; then
> > > echo
> > > echo "Compiling HDF at `date`"
> > > mkdir -p ${LIB_DIR}/hdf
> > > cd ${LIB_DIR}/hdf
> > > rm -rf HDF*
> > > tar -xf ${TAR_DIR}/HDF4.2*.tar.gz
> > > cd HDF*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} --disable-netcdf
> > > --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log
2>&1"
> > > ./configure --prefix=${LIB_DIR} --disable-netcdf
> > > --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log
2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > cat mfhdf/hdiff/Makefile | sed 's/LIBS = -ljpeg -lz/LIBS =
> > > -ljpeg -lz -lm/g' > Makefile_NEW
> > > mv Makefile_NEW mfhdf/hdiff/Makefile
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile HDFEOS
> > > # Depends on HDF
> > > if [ $COMPILE_HDFEOS -eq 1 ]; then
> > > echo
> > > echo "Compiling HDFEOS at `date`"
> > > mkdir -p ${LIB_DIR}/hdfeos
> > > cd ${LIB_DIR}/hdfeos
> > > rm -rf HDF-EOS*
> > > tar -xzf ${TAR_DIR}/HDF-EOS*.tar.*
> > > cd hdfeos
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} >
> > > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR}
> > > --with-jpeg=${LIB_DIR} > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > cp include/*.h ${LIB_DIR}/include/.
> > > fi
> > >
> > > # Compile NetCDF
> > > if [ $COMPILE_NETCDF -eq 1 ]; then
> > >
> > > echo
> > > echo "Compiling HDF5 at `date`"
> > > mkdir -p ${LIB_DIR}/hdf5
> > > cd ${LIB_DIR}/hdf5
> > > rm -rf hdf5*
> > > tar -xzf ${TAR_DIR}/hdf5*.tar.gz
> > > cd hdf5*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} --with-
zlib=${LIB_DIR}/lib
> > > LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
> > > configure.log
> > 2>&1"
> > > ./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> > > LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
> > > configure.log
> > 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo
> > > echo "Compiling NetCDF-C at `date`"
> > > mkdir -p ${LIB_DIR}/netcdf
> > > cd ${LIB_DIR}/netcdf
> > > rm -rf netcdf*
> > > unzip ${TAR_DIR}/netcdf-4*.zip > /dev/null 2>&1
> > > cd netcdf-4*
> > > export FC=''
> > > export F90=''
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo
> > > echo "Compiling NetCDF-CXX at `date`"
> > > cd ${LIB_DIR}/netcdf
> > > tar -xzf ${TAR_DIR}/netcdf-cxx*.tar.gz
> > > cd netcdf-cxx*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile FREETYPE
> > > if [ $COMPILE_FREETYPE -eq 1 ]; then
> > > echo
> > > echo "Compiling FREETYPE at `date`"
> > > mkdir -p ${LIB_DIR}/freetype
> > > cd ${LIB_DIR}/freetype
> > > rm -rf freetype*
> > > tar -xzf ${TAR_DIR}/freetype*.tar.gz
> > > cd freetype*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} --with-png=yes >
> > > configure.log
> > > 2>&1"
> > > ./configure --prefix=${LIB_DIR} --with-png=yes > configure.log
2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1
> > > --with-zlib=${LIB_DIR} LDFLAGS=-L${LIB_DIR} CPPFLAGS=-
I${LIB_DIR}"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > >
> > > # Compile CAIRO
> > > if [ $COMPILE_CAIRO -eq 1 ]; then
> > >
> > > echo
> > > echo "Compiling pixman at `date`"
> > > mkdir -p ${LIB_DIR}/pixman
> > > cd ${LIB_DIR}/pixman
> > > rm -rf pixman*
> > > tar -xzf ${TAR_DIR}/pixman*.tar.gz
> > > cd pixman*
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > >
> > > echo
> > > echo "Compiling CAIRO at `date`"
> > > mkdir -p ${LIB_DIR}/cairo
> > > cd ${LIB_DIR}/cairo
> > > rm -rf cairo*
> > > tar -xf ${TAR_DIR}/cairo*.tar*
> > > cd cairo*
> > > export PKG_CONFIG=`which pkg-config`
> > > if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> > > export PKG_CONFIG_PATH=${LIB_DIR}/lib/pkgconfig/
> > > fi
> > > if [ ${COMPILER_FAMILY} == "ips" ]; then
> > > export
> > >
> >
>
LD_LIBRARY_PATH=/usrx/local/prod/intel/2015UP06/lib/intel64:${LD_LIBRA
> RY_PATH}
> > > echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> > > export LDFLAGS="-shared-intel -L/${LIB_DIR}/lib
> > > -L/usrx/local/prod/intel/2018UP04/lib/intel64/"
> > > export CPPFLAGS=-I/${LIB_DIR}/include
> > > export CFLAGS=-
I/usrx/local/prod/intel/2015UP06/include/intel64/
> > > fi
> > > echo "cd `pwd`"
> > > echo "./configure --prefix=${LIB_DIR}
> > > ax_cv_c_float_words_bigendian=no LDFLAGS=-L/${LIB_DIR}/lib
> > > CPPFLAGS=-I/${LIB_DIR}/include > configure.log
> > > 2>&1"
> > > ./configure --prefix=${LIB_DIR}
ax_cv_c_float_words_bigendian=no
> > > LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include >
> > > configure.log
> > > 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > > fi
> > >
> > > # Compile MET
> > > if [ $COMPILE_MET -eq 1 ]; then
> > >
> > > echo
> > > echo "Compiling MET at `date`"
> > > cd ${MET_DIR}
> > > echo "cd `pwd`"
> > > rm -rf met*
> > > tar -zxvf ${MET_TARBALL}
> > > cd met*
> > > echo "cd `pwd`"
> > > if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> > > cp ${TAR_DIR}/met*_patches*.tar.gz .
> > > tar -zxf met*_patches*.tar.gz
> > > fi
> > >
> > > export MET_NETCDF=${LIB_DIR}
> > > export MET_BUFRLIB=${LIB_DIR}/lib
> > > export MET_GSL=${LIB_DIR}
> > > export MET_GRIB2C=${LIB_DIR}
> > > export MET_HDF5=${LIB_DIR}
> > > export MET_HDF=${LIB_DIR}
> > > export MET_HDFEOS=${LIB_DIR}
> > > #export MET_CAIROINC=${LIB_DIR}/include/cairo
> > > #export MET_CAIROLIB=${LIB_DIR}/lib
> > > #export MET_FREETYPEINC=${LIB_DIR}/include/freetype2
> > > #export MET_FREETYPELIB=${LIB_DIR}/lib
> > > export MET_FONT_DIR=${TEST_BASE}/fonts
> > > export MET_PYTHON_LD=${MET_PYTHON_LD}
> > > export MET_PYTHON_CC=${MET_PYTHON_CC}
> > > export LDFLAGS="-Wl,--disable-new-dtags"
> > > export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib"
> > > export LDFLAGS="${LDFLAGS}
> > > -Wl,-rpath,${LIB_DIR}/lib:${MET_NETCDF}/lib:${MET_PYTHON/lib}"
> > > export CPPFLAGS=-I${LIB_DIR}/include
> > >
> > >
> > > echo "MET Configuration settings..."
> > > printenv | egrep "^MET_" | sed -r 's/^/export /g'
> > >
> > > export OPT_ARGS=''
> > > if [[ $COMPILER_FAMILY == "pgi" ]]; then
> > > export OPT_ARGS="${OPT_ARGS} FFLAGS=-lpgf90"
> > > fi
> > >
> > > echo "cd `pwd`"
> > > if [ -z ${PYTHON_MODULE_USE} ]; then
> > > #echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > ${OPT_ARGS} >
> > configure.log 2>&1"
> > > #./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > ${OPT_ARGS} > configure.log
> 2>&1
> > > echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log
2>&1"
> > > ./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log
2>&1
> > > else
> > > #echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > --enable-python ${OPT_ARGS} > configure.log 2>&1"
> > > #./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > --enable-python ${OPT_ARGS} > configure.log 2>&1
> > > echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} >
> > configure.log 2>&1"
> > > ./configure --prefix=${MET_DIR} --enable-grib2
> > > --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} >
configure.log 2>&1
> > > fi
> > >
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "configure returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo "make > make.log 2>&1"
> > > make > make.log 2>&1
> > > ret=$?
> > > if [ $ret != 0 ]; then
> > > echo "make returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo "make install > make_install.log 2>&1"
> > > make install > make_install.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make install returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > echo "make test > make_test.log 2>&1"
> > > make test > make_test.log 2>&1
> > > ret=$?
> > > if [ $? != 0 ]; then
> > > echo "make test returned with non-zero ($ret) status"
> > > exit 1
> > > fi
> > >
> > > fi
> > >
> > > echo "Finished compiling at `date
> > >
> > > Bart
> > > ________________________________________
> > > Bart Brashers, Ph.D.
> > > Senior Managing Consultant
> > > Global Air Quality Practice Network Leader
> > >
> > > D +1 425-412-1812
> > > M +1 206-550-2606
> > > bbrashers at ramboll.com<mailto:bbrashers at ramboll.com>
> > >
> > > Ramboll
> > > 19020 33rd Avenue West
> > > Suite 310
> > > Lynnwood, WA 98036
> > > USA
> > > http://www.ramboll.com/environment-and-health
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
--
Julie Prestopnik
Software Engineer
National Center for Atmospheric Research Research Applications
Laboratory
Phone: 303.497.8399
Email: jpresto at ucar.edu
My working day may not be your working day. Please do not feel
obliged to reply to this email outside of your normal working hours.
------------------------------------------------
Subject: Issue compiling MET-9.0.1
From: Julie Prestopnik
Time: Wed Apr 29 09:51:53 2020
Hi Bart.
Great! Thank you for letting us know.
Here is a link to the issue we created in GitHub:
https://github.com/NCAR/MET/issues/1317
I'll go ahead and close this ticket. We'll update the GitHub issue as
progress is made.
I'll add a comment that you are happy to test for a future PGI fix.
We
appreciate it!
Julie
On Tue, Apr 28, 2020 at 2:52 PM Bart Brashers via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95051 >
>
> Yes, after a few rounds of guessing which flags in the output of
> `python3-config --ldflags` were actually required (leave off the
-Xlinker
> -export-dynamic).
>
> Thanks, and I'd be happy to be a beta or rc tester for a future PGI
fix.
>
> Bart
>
> -----Original Message-----
> From: Julie Prestopnik via RT <met_help at ucar.edu>
> Sent: Tuesday, April 28, 2020 1:10 PM
> To: Bart Brashers <bbrashers at ramboll.com>
> Subject: Re: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
>
> Hi Bart.
>
> We were able to reproduce the problem using pgi on Cheyenne and will
need
> to look into addressing it for our next release. Thank you for
bringing
> this to our attention. Were you able to compile successfully using
the GNU
> compilers?
>
> Julie
>
>
> On Mon, Apr 27, 2020 at 4:12 PM John Halley Gotway via RT <
> met_help at ucar.edu>
> wrote:
>
> >
> > <URL:
> >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frt.r
> >
ap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%7C01
> >
%7Cbbrashers%40ramboll.com%7Ce83f871e0304416e6bc908d7ebb01b38%7Cc8823c
> >
91be814f89b0246c3dd789c106%7C0%7C0%7C637237013923870785&sdata=Uc2Y
> > C8mLODlzTm07qCyDegfaKW%2BDoMpIBkqxT18tJKg%3D&reserved=0 >
> >
> > Bart,
> >
> > The vast majority of MET is in C++ with only small amounts of
FORTRAN
> > called by the pb2nc and tc_pairs tools. But I don't have any
speed
> > comparisons to reference. But we do compile MET for operational
use
> > by NOAA labs and they prefer Intel.
> >
> > Thanks,
> > John
> >
> > On Mon, Apr 27, 2020 at 4:08 PM Bart Brashers via RT
> > <met_help at ucar.edu>
> > wrote:
> >
> > >
> > > <URL:
> > >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frt
> > >
.rap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%
> > >
7C01%7Cbbrashers%40ramboll.com%7Ce83f871e0304416e6bc908d7ebb01b38%7C
> > >
c8823c91be814f89b0246c3dd789c106%7C0%7C0%7C637237013923870785&sd
> > >
ata=Uc2YC8mLODlzTm07qCyDegfaKW%2BDoMpIBkqxT18tJKg%3D&reserved=0
> > > >
> > >
> > > Hi John,
> > >
> > > Do you find a significant performance difference between using
the
> > > GNU compilers and the Intel compilers? If not, then I can use
the
> > > GNU compilers.
> > >
> > > As I understand it, gcc is pretty close to commercial compilers,
but
> > > gfortran is still noticeably slower than ifort or pgfortran. But
> > > perhaps
> > in
> > > MET there's not that many components that rely on Fortran?
> > >
> > > Thanks,
> > >
> > > Bart
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT <met_help at ucar.edu>
> > > Sent: Monday, April 27, 2020 2:19 PM
> > > To: Bart Brashers <bbrashers at ramboll.com>
> > > Subject: Re: [rt.rap.ucar.edu #95051] Issue compiling MET-9.0.1
> > >
> > > Hello Bart,
> > >
> > > I see you're having trouble compiling MET using PGI version 19.
> > > Thanks for sending a detailed description of the issue.
> > >
> > > We do our development using the GNU compilers and most
installations
> > using
> > > Intel. And we do not routinely test using PGI. So I can see an
> > > issue
> > may
> > > have crept up on us. I've assigned this ticket to Julie
Prestopnik,
> > > our build engineer who handles most compilation problems.
> > >
> > > She'll try compiling met-9.0.1 using PGI 19 on NCAR's machine,
> cheyenne.
> > > And hopefully that'll help address the issues you've run into.
> > >
> > > Thanks,
> > > John Halley Gotway
> > >
> > > On Sat, Apr 25, 2020 at 5:51 PM Bart Brashers via RT
> > > <met_help at ucar.edu>
> > > wrote:
> > >
> > > >
> > > > Sat Apr 25 17:51:11 2020: Request 95051 was acted upon.
> > > > Transaction: Ticket created by bbrashers at ramboll.com
> > > > Queue: met_help
> > > > Subject: Issue compiling MET-9.0.1
> > > > Owner: Nobody
> > > > Requestors: bbrashers at ramboll.com
> > > > Status: new
> > > > Ticket <URL:
> > > >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > > rt.r
> > > >
ap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D95051&data=02%
> > > > 7C01
> > > >
%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad108d7eaf08d8e%7Cc8
> > > > 823c
> > > >
91be814f89b0246c3dd789c106%7C0%7C0%7C637236191212685303&sdata=
> > > > qZxN
> > > > J1VYztm9g1QVxHtW69QODhB6%2Fj0q40HXKePZO8A%3D&reserved=0 >
> > > >
> > > >
> > > > Hi, I looked in all the places listed<
> > > >
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > > dtce
> > > > nter.org%2Fcommunity-code%2Fmodel-evaluation-tools-met%2Fmet-
help-
> > > > desk
> > > >
&data=02%7C01%7Cbbrashers%40ramboll.com%7C6ef6b4a818d34c5d5ad1
> > > > 08d7
> > > >
eaf08d8e%7Cc8823c91be814f89b0246c3dd789c106%7C0%7C0%7C637236191212
> > > > 6952
> > > >
98&sdata=PYLxk0pnnsDaNGP0EviCESvqsJb7k3Zv4Fx85Bwd7h0%3D&re
> > > > serv ed=0> first and did some of Googling, but can't find the
> > > > solution to this one.
> > > >
> > > > I'm compiling met-9.0.1 using PGI-CE version 19.10-0. I am
using
> > > > the sample compile_MET_all.sh script to install into
> /usr/local/src/MET.
> > > > The external_libs all compile fine, MET's configure runs fine,
but
> > > > it fails to compile met-9.0.1/src/libcode/vx_nc_obs:
> > > >
> > > > Making all in vx_nc_obs
> > > > make[4]: Entering directory
> > > > `/usr/local/src/MET/met-9.0.1/src/libcode/vx_nc_obs'
> > > > source='nc_obs_util.cc' object='libvx_nc_obs_a-nc_obs_util.o'
> > > > libtool=no \ DEPDIR=.deps depmode=pgcc /bin/sh
../../../depcomp \
> > > > /usr/local/pgi/linux86-64/2019/bin/pgc++ -DHAVE_CONFIG_H -I.
> -I../../..
> > > > -I../../../src/basic/vx_cal -I../../../sr c/basic/vx_config
> > > > -I../../../src/basic/vx_log -I../../../src/basic/vx_math
> > > > -I../../../src/basic/vx_util -I../../../src/libcode/vx_afm
> > > > -I../../../src/libcode/vx_analysis_util
> > > > -I../../../src/libcode/vx_color
-I../../../src/libcode/vx_data2d
> > > > -I../../../src/libcode/vx_data2d_factory
> > > > -I../../../src/libcode/vx_data2d_grib
> > > > -I../../../src/libcode/vx_data2d_grib2
> > > > -I../../../src/libcode/vx_data2d_nccf
> > > > -I../../../src/libcode/vx_data2d_nc_met
> > > > -I../../../src/libcode/vx_data2d_nc_pinterp
> > > > -I../../../src/libcode/vx_data2d_python
> > > > -I../../../src/libcode/vx_python3_utils
> > > > -I../../../src/libcode/vx_geodesy
-I../../../src/libcode/vx_gis
> > > > -I../../../src/libcode/vx_gnomon
-I../../../src/libcode/vx_grid
> > > > -I../../../src/libcode/vx_gsl_prob
> > > > -I../../../src/libcode/vx_nav -I../../../src/libcode/vx_nc_obs
> > > > -I../../../src/libcode/vx_nc_util
> > > > -I../../../src/libcode/vx_pb_util
> > > > -I../../../src/libcode/vx_plot_util
-I../../../src/libcode/vx_ps
> > > > -I../../../src/libcode/vx_pxm -I../../../src/libcode/vx_render
> > -I../../!
> > > > ../src/libcode/vx_regrid -I../../../src/libcode/vx_shapedata
> > > > -I../../../src/libcode/vx_solar
> > > > -I../../../src/libcode/vx_statistics
> > > > -I../../../src/libcode/vx_stat_out
> > > > -I../../../src/libcode/vx_summary
> > > > -I../../../src/libcode/vx_time_series
> > > > -I../../../src/libcode/vx_series_data
> > > > -I../../../src/libcode/vx_tc_util
> > > > -I/usr/local/src/MET/external_libs/include
> > > > -I/usr/local/src/MET/external_libs/include
> > > > -I/usr/local/src/MET/external_libs/include
> > > > -I/usr/local/src/MET/external_libs/include
-I../../basic/vx_log
> > > > -I../../basic/vx_util
> > > > -I/usr/local/src/anaconda3/include/python3.6m
> > > > -I/usr/local/src/MET/external_libs/include
> > > > -I/usr/local/src/MET/external_libs/include
> > > > -I/usr/local/src/MET/external_libs/include -DBLOCK4
-DWITH_GRIB2
> > > > -DMET_BASE="\"/usr/local/src/MET/share/met\"" -c -o
> > > > libvx_nc_obs_a-nc_obs_util.o `test -f 'nc_obs_util.cc' || echo
> > > > './'`nc_obs_util.cc
"../../../src/basic/vx_config/config_file.h",
> > > > line
> > > > 83: warning: function
> > > > "Dictionary::lookup(std::string)" is hidden by
> > > > "MetConfig::lookup" --
> > > > virtual function override intended?
> > > > const DictionaryEntry * lookup(const char * name);
> > > > ^
> > > >
> > > > "../../../src/basic/vx_config/config_file.h", line 85:
warning:
> > function
> > > > "Dictionary::lookup(std::string)" is hidden by
> > > > "MetConfig::lookup" --
> > > > virtual function override intended?
> > > > const DictionaryEntry * lookup(const char * name,
const
> > > > ConfigObjectType expected_type);
> > > > ^
> > > >
> > > > "nc_obs_util.cc", line 670: internal error: assertion failed
at:
> > > > "../src/statements.c", line 7953
> > > >
> > > > return my_hdr_data;
> > > > ^
> > > >
> > > > 1 catastrophic error detected in the compilation of
"nc_obs_util.cc".
> > > > Compilation aborted.
> > > > pgc++-Fatal-/usr/local/pgi/linux86-64-nollvm/19.10/bin/pggpp1
> > > > pgc++TERMINATED
> > > > by signal 6
> > > >
> > > > Both external_libs/netcdf/netcdf-4.4.1.1/make_install.log and
> > > > external_libs/netcdf/netcdf-cxx4-4.3.0/make_install.log show
> > > > successful compilations.
> > > >
> > > > I took a look at met-
9.0.1/src/libcode/vx_nc_obs/nc_obs_util.cc,
> > > > and nothing looked amiss, but I'm much better at Fortan than
at C or
> C++.
> > > >
> > > > There is no file named statements.c in the MET code or any of
the
> > > > external_libs (find | grep statements and locate statements.c
> > > > return nothing).
> > > >
> > > > I notice the flag
-DMET_BASE="\"/usr/local/src/MET/share/met\"" is
> > > > looking for a non-existent path, and even though
> > > > /usr/local/src/MET/external_libs/share exists,
> > > > /usr/local/src/MET/external_libs/share/met does not.
> > > >
> > > > Searching using Google for
> > > > "site:mailman.ucar.edu/pipermail/met_help
> > > > my_hdr_data" or statements.c found no useful hits.
> > > >
> > > > I've catted my version of the compile_MET_all.sh script
(edited
> > > > slightly to remove the module calls) and the my.compile script
> > > > (used to set the
> > > > variables) below - your gmail server rejected me trying to
attach
> them.
> > > >
> > > > Any hints?
> > > >
> > > > # cat my.compile
> > > > #!/bin/csh -f
> > > >
> > > > setenv TEST_BASE `pwd`
> > > > setenv MET_SUBDIR $TEST_BASE # will create met-9.0.1 inside
this
> dir
> > > > setenv MET_TARBALL met-9.0.1.20200423.tar.gz
> > > > setenv COMPILER pgi_19.10
> > > > setenv PYTHON_MODULE python_3.6.9
> > > > setenv MET_PYTHON /usr/local/src/anaconda3/bin/python
> > > > #setenv MET_PYTHON_CC `python3-config --cflags` #setenv
> > > > MET_PYTHON_LD `python3-config --ldflags` setenv MET_PYTHON_CC
> > > > '-I/usr/local/src/anaconda3/include/python3.6m'
> > > > setenv MET_PYTHON_LD
> > > > '-L/usr/local/src/anaconda3/lib/python3.6/config-3.6m-x86_64-
linux
> > > > -gnu -L/usr/local/src/anaconda3/lib -lpython3.6m -lpthread
-ldl
> > > > -lutil -lrt
> > > -lm'
> > > >
> > > > setenv FC pgfortran
> > > > setenv F77 pgf77
> > > > setenv F90 pgfortran
> > > > setenv CC pgcc
> > > > setenv CXX pgc++
> > > >
> > > > setenv FFLAGS '-tp=istanbul'
> > > > setenv CFLAGS '-tp=istanbul'
> > > >
> > > > ./compile_MET_all.sh >&! compile.out.`date +%Y-%m-%d`
> > > >
> > > >
> > > >
> > > >
> > > > # cat copile_met_all.sh
> > > > #!/bin/bash -l
> > > >
> > > > echo "TEST_BASE = ${TEST_BASE? "ERROR: TEST_BASE must be
set"}"
> > > > echo "COMPILER = ${COMPILER? "ERROR: COMPILER must be set"}"
> > > > echo "MET_SUBDIR = ${MET_SUBDIR? "ERROR: MET_SUBDIR must be
set"}"
> > > > echo "MET_TARBALL = ${MET_TARBALL? "ERROR: MET_TARBALL must be
set"}"
> > > >
> > > > export LIB_DIR=${TEST_BASE}/external_libs
> > > > MET_DIR=${MET_SUBDIR}
> > > > TAR_DIR=${TEST_BASE}/tar_files
> > > > MET_TARBALL=${TAR_DIR}/${MET_TARBALL}
> > > >
> > > > # Create directory for libraries
> > > > mkdir -p ${LIB_DIR}
> > > >
> > > > # Check that tar files exist
> > > > if [ ! -e $TAR_DIR ]; then
> > > > echo "TAR File directory doesn't exist: ${TAR_DIR}"
> > > > exit 1
> > > > fi
> > > >
> > > > # Update library linker path
> > > > export
> > > >
LD_LIBRARY_PATH=${TEST_BASE}/external_libs/lib:${MET_PYTHON}/lib:$
> > > > {LD_ LIBRARY_PATH} echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> > > >
> > > > # Constants
> > > > COMPILE_GSL=0
> > > > COMPILE_BUFRLIB=0
> > > > COMPILE_ZLIB=0
> > > > COMPILE_LIBPNG=0
> > > > COMPILE_JASPER=0
> > > > COMPILE_G2CLIB=0
> > > > COMPILE_HDF=0
> > > > COMPILE_HDFEOS=0
> > > > COMPILE_NETCDF=0
> > > > COMPILE_FREETYPE=0
> > > > COMPILE_CAIRO=0
> > > > COMPILE_MET=1
> > > > COMPILE_MET_PATCHES=0
> > > >
> > > > if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> > > > COMPILE_MET=1
> > > > fi
> > > >
> > > > echo
> > > > echo "Compiling libraries into: ${LIB_DIR}"
> > > >
> > > > if [ ! -e ${LIB_DIR}/include ]; then mkdir ${LIB_DIR}/include
fi
> > > > if [ ! -e ${LIB_DIR}/lib ]; then
> > > > mkdir ${LIB_DIR}/lib
> > > > fi
> > > >
> > > > # Load compiler version
> > > > COMPILER_FAMILY=` echo $COMPILER | cut -d'_' -f1`
> > > > COMPILER_VERSION=`echo $COMPILER | cut -d'_' -f2`
> > > >
> > > > # echo "module load ${COMPILER_FAMILY}/${COMPILER_VERSION}"
> > > > # echo ${COMPILER_FAMILY}/${COMPILER_VERSION}
> > > > # module purge
> > > > # module load ${COMPILER_FAMILY}/${COMPILER_VERSION}
> > > > # if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> > > > # module load craype
> > > > # module switch craype craype-sandybridge
> > > > # fi
> > > >
> > > > if [ ${COMPILER_FAMILY} == "gnu" ]; then
> > > > export CC=`which gcc`
> > > > export CXX=`which g++`
> > > > export FC=`which gfortran`
> > > > export F77=`which gfortran`
> > > > export F90=`which gfortran`
> > > > elif [ ${COMPILER_FAMILY} == "pgi" ]; then
> > > > export CC=`which pgcc`
> > > > export CXX=`which pgc++`
> > > > export FC=`which pgf90`
> > > > export F77=`which pgf90`
> > > > export F90=`which pgf90`
> > > > elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[
${COMPILER_FAMILY}
> > > > ==
> > > "ics"
> > > > ]] || [[ ${COMPILER_FAMILY} == "ips" ]] || [[
${COMPILER_FAMILY}
> > > > == "PrgEnv-intel" ]]; then
> > > > export CC=`which icc`
> > > > export CXX=`which icc`
> > > > export FC=`which ifort`
> > > > export F77=`which ifort`
> > > > export F90=`which ifort`
> > > > else
> > > > echo "ERROR: \${COMPILER} must start with gnu, intel, ics,
ips,
> > > > PrgEnv-intel, or pgi"
> > > > exit
> > > > fi
> > > >
> > > > echo "export CC=${CC}"
> > > > echo "export CXX=${CXX}"
> > > > echo "export FC=${FC}"
> > > > echo "export F77=${F77}"
> > > > echo "export F90=${F90}"
> > > >
> > > > # Load desired Python version
> > > > # PYTHON_NAME=` echo $PYTHON_MODULE | cut -d'_' -f1` #
> > > > PYTHON_VERSION_NUM=`echo $PYTHON_MODULE | cut -d'_' -f2` #
echo
> > > > "module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}"
> > > > # echo ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> > > > # module load ${PYTHON_NAME}/${PYTHON_VERSION_NUM}
> > > >
> > > > which python
> > > > python --version
> > > >
> > > > # Compile GSL
> > > > if [ $COMPILE_GSL -eq 1 ]; then
> > > >
> > > > if [ ${COMPILER_FAMILY} == "pgi" ]; then
> > > > vrs="1.11";
> > > > else
> > > > vrs="2.1";
> > > > fi
> > > >
> > > > echo
> > > > echo "Compiling GSL_${vrs} at `date`"
> > > > mkdir -p ${LIB_DIR}/gsl
> > > > cd ${LIB_DIR}/gsl
> > > > rm -rf gsl*
> > > > tar -xf ${TAR_DIR}/gsl-${vrs}.tar.gz
> > > > cd gsl*
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > fi
> > > >
> > > > # Compile BUFRLIB
> > > > if [ $COMPILE_BUFRLIB -eq 1 ]; then
> > > >
> > > > vrs="v11.3.0";
> > > >
> > > > echo
> > > > echo "Compiling BUFRLIB_${vrs} at `date`"
> > > > mkdir -p ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> > > > cd ${LIB_DIR}/bufrlib/BUFRLIB_${vrs}
> > > > echo "cd `pwd`"
> > > > rm -rf *
> > > > tar -xf ${TAR_DIR}/BUFRLIB_`echo $vrs | sed 's/\./-/g'`.tar
> > > >
> > > > # Copy custom preproc.sh script into here
> > > > #cp ${TAR_DIR}/preproc.sh_${vrs} preproc.sh
> > > >
> > > > #./preproc.sh > make.log 2>&1
> > > > ${CC} -c -DUNDERSCORE `./getdefflags_C.sh` *.c >> make.log
2>&1
> > > >
> > > > # For GNU and Intel follow BUFRLIB11 instructions
> > > > if [[ ${COMPILER_FAMILY} == "gnu" ]]; then
> > > > ${FC} -c -fno-second-underscore `./getdefflags_F.sh`
modv*.F
> > > > moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> > > > elif [[ ${COMPILER_FAMILY} == "intel" ]] || [[
> > > > ${COMPILER_FAMILY} == "ics" ]] || [[ ${COMPILER_FAMILY} ==
"ips"
> > > > ]] || [[ ${COMPILER_FAMILY} == "PrgEnv-intel" ]]; then
> > > > ${FC} -c `./getdefflags_F.sh` modv*.F moda*.F `ls -1 *.F
*.f |
> > > > grep -v "mod[av]_"` >> make.log 2>&1
> > > > elif [[ ${COMPILER_FAMILY} == "pgi" ]]; then
> > > > ${FC} -c -Mnosecond_underscore `./getdefflags_F.sh`
modv*.F
> > > > moda*.F `ls -1 *.F *.f | grep -v "mod[av]_"` >> make.log 2>&1
> > > > fi
> > > >
> > > > ar crv libbufr.a *.o >> make.log 2>&1
> > > > cp *.a ${LIB_DIR}/lib/.
> > > > fi
> > > >
> > > > # Compile ZLIB using gcc, per Boi Vuong from NCO on 05/23/2019
if
> > > > [ $COMPILE_ZLIB -eq 1 ]; then
> > > > echo
> > > > echo "Compiling ZLIB at `date`"
> > > > mkdir -p ${LIB_DIR}/zlib
> > > > cd ${LIB_DIR}/zlib
> > > > rm -rf zlib*
> > > > tar -xzf ${TAR_DIR}/zlib*.tar.gz
> > > > cd zlib*
> > > > echo "cd `pwd`"
> > > > # Store the original CC compiler
> > > > CC_SAVE=${CC}
> > > > echo "export CC=`which gcc`"
> > > > export CC=`which gcc`
> > > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > # Reset CC by to the original setting
> > > > echo "export CC=${CC_SAVE}"
> > > > export CC=${CC_SAVE}
> > > > fi
> > > >
> > > > # Compile LIBPNG using gcc, per Boi Vuong from NCO on
05/23/2019
> > > > if [[ $COMPILE_LIBPNG -eq 1 && $HOST != ys* ]]; then
> > > > echo
> > > > echo "Compiling LIBPNG at `date`"
> > > > mkdir -p ${LIB_DIR}/libpng
> > > > cd ${LIB_DIR}/libpng
> > > > rm -rf libpng*
> > > > tar -xzf ${TAR_DIR}/libpng*.tar.gz
> > > > cd libpng*
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-
L/${LIB_DIR}/lib
> > > > CC=gcc CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1"
> > > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L/${LIB_DIR}/lib
CC=gcc
> > > > CPPFLAGS=-I/${LIB_DIR}/include > configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > fi
> > > >
> > > > # Compile JASPER using gcc, per Boi Vuong from NCO on
05/23/2019
> > > > if [ $COMPILE_JASPER -eq 1 ]; then
> > > > echo
> > > > echo "Compiling JASPER at `date`"
> > > > mkdir -p ${LIB_DIR}/jasper
> > > > cd ${LIB_DIR}/jasper
> > > > rm -rf jasper*
> > > > unzip ${TAR_DIR}/jasper*.zip > /dev/null 2>&1
> > > > cd jasper*
> > > > export CPPFLAGS="-I${LIB_DIR}/include"
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} CC=gcc > configure.log
2>&1"
> > > > ./configure --prefix=${LIB_DIR} CC=gcc > configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > fi
> > > >
> > > > # Compile G2CLIB
> > > > if [ $COMPILE_G2CLIB -eq 1 ]; then
> > > > echo
> > > > echo "Compiling G2CLIB at `date`"
> > > > mkdir -p ${LIB_DIR}/g2clib
> > > > cd ${LIB_DIR}/g2clib
> > > > rm -rf g2clib*
> > > > tar -xf ${TAR_DIR}/g2clib*.tar
> > > > cd g2clib*
> > > > cat makefile | \
> > > > sed -r 's/INC=.*/INC=-I${LIB_DIR}\/include
> > > > -I${LIB_DIR}\/include\/jasper/g' | \
> > > > sed 's/CC=gcc/CC=${CC_COMPILER}/g' | \
> > > > sed 's/-D__64BIT__//g' \
> > > > > makefile_new
> > > > mv makefile_new makefile
> > > > export CC_COMPILER=${CC}
> > > > echo "cd `pwd`"
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > cp libg2c*.a ${LIB_DIR}/lib/libgrib2c.a
> > > > cp *.h ${LIB_DIR}/include/.
> > > > fi
> > > >
> > > > # Compile HDF
> > > > # Depends on jpeg
> > > > # Edit 'mfhdf/hdiff/Makefile' as follows:
> > > > # From: LIBS = -ljpeg -lz
> > > > # To: LIBS = -ljpeg -lz -lm
> > > > if [ $COMPILE_HDF -eq 1 ]; then
> > > > echo
> > > > echo "Compiling HDF at `date`"
> > > > mkdir -p ${LIB_DIR}/hdf
> > > > cd ${LIB_DIR}/hdf
> > > > rm -rf HDF*
> > > > tar -xf ${TAR_DIR}/HDF4.2*.tar.gz
> > > > cd HDF*
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} --disable-netcdf
> > > > --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log
2>&1"
> > > > ./configure --prefix=${LIB_DIR} --disable-netcdf
> > > > --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} > configure.log
2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > cat mfhdf/hdiff/Makefile | sed 's/LIBS = -ljpeg -lz/LIBS =
> > > > -ljpeg -lz -lm/g' > Makefile_NEW
> > > > mv Makefile_NEW mfhdf/hdiff/Makefile
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > fi
> > > >
> > > > # Compile HDFEOS
> > > > # Depends on HDF
> > > > if [ $COMPILE_HDFEOS -eq 1 ]; then
> > > > echo
> > > > echo "Compiling HDFEOS at `date`"
> > > > mkdir -p ${LIB_DIR}/hdfeos
> > > > cd ${LIB_DIR}/hdfeos
> > > > rm -rf HDF-EOS*
> > > > tar -xzf ${TAR_DIR}/HDF-EOS*.tar.*
> > > > cd hdfeos
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR}
>
> > > > configure.log 2>&1"
> > > > ./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR}
> > > > --with-jpeg=${LIB_DIR} > configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > cp include/*.h ${LIB_DIR}/include/.
> > > > fi
> > > >
> > > > # Compile NetCDF
> > > > if [ $COMPILE_NETCDF -eq 1 ]; then
> > > >
> > > > echo
> > > > echo "Compiling HDF5 at `date`"
> > > > mkdir -p ${LIB_DIR}/hdf5
> > > > cd ${LIB_DIR}/hdf5
> > > > rm -rf hdf5*
> > > > tar -xzf ${TAR_DIR}/hdf5*.tar.gz
> > > > cd hdf5*
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} --with-
zlib=${LIB_DIR}/lib
> > > > LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
> > > > configure.log
> > > 2>&1"
> > > > ./configure --prefix=${LIB_DIR} --with-zlib=${LIB_DIR}/lib
> > > > LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include >
> > > > configure.log
> > > 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > >
> > > > echo
> > > > echo "Compiling NetCDF-C at `date`"
> > > > mkdir -p ${LIB_DIR}/netcdf
> > > > cd ${LIB_DIR}/netcdf
> > > > rm -rf netcdf*
> > > > unzip ${TAR_DIR}/netcdf-4*.zip > /dev/null 2>&1
> > > > cd netcdf-4*
> > > > export FC=''
> > > > export F90=''
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-
L${LIB_DIR}/lib
> > > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> > > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > >
> > > > echo
> > > > echo "Compiling NetCDF-CXX at `date`"
> > > > cd ${LIB_DIR}/netcdf
> > > > tar -xzf ${TAR_DIR}/netcdf-cxx*.tar.gz
> > > > cd netcdf-cxx*
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} LDFLAGS=-
L${LIB_DIR}/lib
> > > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1"
> > > > ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib
> > > > CPPFLAGS=-I${LIB_DIR}/include > configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > fi
> > > >
> > > > # Compile FREETYPE
> > > > if [ $COMPILE_FREETYPE -eq 1 ]; then
> > > > echo
> > > > echo "Compiling FREETYPE at `date`"
> > > > mkdir -p ${LIB_DIR}/freetype
> > > > cd ${LIB_DIR}/freetype
> > > > rm -rf freetype*
> > > > tar -xzf ${TAR_DIR}/freetype*.tar.gz
> > > > cd freetype*
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} --with-png=yes >
> > > > configure.log
> > > > 2>&1"
> > > > ./configure --prefix=${LIB_DIR} --with-png=yes >
configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1
> > > > --with-zlib=${LIB_DIR} LDFLAGS=-L${LIB_DIR} CPPFLAGS=-
I${LIB_DIR}"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > fi
> > > >
> > > >
> > > > # Compile CAIRO
> > > > if [ $COMPILE_CAIRO -eq 1 ]; then
> > > >
> > > > echo
> > > > echo "Compiling pixman at `date`"
> > > > mkdir -p ${LIB_DIR}/pixman
> > > > cd ${LIB_DIR}/pixman
> > > > rm -rf pixman*
> > > > tar -xzf ${TAR_DIR}/pixman*.tar.gz
> > > > cd pixman*
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR} > configure.log 2>&1"
> > > > ./configure --prefix=${LIB_DIR} > configure.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > >
> > > >
> > > > echo
> > > > echo "Compiling CAIRO at `date`"
> > > > mkdir -p ${LIB_DIR}/cairo
> > > > cd ${LIB_DIR}/cairo
> > > > rm -rf cairo*
> > > > tar -xf ${TAR_DIR}/cairo*.tar*
> > > > cd cairo*
> > > > export PKG_CONFIG=`which pkg-config`
> > > > if [ ${COMPILER_FAMILY} == "PrgEnv-intel" ]; then
> > > > export PKG_CONFIG_PATH=${LIB_DIR}/lib/pkgconfig/
> > > > fi
> > > > if [ ${COMPILER_FAMILY} == "ips" ]; then
> > > > export
> > > >
> > >
> >
LD_LIBRARY_PATH=/usrx/local/prod/intel/2015UP06/lib/intel64:${LD_LIBRA
> > RY_PATH}
> > > > echo "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}"
> > > > export LDFLAGS="-shared-intel -L/${LIB_DIR}/lib
> > > > -L/usrx/local/prod/intel/2018UP04/lib/intel64/"
> > > > export CPPFLAGS=-I/${LIB_DIR}/include
> > > > export
> CFLAGS=-I/usrx/local/prod/intel/2015UP06/include/intel64/
> > > > fi
> > > > echo "cd `pwd`"
> > > > echo "./configure --prefix=${LIB_DIR}
> > > > ax_cv_c_float_words_bigendian=no LDFLAGS=-L/${LIB_DIR}/lib
> > > > CPPFLAGS=-I/${LIB_DIR}/include > configure.log
> > > > 2>&1"
> > > > ./configure --prefix=${LIB_DIR}
ax_cv_c_float_words_bigendian=no
> > > > LDFLAGS=-L/${LIB_DIR}/lib CPPFLAGS=-I/${LIB_DIR}/include >
> > > > configure.log
> > > > 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > > fi
> > > >
> > > > # Compile MET
> > > > if [ $COMPILE_MET -eq 1 ]; then
> > > >
> > > > echo
> > > > echo "Compiling MET at `date`"
> > > > cd ${MET_DIR}
> > > > echo "cd `pwd`"
> > > > rm -rf met*
> > > > tar -zxvf ${MET_TARBALL}
> > > > cd met*
> > > > echo "cd `pwd`"
> > > > if [ $COMPILE_MET_PATCHES -eq 1 ]; then
> > > > cp ${TAR_DIR}/met*_patches*.tar.gz .
> > > > tar -zxf met*_patches*.tar.gz
> > > > fi
> > > >
> > > > export MET_NETCDF=${LIB_DIR}
> > > > export MET_BUFRLIB=${LIB_DIR}/lib
> > > > export MET_GSL=${LIB_DIR}
> > > > export MET_GRIB2C=${LIB_DIR}
> > > > export MET_HDF5=${LIB_DIR}
> > > > export MET_HDF=${LIB_DIR}
> > > > export MET_HDFEOS=${LIB_DIR}
> > > > #export MET_CAIROINC=${LIB_DIR}/include/cairo
> > > > #export MET_CAIROLIB=${LIB_DIR}/lib
> > > > #export MET_FREETYPEINC=${LIB_DIR}/include/freetype2
> > > > #export MET_FREETYPELIB=${LIB_DIR}/lib
> > > > export MET_FONT_DIR=${TEST_BASE}/fonts
> > > > export MET_PYTHON_LD=${MET_PYTHON_LD}
> > > > export MET_PYTHON_CC=${MET_PYTHON_CC}
> > > > export LDFLAGS="-Wl,--disable-new-dtags"
> > > > export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib"
> > > > export LDFLAGS="${LDFLAGS}
> > > > -Wl,-rpath,${LIB_DIR}/lib:${MET_NETCDF}/lib:${MET_PYTHON/lib}"
> > > > export CPPFLAGS=-I${LIB_DIR}/include
> > > >
> > > >
> > > > echo "MET Configuration settings..."
> > > > printenv | egrep "^MET_" | sed -r 's/^/export /g'
> > > >
> > > > export OPT_ARGS=''
> > > > if [[ $COMPILER_FAMILY == "pgi" ]]; then
> > > > export OPT_ARGS="${OPT_ARGS} FFLAGS=-lpgf90"
> > > > fi
> > > >
> > > > echo "cd `pwd`"
> > > > if [ -z ${PYTHON_MODULE_USE} ]; then
> > > > #echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > > ${OPT_ARGS} >
> > > configure.log 2>&1"
> > > > #./configure --prefix=${MET_DIR} --enable-grib2
> > > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > > ${OPT_ARGS} > configure.log
> > 2>&1
> > > > echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > > --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log
2>&1"
> > > > ./configure --prefix=${MET_DIR} --enable-grib2
> > > > --enable-modis --enable-lidar2nc ${OPT_ARGS} > configure.log
2>&1
> > > > else
> > > > #echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > > --enable-python ${OPT_ARGS} > configure.log 2>&1"
> > > > #./configure --prefix=${MET_DIR} --enable-grib2
> > > > --enable-modis --enable-mode_graphics --enable-lidar2nc
> > > > --enable-python ${OPT_ARGS} > configure.log 2>&1
> > > > echo "./configure --prefix=${MET_DIR} --enable-grib2
> > > > --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} >
> > > configure.log 2>&1"
> > > > ./configure --prefix=${MET_DIR} --enable-grib2
> > > > --enable-modis --enable-lidar2nc --enable-python ${OPT_ARGS} >
> configure.log 2>&1
> > > > fi
> > > >
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "configure returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > >
> > > > echo "make > make.log 2>&1"
> > > > make > make.log 2>&1
> > > > ret=$?
> > > > if [ $ret != 0 ]; then
> > > > echo "make returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > >
> > > > echo "make install > make_install.log 2>&1"
> > > > make install > make_install.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make install returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > >
> > > > echo "make test > make_test.log 2>&1"
> > > > make test > make_test.log 2>&1
> > > > ret=$?
> > > > if [ $? != 0 ]; then
> > > > echo "make test returned with non-zero ($ret) status"
> > > > exit 1
> > > > fi
> > > >
> > > > fi
> > > >
> > > > echo "Finished compiling at `date
> > > >
> > > > Bart
> > > > ________________________________________
> > > > Bart Brashers, Ph.D.
> > > > Senior Managing Consultant
> > > > Global Air Quality Practice Network Leader
> > > >
> > > > D +1 425-412-1812
> > > > M +1 206-550-2606
> > > > bbrashers at ramboll.com<mailto:bbrashers at ramboll.com>
> > > >
> > > > Ramboll
> > > > 19020 33rd Avenue West
> > > > Suite 310
> > > > Lynnwood, WA 98036
> > > > USA
> > > > http://www.ramboll.com/environment-and-health
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
>
> --
> Julie Prestopnik
> Software Engineer
> National Center for Atmospheric Research Research Applications
Laboratory
> Phone: 303.497.8399
> Email: jpresto at ucar.edu
>
> My working day may not be your working day. Please do not feel
obliged to
> reply to this email outside of your normal working hours.
>
>
>
>
--
Julie Prestopnik
Software Engineer
National Center for Atmospheric Research
Research Applications Laboratory
Phone: 303.497.8399
Email: jpresto at ucar.edu
My working day may not be your working day. Please do not feel
obliged to
reply to this email outside of your normal working hours.
------------------------------------------------
More information about the Met_help
mailing list