[Met_help] problems compiling MET

John Halley Gotway johnhg at rap.ucar.edu
Tue Apr 1 09:45:47 MDT 2008


Segayle,

I'd suggest just trying to get MET to compile with a single family of compilers... either, the GNU compilers or the PGI ones.

The issue is that BUFRLIB and the NETCDF library need to be compiled with whichever you choose.  Do you know how those were compiled?  With the PGI compilers or the GNU compilers?

Here are comments relating to PGI - if you decide that's what you'd like to use:

First, looking at your PGI Makefile and Logfile, the problem here is that the linker can't find the NetCDF library archive files it's looking for.  Please look for the files:
/home/swalford/netcdf-3.6.2/lib/libnetcdf.a and /home/swalford/netcdf-3.6.2/lib/libnetcdf_c++.a.  If they don't exist, then that's problem, and I'd suggest rebuilding NetCDF.  But when you do, make 
sure to pass the --prefix option to the configure script.  And let's set some environment variables to ensure that NetCDF will be compiled with the PGI compilers.

For example...
setenv CC /usr/local/pgi/linux86/6.1/bin/pgcc
setenv FC /usr/local/pgi/linux86/6.1/bin/pgf77
setenv F77 /usr/local/pgi/linux86/6.1/bin/pgf77
setenv CXX /usr/local/pgi/linux86/6.1/bin/pgCC
cd /home/swalford/netcdf-3.6.2
configure --prefix=/home/swalford/netcdf-3.6.2
make check
make install

That indicates that NetCDF should be compiled with the PGI compilers and "installed" in the /home/swalford/netcdf-3.6.2 directory.  Once you do that, those library files should be placed in the "lib" 
directory.  So check again, and make sure /home/swalford/netcdf-3.6.2/lib contains the files libnetcdf.a and libnetcdf_c++.a.

If you're going to use PGI, you'll also need to make sure that BUFRLIB was compiled with the PGI compilers.

Here are comments relating to GNU - if you decide that's what you'd like to use:

The problem here is that you're using the wrong compilers.  In your Makefile for GNU, try setting the CPP_COMPILER and F77_COMPILER as follows:

# Path to the C++ Compiler
CPP_COMPILER=/usr/bin/g++

# Path to the Fortran-77 Compiler
F77_COMPILER=/usr/bin/g77

Please make sure that /usr/bin/g77 exists.  If not, try /usr/bin/gfortran instead.  But let me know if you're using gfortran because it'll require a couple of minor changes to get it to work.

And again, if using the GNU compilers, you'll need to make sure that NetCDF and BUFRLIB are compiled with them as well.

Thanks and good luck,
John

Segayle Thompson wrote:
> Hello John,
> 
> I have tried a number of things. I tried compiling with the regular Makefile changing the paths 
> make >& make.log I have attached the makefile and the output ... (make.log and the Makefile )
> 
> Not sure what the problems are here. 
> 
> Then I tried the Makefile_pgi changing it to the Makefile (as suggested) and running 
> make >& make_pgi.log I have attached the makefile and the output ... (make_pgi.log and Makefile_pgi) 
> 
> I am not sure what these messages mean. I do notice that when I run the pgi version I get significantly more warnings and some 'breaks' (which I am not sure what they mean). 
> 
> Segayle
>   ----- Original Message ----- 
>   From: John Halley Gotway<mailto:johnhg at rap.ucar.edu> 
>   To: walford02 at hotmail.com<mailto:walford02 at hotmail.com> ; met_help<mailto:met_help at ucar.edu> 
>   Sent: Monday, March 31, 2008 4:55 PM
>   Subject: Re: [Met_help] problems compiling MET
> 
> 
>   Thomas,
> 
>   I just saw your second email.
> 
>   I'm guessing that you have a couple of errors in your Makefile that are throwing things off.  In particular, please look in your Makefile for the following...
>   (1) Remove any trailing spaces, especially in the lines for NETCDF_BASE and BUFR_BASE.
>   (2) Make sure that the line for GSL_INCS begins with a -I, for example: GSL_INCS = /my/GSL/directory/include
>   (3) Make sure that the line for GSL_LIBS begins with a -L, for example: GSL_LIBS = /my/GSL/directory/lib
> 
>   Please let me know if that does the trick or if you encounter additional problems.
> 
>   Thanks,
>   John Halley-Gotway
>   johnhg at ucar.edu<mailto:johnhg at ucar.edu>
> 
>   walford02 at hotmail.com<mailto:walford02 at hotmail.com> wrote:
>   > Hello,
>   > 
>   > I have been having problems compiling the MET v1.0 code. I have implemented all of the 'known fixes" but I continue to get this error when compiling that is related to the vx_contable_stats.o file. I have enclosed the make.log file. Please let me know if there is something wrong with any of these files. 
>   > 
>   > Thank you 
>   > Segayle Walford
>   > 
>   > 
>   > 
>   > ------------------------------------------------------------------------
>   > 
>   > _______________________________________________
>   > Met_help mailing list
>   > Met_help at mailman.ucar.edu<mailto:Met_help at mailman.ucar.edu>
>   > http://mailman.ucar.edu/mailman/listinfo/met_help<http://mailman.ucar.edu/mailman/listinfo/met_help>
> 


More information about the Met_help mailing list