[Met_help] Re: Fwd: MET compilation and NETCDF library on NCAR machine

John Halley Gotway johnhg at rap.ucar.edu
Wed Aug 20 09:56:49 MDT 2008


Segayle,

Your MET help question was forwarded to me from the WRF-Help folks.  For future reference, please direct all MET related questions to the MET-Help email address: met_help at ucar.edu.

Regarding your question about building MET on lightning...

I believe the errors you're seeing come from using inconsistent sets of compilers.  The NetCDF library to which you're linking (/usr/local/apps/netcdf-3.6.2) was built using PGI compilers.  However,
you're trying to build MET using the GNU g++/g77 compilers.  Instead, I'd suggest using the PGI compilers on ligthning.  I've build METv1.1 on lightning in /gpfs/lightning/johnhg/MET_releases/METv1.1.

Take a look at the Makefile I used in /gpfs/lightning/johnhg/MET_releases/METv1.1/Makefile.  You'll need to rebuild BUFRLIB using the PGI compilers before rebuilding MET.  Or I suppose you could just
link to my PGI version of BUFRLIB in /gpfs/lightning/johnhg/MET_releases/external_libs/bufrlib.

Hope this helps.

Thanks,
John Halley-Gotway
johnhg at ucar.edu

WRF Help wrote:
> Hi John,
> 
> This was in the NMM wrfhelp inbox.  Maybe you can respond as methelp and
> let them know to send questions there.
> 
> Jamie
> 
> 
>   --- the forwarded message follows ---
> 
> ------------------------------------------------------------------------
> 
> Subject:
> MET compilation and NETCDF library on NCAR machine
> From:
> <walford02 at hotmail.com>
> Date:
> Tue, 19 Aug 2008 18:17:33 -0400
> To:
> "WRF Help" <wrfhelp at ucar.edu>
> 
> To:
> "WRF Help" <wrfhelp at ucar.edu>
> 
> 
> hello,
> 
> I am trying to compile METv1.1 on the lightning machine at NCAR however and I am getting some problems with netcdf_c++ libraries. When I compile I get this error in my met.log file:
> 
> /usr/bin/g++ -o pcp_combine pcp_combine.cc \
> -Wall -Wshadow -static   -DMET_BASE=\"/ptmp/swalford/METv1.1\" \
> -I../../lib -I/usr/local/apps/netcdf-3.6.2/include -I/home/lightning/swalford/gsl-1.11/include \
> -L../../lib -L/usr/local/apps/netcdf-3.6.2/lib -L/home/lightning/swalford/gsl-1.11/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 \
> 
> 
> [1]    Exit 2                        make >& met.log
> /ptmp/swalford/cc6cdgZB.o(.text+0x23ac): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::NcFile[in-charge](char const*, NcFile::FileMode, unsigned long*, unsigned long, NcFile::FileFormat)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2416): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::is_valid() const'
> /ptmp/swalford/cc6cdgZB.o(.text+0x246d): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::close()'
> /ptmp/swalford/cc6cdgZB.o(.text+0x257c): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x26c3): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x26e1): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2746): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x279a): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x27de): more undefined references to `NcFile::add_att(char const*, char const*)' follow
> /ptmp/swalford/cc6cdgZB.o(.text+0x2f38): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2f4e): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2f67): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, float)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2f7d): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2f93): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2fac): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, float)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2fc3): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, int)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x2ff2): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x3021): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x3062): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x307b): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, float)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x3115): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x312a): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, long)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x31b5): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x31ca): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, long)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x321a): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::add_att(char const*, char const*)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x33a2): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::put(float const*, long, long, long, long, long)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x33eb): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::put(float const*, long, long, long, long, long)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x3433): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcVar::put(float const*, long, long, long, long, long)'
> /ptmp/swalford/cc6cdgZB.o(.text+0x34b3): In function `write_netcdf(long long, long long, int, GribRecord&)':
> : undefined reference to `NcFile::close()'
> collect2: ld returned 1 exit status
> make[3]: *** [pcp_combine] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [targets] Error 2
> make: *** [all] Error 2
> 
> I am using the netcdf located at /usr/local/apps/netcdf-3.6.2 
> 
> Should I try to reinstall netcdf in my directory for this? 
> 
> Segayle 
> 


More information about the Met_help mailing list