[Met_help] help with METv1.1 gmake on Linux system
John Halley Gotway
johnhg at rap.ucar.edu
Thu Mar 5 10:10:07 MST 2009
ZhenCai,
Thanks for sending the compilation log. It makes it much easier to
diagnose the problem.
It looks like the linker doesn't like your version of NetCDF for some
reason. Since MET is written primarily in C++, it links to the C++
interface for NetCDF. It's looking in the directory
"/disk2/hg/dzc/netcdf/lib" for two files: libnetcdf.a and libnetcdf_c++.a
First, please verify that those two files exist in that directory.
Second, it may be the case that you built NetCDF with the GNU compilers
and are building MET with the PGI compilers. You'll need to build them
both with the same family of compilers.
Please take a look at the following excerpt from the MET Online Tutorial:
http://www.dtcenter.org/met/users/support/online_tutorial/compilation/req_libs.php
In the section, "Compiling NetCDF", it lists out which environment
variables to set to tell the NetCDF configure script which compilers to
use. I think the following settings would work for you to build NetCDF
with the PGI compilers:
cd "directory containing NetCDF"
make clean
setenv CC /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgcc
setenv CXX /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgCC
setenv FC /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgf90 or "" to
disable Fortran interface that MET doesn't use
setenv F90 /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgf90 or "" to
disable Fortran interface that MET doesn't use
./configure --prefix=/disk2/hg/dzc/netcdf
make
make install
Try working on your NetCDF build, and then try rebuilding MET.
If you haven't already done so, you should probably download the latest
set of bug fixes for METv1.1. The single tar file named
"METv1.1_patches_20090212.tar.gz" contains all of them:
http://www.dtcenter.org/met/users/support/known_issues/METv1.1/index.php
Also, since you're building on a 64-bit machines, you will likely have
trouble using BUFRLIB and PB2NC. Here's a discussion about problems on
64-bit machines:
http://www.dtcenter.org/met/users/support/known_issues/METv1.0/met_64_bit.php
And lastly, just to let you know, METv2.0 is due to be released in the
next couple of months. We'll send an email when it's available.
Good luck,
John Halley Gotway
johnhg at ucar.edu
> Dear met_help,
>
> I am trying to compile the METv1.1 on Linux.
> However, something errors happened as followings,
> Can you give me some advices to fix it?
> Thanks in advance.
>
> Sincerely,
> ZhenCai, DU
> http://cmsr.iap.ac.cn
> Center for Monsoon System Research,
> Institute of Atmospheric Physics,
> Chinese Academy of Sciences
>
> 2009-03-05
>
> ==============================
> The Linux System I use:
> wrfpost/METv1.1> uname -a
> Linux XE1300 2.6.16.27-0.9-smp #1 SMP Tue Feb 13 09:35:18 UTC 2007 x86_64
> x86_64 x86_64 GNU/Linux
>
> wrfpost/METv1.1> cat /proc/version
> Linux version 2.6.16.27-0.9-smp (geeko at buildhost) (gcc version 4.1.0 (SUSE
> Linux)) #1 SMP Tue Feb 13 09:35:18 UTC 2007
> ===========================
> errors during gmake METv1.1:
>
> interest.cc:
> /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgCC set.cc -Bstatic -c -I..
> -I/disk2/hg/dzc/netcdf/include
> set.cc:
> ar -rs libvx_wrfmode.a WrfMode_Conf.o engine.o interest.o set.o
> ar: creating libvx_wrfmode.a
> ranlib libvx_wrfmode.a
>
> cp libvx_wrfmode.a ../.
>
> *** Making pcp_combine application ***
>
>
> /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgCC -o pcp_combine
> pcp_combine.cc \
> -Bstatic -DMET_BASE=\"/disk2/hg/dzc/wrfpost/METv1.1\" \
> -I../../lib -I/disk2/hg/dzc/netcdf/include
> -I/disk2/hg/dzc/wrfpost/gsl112/include \
> -L../../lib -L/disk2/hg/dzc/netcdf/lib -L/disk2/hg/dzc/wrfpost/gsl112/lib
> \
> -lvx_met_util -lvx_analysis_util -lvx_wrfdata -lvx_met_util \
> -lvx_contable -lvx_grib_classes \
> -lvx_econfig -lvx_gsl_prob -lgsl \
> -lvx_plot_util -lvx_render -lvx_pxm -lvx_color -lvx_ps -lvx_afm \
> -lvx_data_grids -lvx_gnomon -lvx_nav -lvx_cal -lvx_util -lvx_math -lm \
> -lnetcdf_c++ -lnetcdf \
>
> pcp_combine.cc:
> pcp_combine.o: In function `write_netcdf__FLT1iR10GribRecord':
> pcp_combine.cc:(.text+0x2830): undefined reference to `NcFile::__ct(char
> const *, NcFile::FileMode, unsigned long *, unsigned long,
> NcFile::FileFormat)'
> pcp_combine.cc:(.text+0x285e): undefined reference to `NcFile::is_valid(
> const(void))'
> pcp_combine.cc:(.text+0x28dd): undefined reference to
> `NcFile::close(void)'
> pcp_combine.cc:(.text+0x29f3): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x2b10): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x2b35): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x2b93): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x2bcd): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> pcp_combine.o:pcp_combine.cc:(.text+0x2bff): more undefined references to
> `NcFile::add_att(char const *, char const *)' follow
> pcp_combine.o: In function `write_netcdf__FLT1iR10GribRecord':
> pcp_combine.cc:(.text+0x32c2): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x32d4): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x32e9): undefined reference to `NcVar::add_att(char
> const *, float)'
> pcp_combine.cc:(.text+0x32ff): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x3315): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x332e): undefined reference to `NcVar::add_att(char
> const *, float)'
> pcp_combine.cc:(.text+0x3341): undefined reference to `NcVar::add_att(char
> const *, int)'
> pcp_combine.cc:(.text+0x336c): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x3397): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x33cf): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x33e4): undefined reference to `NcVar::add_att(char
> const *, float)'
> pcp_combine.cc:(.text+0x349a): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x34ae): undefined reference to `NcVar::add_att(char
> const *, long)'
> pcp_combine.cc:(.text+0x354c): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x3560): undefined reference to `NcVar::add_att(char
> const *, long)'
> pcp_combine.cc:(.text+0x35a5): undefined reference to `NcVar::add_att(char
> const *, char const *)'
> pcp_combine.cc:(.text+0x3756): undefined reference to `NcVar::put(float
> const *, long, long, long, long, long)'
> pcp_combine.cc:(.text+0x37b4): undefined reference to `NcVar::put(float
> const *, long, long, long, long, long)'
> pcp_combine.cc:(.text+0x380e): undefined reference to `NcVar::put(float
> const *, long, long, long, long, long)'
> pcp_combine.cc:(.text+0x389e): undefined reference to
> `NcFile::close(void)'
> gmake[3]: *** [pcp_combine] Error 2
> gmake[2]: *** [all] Error 2
> gmake[1]: *** [targets] Error 2
> gmake: *** [all] Error 2
> _______________________________________________
> Met_help mailing list
> Met_help at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/met_help
>
More information about the Met_help
mailing list