[Met_help] MET compilation trouble

John Halley Gotway johnhg at rap.ucar.edu
Tue Jan 8 09:57:27 MST 2008


Andy,

If possible, I'd suggest using compilers from the same family of compilers rather than mixing them.  Section 2.2. of the MET User's Guide lists the GNU gcc/f77 compilers and the PGI pgCC/pgf77
compilers as the ones we've developed and tested MET with.  So if you have access to f77, I'd strongly suggest using that as the Fortran compiler.  Then you can follow the instructions for building
BUFRLIB in section 2.6 and for building MET in section 2.9 - I think that would solve your problem.

If you don't have access to f77, we can give the Intel Fortran compiler a shot and see how it goes.  Unfortunately, I don't have access to that compiler to test it out.

Those error messages are coming from BUFRLIB.  The linker is having trouble finding those routines in the library archive file "libbufr.a".  It may have to do with the options you chose for how to
deal with underscores in routine names when compiling BUFRLIB.

You could try the following:
- Go into the directory where you've built BUFRLIB.
- Run the 'nm' command on the file "libbufr.a" to see it contents, and search for "openbf_", for example: nm libbufr.a | grep "openbf"
- See what's defined in there: is it "openbf" or "openbf_" or something else?
- Take a look at the options for the Intel Fortran compiler (man ifort).  You want to look for something similar to the "-DUNDERSCORE" and "-fno-second-underscore" options that are used for the GNU
compilers.
- If you're able to find the equivalent options for the Intel Fortran compiler, substitute them into the directions listed in section 2.6 for building BUFRLIB.
- Try rebuilding BUFRLIB with those options, and then try rebuilding MET.

Please let me know if this solves your problem, or if we need to try something else.

Thanks,
John Halley Gotway
met_help at ucar.edu

Andy_Holland at URSCorp.com wrote:
> 
> I'm trying to compile MET on an HP running RedHat Enterprise Linux 5 using
> the Intel Fortran compiler and the GNU C compilers.  I've compiled all of
> the other libraries with no problem.  Below is a snippet of my make logfile
> for MET.  It continues on with more undefined references.  I'm not sure
> which library these undefined references are pointed to.  Any help would be
> greatly appreciated.
> 
> Thank you,
> Andy Holland
> 
> 
> *** Making pb2nc application ***
> 
> 
> 
> /usr/bin/g++ -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o readpb.o
> dumppb.o  \
>         -g -Bstatic  -DMET_BASE=\"/models/METv1.0\" \
>         -I/usr/local/include/gsl \
>         -I../../lib -I../../lib -I/usr/local/include
> -I/usr/local/lib/BUFRLIB -I/usr/lib/gcc/i386-redhat-linux/3.4.6/include \
>         -L../../lib -L../../lib -L/usr/local/lib -L/usr/local/include
> -L/usr/local/lib/BUFRLIB -I/usr/lib/gcc/i386-redhat-linux/3.4.6 \
>         -lbufr -lvx_grib_classes -lvx_wrfdata -lvx_econfig \
>         -lvx_data_grids -lvx_math -lvx_cal -lvx_util -lvx_met_util -lm  \
>         -lnetcdf_c++ -lnetcdf
> numpbmsg.o: In function `numpbmsg':
> /models/METv1.0/src/pb2nc/numpbmsg.f:22: undefined reference to `ufbtab_'
> openpb.o: In function `openpb':
> /models/METv1.0/src/pb2nc/openpb.f:20: undefined reference to `for_open'
> /models/METv1.0/src/pb2nc/openpb.f:21: undefined reference to `openbf_'
> /models/METv1.0/src/pb2nc/openpb.f:22: undefined reference to `datelen_'
> 
> 
> 
> Andy Holland
> Air Quality Modeler
> URS Corporation
> 1600 Perimeter Park Drive
> Suite 400
> Morrisville, NC 27560
> Direct: (303) 796-4694 or (919) 461-1467
> Cell: (919) 619-4218
> Fax: (919) 461-1415
> andy_holland at urscorp.com
> 
>                                                                               
>  This e-mail and any attachments are confidential. If you receive this        
>  message in error or are not the intended recipient, you should not retain,   
>  distribute, disclose or use any of this information and you should destroy   
>  the e-mail and any attachments or copies.                                    
>                                                                               
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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