[Met_help] pb2nc error

John Halley Gotway johnhg at ucar.edu
Wed Mar 3 10:28:39 MST 2010


Mike,

We've seen compilation problems similar to this in the past.  Please try the following:

(1) Make sure you've compiled BUFRLIB using the following commands (taken from http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compilation/req_libs.php):
     > pgcc -c -DUNDERSCORE *.c
     > pgf77 -c -DUNDERSCORE -Mnosecond_underscore *.f *.F
     > ar crv libbufr.a *.o

(2) In your top-level Makefile, please use the "pgf77" compiler instead of "pgf90":
   FC           = /usr/local/pgi/linux86-64/10.1/bin/pgf77

(3) In your top-level Makefile, empty out the lines for F2C.  F2C is NOT necessary for the PGI compilers.  So just empty the lines out:
   F2C_BASE     =
   F2C_INCS     =
   F2C_LIBS     =
   F2C_LIBNAME  =

(4) Try rebuilding MET:
   make clean
   make >& make_met.log

Please give that a shot and let me know how it goes.

Thanks,
John

Mike Ku wrote:
> John,
> 
> I still have problem to compile METv2.0 with pgi compiler, it still have
> problem with pb2nc. Attached are the "Makefile" and "make log" files.
> Thank you.
> 
> Mike
> 
> ----- Original Message ----- From: "John Halley Gotway" <johnhg at ucar.edu>
> To: "Mike Ku" <mku at dec.state.ny.us>; "met_help" <met_help at ucar.edu>
> Sent: Monday, March 01, 2010 4:28 PM
> Subject: Re: [Met_help] pb2nc error
> 
> 
>> Mike,
>>
>> Yes, I have compiled MET with PGI on a Linux machine running 64-bit
>> Debian OS.  I'm using PGI version 8.0-5.  You can type "pgCC
>> --version" to see what version number of PGI you're using.
>>
>> [johnhg at schroeder]% pgCC --version
>> pgCC 8.0-5 64-bit target on x86-64 Linux -tp penryn-64
>>
>> I'm able to compile MET without error and run the test scripts without
>> any runtime problems.  Be sure to start with the file
>> "Makefile_pgi"... create a copy of it, and then configure it to point to
>> your local libraries.
>>
>> If you run into any compilation problems, please send me your Makefile
>> and a log file showing the output when you type "make".
>>
>> Thanks and good luck,
>> John
>>
>> Mike Ku wrote:
>>> John,
>>>
>>> I will try that. Thank you for the help.
>>> Do 64-bit also work for pgi compiler?
>>>
>>> Mike
>>>
>>> ----- Original Message ----- From: "John Halley Gotway"
>>> <johnhg at ucar.edu>
>>> To: "Mike Ku" <mku at dec.state.ny.us>; "met_help" <met_help at ucar.edu>
>>> Sent: Monday, March 01, 2010 4:09 PM
>>> Subject: Re: [Met_help] pb2nc error
>>>
>>>
>>>> Mike,
>>>>
>>>> I have actually been able to compile MET successfully (including
>>>> pb2nc) on a 64-bit machine using the latest version of BUFRLIB.
>>>> Please do try building MET as 64-bit using the GNU compilers.
>>>>
>>>> So that means the following:
>>>> - Recompile BUFRLIB without the 32-bit mode.
>>>> - Comment out the -m32 options in the top-level MET Makefile.
>>>> - Make sure you point to the 64-bit version of NetCDF compiled using
>>>> GNU.
>>>>
>>>> Rebuild MET and rerun 'test_pb2nc.sh'.  Please give that a try and let
>>>> me know if you continue to experience problems in the compilation or
>>>> test scripts.
>>>>
>>>> Thanks,
>>>> John
>>>> met_help at ucar.edu
>>>>
>>>> Mike Ku wrote:
>>>>> John,
>>>>>
>>>>> I uncommented "-DBLOCK4", but still get the same error. Attach is my
>>>>> "Makefile".
>>>>> I have 64 bits Linux system with pgi compiler. I had problem in
>>>>> compiling METv2.0 of "pb2nc"  by using pgi compiler. After searched on
>>>>> the web and it seemed to me BUFRLIB should be used in 32 bits mode,
>>>>> and
>>>>> build of 64 bits BUFRLIB caused the error in building pb2nc. Later I
>>>>> managed to build 32 bits METv2.0 with "GNU" compuiler (see my
>>>>> Makefile).
>>>>> I download pre-builded 32 bits NETCDF library from unidata since I
>>>>> could
>>>>> not build locally.
>>>>> Thanks,
>>>>>
>>>>> Michael
>>>>>
>>>>> ----- Original Message ----- From: "John Halley Gotway"
>>>>> <johnhg at ucar.edu>
>>>>> To: "Mike Ku" <mku at dec.state.ny.us>
>>>>> Cc: <met_help at ucar.edu>
>>>>> Sent: Wednesday, February 24, 2010 12:57 PM
>>>>> Subject: Re: [Met_help] pb2nc error
>>>>>
>>>>>
>>>>>> Michael,
>>>>>>
>>>>>> We'll I've never seen this error message from BUFRLIB before. 
>>>>>> This is
>>>>>> a new one for me.
>>>>>>
>>>>>> Here's one thing you can try that may have an effect, but I'm not all
>>>>>> that hopeful about it.  Look in your top-level MET Makefile for the
>>>>>> flag "-DBLOCK4".  If it is commented out with a '#' in front
>>>>>> of it, try removing the '#' to uncomment it.  Or if it's not
>>>>>> commented
>>>>>> out, try adding a '#' in front of it to comment it out.  Then do a
>>>>>> "make clean" followed by a "make" to rebuild MET.  And then
>>>>>> try re-running that test script, "METv2.0/scripts/test_pb2nc.sh".
>>>>>>
>>>>>> Please let me know if that solves your problem.  If so, great, but
>>>>>> like I said, I'm not that hopeful that that'll fix it.
>>>>>>
>>>>>> My next thought is to see what compilers you're using.  Perhaps, you
>>>>>> didn't build BUFRLIB and MET with the same family of compilers.
>>>>>> Here's an excerpt from our online tutorial about building BUFRLIB:
>>>>>>
>>>>>> http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compilation/req_libs.php
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> When you build BUFRLIB, you should use C and Fortran compilers from
>>>>>> the same "family".
>>>>>> And when you build MET, you should use C++ and Fortran compilers from
>>>>>> the same "family".  So g++/gfortran for GNU, pgCC/pgf90 for PGI,
>>>>>> icc/ifort for Intel, xlC/xlf for IBM compilers.
>>>>>>
>>>>>> If you continue to have problems, please send me the top-level MET
>>>>>> Makefile you're using.  Perhaps I'll see something in there that's
>>>>>> causing a problem.
>>>>>>
>>>>>> Thanks,
>>>>>> John Halley Gotway
>>>>>> met_help at ucar.edu
>>>>>>
>>>>>> Mike Ku wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I installed METv2.0 with 32bit on my Linux system. I ran the pb2nc
>>>>>>> test and I got error as in the log file.
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Michael
>>>>>>> ************************************************
>>>>>>> Michael Ku
>>>>>>> NYS Dept of Environmental Conservation
>>>>>>> 625 Broadway
>>>>>>> Albany, NY 12233
>>>>>>>
>>>>>>> Ph:518-402-8385
>>>>>>> Fax:518-402-9035
>>>>>>> e-Mail: mku at dec.state.ny.us
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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