[Met_help] help with METv1.1 gmake on Linux system

John Halley Gotway johnhg at rap.ucar.edu
Fri Mar 6 06:54:16 MST 2009


ZhenCai,

You should be able to *COMPILE* fine on a 64-bit machine.  It's just that when you actually try to run PB2NC, you'll experience errors.  The error message I see below is that the compiler can't find
the BUFRLIB file for which it's looking.  I see that you're trying to use a version of BUFRLIB related to WRF in /disk2/hg/dzc/wrfpost/iowrf.  So the compiler is looking for the file
"/disk2/hg/dzc/wrfpost/iowrf/libbufr.a".  I'm not sure whether that will work on not.

If you are not able to build MET as 32-bit on your machine, I don't think you're going to have much luck running BUFRLIB and PB2NC right now.  So while I could help you to get them to compile, it
won't make much difference because of the runtime errors you'll see.

So I'd suggest the following:
(1) In the top-level MET Makefile, find the line for "DISABLE_PB2NC" and set it as:
    DISABLE_PB2NC = 1
    That turns off the compilation of the PB2NC tool.
(2) Try rebuilding MET and hopefully all of the other tools will build fine.
(3) Go into the scripts directory: cd scripts
(4) Edit the "test_all.sh" file by commenting out the line "test_pb2nc.sh".
(5) Run the other test scripts with: ./test_all.sh >& test_all.log&
(6) Watch the execution of the test scripts: tail -f test_all.log

If, for some reason, you would like to get BUFRLIB and PB2NC to actually compile, here's what you'd need to do:
(1) Retrieve BUFRLIB from http://www.nco.ncep.noaa.gov/sib/decoders/BUFRLIB/BUFRLIB.tar
(2) Untar it: tar -xvf BUFRLIB.tar
(3) Go into the BUFRLIB directory: cd BUFRLIB
(4) Build BUFRLIB with PGI using the following 3 commands:
    pgcc -c -DUNDERSCORE *.c
    pgf77 -c -DUNDERSCORE -Mnosecond_underscore *.f
    ar crv libbufr.a *.o
(5) Edit the top-level Makefile to point to the new location of BUFRLIB.
(6) Unset the "DISABLE_PB2NC" flag in the top-level Makefile.
(7) Rebuild MET with "make clean" followed by "make"

But as I've said, even if you get BUFRLIB and PB2NC compiled, you'll likely have problems at run time.

Hope that helps,
John

杜振彩 wrote:
> Dear John,
> 
> Thank you for your help.
> The "pcp_combine.cc " problem is gone with your advices.
> However, as you said, the  "pb2nc.cc: " problem comes  up. 
> Then I take your advices and go to the website: http://www.dtcenter.org/met/users/support/known_issues/METv1.0/met_64_bit.php 
> Do the compiles as they said.
> Unfortunately, the 32bit doesn't work on the computer I use. 
> Some new errors happened.
> Maybe I don't have the fortune to get the METv1.1 work on my computer.
> 
> If you had good idears, tell me.
> Any hints would be appreciated.
> 
> 
> Sincerely,
> ZhenCai
> 
> http://cmsr.iap.ac.cn
> 6Mar2009
> 
> ===================
>  
> ext.libs/gsl-1.12> setenv CC /usr/bin/gcc 
> ext.libs/gsl-1.12> setenv CFLAGS -m32 
> ext.libs/gsl-1.12> ./configure --prefix=/disk2/hg/dzc/wrfpost/METv1.1-32bit/ext.libs/gsl-32bit/
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking whether make sets $(MAKE)... (cached) yes
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking for gcc... /usr/bin/gcc
> checking for C compiler default output file name... 
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
> ==============
> *** Making pb2nc application ***
> 
> /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgCC -c pb2nc_Conf.cc -Bstatic   \
> -I../../lib
> pb2nc_Conf.cc:
> /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgf77 -c numpbmsg.f -Bstatic  
> numpbmsg.f:
> /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgf77 -c openpb.f -Bstatic  
> openpb.f:
> /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgf77 -c readpb.f -Bstatic  
> readpb.f:
> /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgf77 -c dumppb.f -Bstatic  
> dumppb.f:
> 
> 
> /disk2/hg/dzc/pgi716/linux86-64/7.1-6/bin/pgCC -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o readpb.o dumppb.o  \
> -Bstatic   -DMET_BASE=\"/disk2/hg/dzc/wrfpost/METv1.1\" \
> -I../../lib -I/disk2/hg/dzc/netcdf/include -I/disk2/hg/dzc/wrfpost/gsl112/include -I/disk2/hg/dzc/wrfpost/iowrf -I/disk2/hg/dzc/wrfpost/iowrf \
> -L../../lib -L/disk2/hg/dzc/netcdf/lib -L/disk2/hg/dzc/wrfpost/gsl112/lib -L/disk2/hg/dzc/wrfpost/iowrf -L/disk2/hg/dzc/wrfpost/iowrf \
> -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 \
> -lbufr -lg2c  -lpgftnrtl -lrt -lpthread
> pb2nc.cc:
> /usr/bin/ld: cannot find -lbufr
> gmake[3]: *** [pb2nc] Error 2
> gmake[2]: *** [all] Error 2
> gmake[1]: *** [targets] Error 2
> make: *** [all] Error 2
> 
> =============
> 
> 
> 
> 
> 2009-03-06 
> 
> 
> 
> 杜振彩 
> 
> 
> 
> 发件人: John Halley Gotway 
> 发送时间: 2009-03-06  01:10:09 
> 收件人: dfeijat 
> 抄送: met_help 
> 主题: Re: [Met_help] help with METv1.1 gmake on Linux system 
>  
> 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