[Met_help] help for installing METv2.0

John Halley Gotway johnhg at rap.ucar.edu
Thu Jun 18 07:01:11 MDT 2009


Grimaw,

I'm guessing that the NetCDF error messages you're seeing are the result of using an inconsistent set of compilers.  In the error message you sent, I see that you're using the PGI compilers to compile
MET.  And I see that you're linking to the version of the NetCDF libraries in /usr/local/lib.  I'm guessing that the version of the NetCDF library in /usr/local/lib was probably NOT compiled using the
PGI compilers.  But you'll need to link to a version of NetCDF compiled using the PGI compilers.  I'd suggest downloading and compiling NetCDF locally using the PGI compilers using the following steps:

Download NetCDF 3.6.3 from here: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-3.6.3.tar.gz
Unzip it:  gunzip netcdf-3.6.3.tar.gz
Untar it:  tar -xvf netcdf-3.6.3.tar
Enter dir: cd netcdf-3.6.3
Choose compilers:
           setenv CC  "/home/wseta/opt/pgi/linux86/7.0-2/bin/pgcc"
           setenv CXX "/home/wseta/opt/pgi/linux86/7.0-2/bin/pgcc"
           setenv FC  ""
           setenv F90 ""
Configure it: ./configure --prefix=`pwd`
Compile it:   make
Install it:   make install

These commands should compile the C and C++ interfaces for NetCDF and skip the Fortran interface that MET doesn't use.  It will install the library in current "netcdf-3.6.3" directory - that's what
the "--prefix" option does.

Next, you'll need to the edit the top-level MET Makefile and point the NetCDF variables to this version of NetCDF.

And then try rebuilding MET.

Hope that helps.

John Halley Gotway
johnhg at ucar.edu

girmaw bogale wrote:
> Dear Sir/Madam,
> 
> I faced  a compilation problem when I was trying to install Met
> verification package.
> The error is like this.
> /home/wseta/opt/pgi/linux86/7.0-2/bin/pgCC -o pcp_combine pcp_combine.cc \
>         -Bstatic    -DMET_BASE=\"/home/wseta/METv2.0\" \
>         -I../../lib -I/usr/local/include -I/usr/local/include/gsl \
>         -L../../lib -L/usr/local/lib -L/usr/local/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+0x34c5): undefined reference to
> `NcFile::__ct(char const *, NcFile::FileMode, unsigned int *, unsigned
> int, NcFile::FileFormat)'
> pcp_combine.cc:(.text+0x350c): undefined reference to
> `NcFile::is_valid( const(void))'
> pcp_combine.cc:(.text+0x359a): undefined reference to `NcFile::close(void)'
> pcp_combine.cc:(.text+0x373e): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x39c9): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x3bfb): undefined reference to
> `NcVar::add_att(char const *, int)'
> pcp_combine.cc:(.text+0x3c47): undefined reference to
> `NcVar::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x3c93): undefined reference to
> `NcVar::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x3ce2): undefined reference to
> `NcVar::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x3d06): undefined reference to
> `NcVar::add_att(char const *, float)'
> pcp_combine.cc:(.text+0x3dee): undefined reference to
> `NcVar::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x3e14): undefined reference to
> `NcVar::add_att(char const *, long)'
> pcp_combine.cc:(.text+0x3ee6): undefined reference to
> `NcVar::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x3f0c): undefined reference to
> `NcVar::add_att(char const *, long)'
> pcp_combine.cc:(.text+0x3f8e): undefined reference to
> `NcVar::add_att(char const *, char const *)'
> pcp_combine.cc:(.text+0x3fb1): undefined reference to
> `NcVar::add_att(char const *, int)'
> pcp_combine.cc:(.text+0x401f): undefined reference to
> `NcVar::put(float const *, long, long, long, long, long)'
> pcp_combine.cc:(.text+0x408f): undefined reference to `NcFile::close(void)'
> ../../lib/libvx_met_util.a(write_netcdf.o): In function
> `write_netcdf_proj(NcFile *, Grid const &)':
> write_netcdf.cc:(.text+0x70): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> write_netcdf.cc:(.text+0xe5): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> write_netcdf.cc:(.text+0x134): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> write_netcdf.cc:(.text+0x17e): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> write_netcdf.cc:(.text+0x1c8): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> ../../lib/libvx_met_util.a(write_netcdf.o):write_netcdf.cc:(.text+0x20b):
> more undefined references to `NcFile::add_att(char const *, char const
> *)' follow
> make[3]: *** [pcp_combine] Error 2
> make[2]: *** [all] Error 2
> make[1]: *** [targets] Error 2
> make: *** [all] Error 2
> 
> I would appreciate your prompt reply.
> 
> Best regards


More information about the Met_help mailing list