[Met_help] Met compile error

John Halley Gotway johnhg at rap.ucar.edu
Wed Jul 15 09:18:30 MDT 2009


Priyanka,

Yes, MET can be compiled with PGI.  However, the only complication is that you'll need to link to a versions of NetCDF and BUFRLIB compiled with the same set of PGI compilers.

Building NetCDF is not that hard to do:
(1) Get a NetCDF tarball an unpack it.  I'll assume for example, that you have netcdf-3.6.3.
(2) cd netcdf-3.6.3
(3) setenv CC  /path/to/pgcc
(4) setenv CXX /path/to/pgCC
(5) setenv FC  ''
(6) setenv F90 ''
(7) ./configure --prefix=/directory/to/install/netcdf
(8) make
(9) make install

The above commands are for use with the C-shell (csh).  I set FC and F90 to empty strings so that NetCDF doesn't compile the Fortran interface.  MET only uses the C/C++ interface, so you don't need to
compile the Fortran one - unless you'd like to for some reason.

And you'll need to compile BUFRLIB using those same PGI compilers as well.  Please refer to the instructions here:
http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compilation/req_libs.php

You should NOT have to recompile GSL.  I believe that should work fine.

So once you get NetCDF and BUFRLIB compiled using those PGI compilers, set up the top-level MET Makefile using the Makefile_pgi file as a starting point.  You'll need to configure the paths for the
compilers and locations of NetCDF, BUFRLIB, and GSL.  Then try building it.

Thanks,
John


Priyanka Pradip Kuma Roy wrote:
> Hello John,
> 
> Thank you for your reply. We do have pgi compilers however, since I have already installed WRF-ARW and netcdf using intel compilers, I assumed MET should also be compiled with intel. Please suggest whether I can compile MET in this case with pgi.
> 
> Thanks 
> 
> Sincerely,
> Priyanka
> 
> 
> 
> ----- Original Message -----
> From: John Halley Gotway <johnhg at rap.ucar.edu>
> Date: Wednesday, July 15, 2009 9:56 am
> Subject: Re: [Met_help] Met compile error
> 
>> Priyanka,
>>
>> Wow, you experienced an error on the very first line of the 
>> compilation!  I'm wondering if there's a problem with how this 
>> compiler is set up on your machine.  Have you used this compiler to
>> successfully compile other code in the past?  I'd suggest asking a 
>> systems administrator about the error you're seeing, and find out 
>> if there's a problem with the compiler.
>>
>> If they're available on your machine, you could also try compiling 
>> MET with the PGI (pgCC and pgf77) or GNU (g++ and gfortran) compilers.
>>
>> Thanks,
>> John Halley Gotway
>> johnhg at ucar.edu
>>
>> Priyanka Pradip Kuma Roy wrote:
>>> Hello Sir/Madam,
>>>
>>> I have been trying to compile METv2.0  and am encountering error 
>> about "undefined __sync_fetch_and_add(__mem, __val); }. 
>>> I have attached the log file along with this email. 
>>> I will greatly appreciate any help.
>>>
>>> Thank you
>>>
>>> Sincerely,
>>> Priyanka
>>>
>>> Ph.D Candidate
>>> College of Science, GMU
>>> Fairfax, VA
>>>
>>>
>>>
>>> -----------------------------------------------------------------
>> -------
>>> _______________________________________________
>>> 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