[Met_help] error building MET with cygwin/gcc

John Halley Gotway johnhg at rap.ucar.edu
Thu Jul 31 13:31:12 MDT 2008


Mike,

Since you've built MET as 64-bit, I don't think you'll be able to run PB2NC because BUFRLIB won't work well.

If you had built MET as 32-bit, you could run PB2NC but you'd likely need to "reblock" the sample PREPBUFR data in the MET tarball using the "cwordsh" FORTRAN blocking utility.  That step is mentioned 
in the MET tutorial here: http://www.dtcenter.org/met/users/support/online_tutorial/pb2nc/index.php

Or from the top-level METv1.1 directory in a C-Shell, this foreach loop would reblock the data:

foreach file (`ls data/sample_obs/prepbufr/* | cut -d' ' -f9`)
/path/to/cwordsh unblk ${file} ~/tmp.unblk
/path/to/cwordsh block ~/tmp.unblk ${file}
end
rm ~/tmp.unblk

Where /path/to/cwordsh is the path to your version of the cwordsh tool.

We're considering alternatives to using BUFRLIB since it's been causing the majority of the issues people are encountering in using MET.

Hope that helps.

John

Michael Baldwin wrote:
> John-
> 
> FYI, in cygwin I was able to get pb2nc to compile 
> after changing line 18 from:
> #include <ctype.h>
> to:
> #include <cctype>
> 
> but the test failed with the following:
> $ ./test_pb2nc.sh
> 
> *** Running PB2NC on a fortran-blocked PrepBufr file ***
> Reading Config File:    config/PB2NCConfig_G212
> Creating NetCDF File:   ../out/pb2nc/sample_pb.nc
> Reading PrepBufr File:  ../data/sample_obs/prepbufr/ndas.t00z.prepbufr.tm12.2007
> 0401.nr.blk
> 
>  **************BUFR ARCHIVE LIBRARY ABORT*****************
>  BUFRLIB: OPENBF - FIRST 4 BYTES READ FROM RECORD IN INPUT FILE CONNECTED TO UNI
> T  11 NOT 'BUFR', DOES NOT CONTAIN BUFR DATA
>  **************BUFR ARCHIVE LIBRARY ABORT*****************
> 
> Mike
> 
> Quoting John Halley Gotway <johnhg at rap.ucar.edu>:
> 
>> Mike,
>>
>> I went ahead and requested that the other user tar up his version of MET and
>> send it to me.  Then we'd be able to see what changes he had to make.  If and
>> when I hear back from him, I'll let you know.
>>
>> Regarding running MET on a 64-bit machine, you could build MET as 32-bit and
>> hopefully PB2NC would also run fine.  If you'd like to try that, this webpage
>> may be of use:
>> http://www.dtcenter.org/met/users/support/known_issues/METv1.0/met_64_bit.php
>>
>> I'll be out of town starting Monday, August 4th through Wednesday, August
>> 13th.  If something comes up, Randy Bullock may be able to help - just send
>> messages through "met_help at ucar.edu".  If not, I 
>> could help when I get back in town.
>>
>> Thanks,
>> John
>>
>> Mike Baldwin wrote:
>>> Hi John-
>>>
>>> Thanks for the quick reply.  I was having trouble building things on
>>> our 64-bit linux cluster so I figured that I'd try it with cygwin.  I was
>>> just able to get MET built without PB2NC on the 64-bit machine,
>>> so that should do it for me for now.  I've been trying to modify
>>> the cygwin source to add includes, will let you know how this turns out!
>>>
>>> Mike
>>>
>>> John Halley Gotway wrote:
>>>> Hello Mike,
>>>>
>>>> MET has not been ported to cygwin yet.  In the past, we haven't heard 
>>>> much interest in running MET via cygwin.  However, I am aware of one 
>>>> other user who successfully built/ran MET on cygwin. Although he's had 
>>>> problems with the PB2NC - BUFRLIB piece of it.
>>>>
>>>> I would guess that the include files just aren't set up the same way 
>>>> on cygwin as they are on most Linux distributions.  You'd probably 
>>>> need to add some more include files in some of the MET source files to 
>>>> get it to build.
>>>>
>>>> If you'd like, I could ask the other user who's built MET with cygwin 
>>>> to tar up and send me his built version.  Then we could do a diff for 
>>>> each file to see what changes he's had to make.  Building MET on a 
>>>> Linux machine would probably be a lot easier, but if you'd like me to 
>>>> pursue the cygwin information, I'd be happy to.
>>>>
>>>> Thanks,
>>>> John Halley-Gotway
>>>> johnhg at ucar.edu
>>>>
>>>>
>>>> Michael Baldwin wrote:
>>>>> Howdy-
>>>>>
>>>>> I'm not having any luck with building MET.
>>>>> I'm trying to use gcc compilers (4.3.1)
>>>>> with cygwin and have installed gsl/netcdf/BUFRLIB/f2c
>>>>> but get the following when I try to build MET:
>>>>>
>>>>> Thanks for your help!
>>>>>
>>>>> Mike Baldwin
>>>>>
>>>>> ====
>>>>>
>>>>> $ make
>>>>>
>>>>> *** Making the Model Evaluation Tools Project ***
>>>>>
>>>>>
>>>>> *** Making vx_afm Library ***
>>>>>
>>>>> /usr/local/bin/g++ afm.cc -Wall -Wshadow -static   -c -I..
>>>>> /usr/local/bin/g++ afm_keywords.cc -Wall -Wshadow -static   -c -I..
>>>>> /usr/local/bin/g++ afm_line.cc -Wall -Wshadow -static   -c -I..
>>>>> /usr/local/bin/g++ afm_token.cc -Wall -Wshadow -static   -c -I..
>>>>> /usr/local/bin/g++ afmkeyword_to_string.cc -Wall -Wshadow -static   
>>>>> -c -I..
>>>>> /usr/local/bin/g++ afmtokentype_to_string.cc -Wall -Wshadow -static   
>>>>> -c -I..
>>>>>
>>>>> ar -rs libvx_afm.a afm.o afm_keywords.o afm_line.o afm_token.o 
>>>>> afmkeyword_to_str
>>>>> ing.o afmtokentype_to_string.o
>>>>> ar: creating libvx_afm.a
>>>>> ranlib libvx_afm.a
>>>>>
>>>>> cp libvx_afm.a ../.
>>>>>
>>>>> *** Making vx_analysis_util Library ***
>>>>>
>>>>> /usr/local/bin/g++ analysis_utils.cc -Wall -Wshadow -static   -c -I..
>>>>> /usr/local/bin/g++ box.cc -Wall -Wshadow -static   -c -I..
>>>>> box.cc: In member function 'void Box::assign(const Box&)':
>>>>> box.cc:156: error: 'memcpy' was not declared in this scope
>>>>> box.cc: In member function 'void Box::set_unsorted(const double*, int)':
>>>>> box.cc:223: error: 'memcpy' was not declared in this scope
>>>>> make[3]: *** [box.o] Error 1
>>>>> make[2]: *** [vx_analysis_util_all] Error 2
>>>>> make[1]: *** [libs] Error 2
>>>>> make: *** [all] Error 2
>>>>>
>>>>> -------------------------------------------------
>>>>> Dr. Michael E. Baldwin
>>>>> Assistant Professor
>>>>> Purdue University
>>>>> Department of Earth and Atmospheric Sciences
>>>>> 550 Stadium Mall Drive, West Lafayette, IN 47906-2051
>>>>> -------------------------------------------------
>>>>> _______________________________________________
>>>>> Met_help mailing list
>>>>> Met_help at mailman.ucar.edu
>>>>> http://mailman.ucar.edu/mailman/listinfo/met_help
> 
> 
> -------------------------------------------------
> Dr. Michael E. Baldwin
> Assistant Professor
> Purdue University
> Department of Earth and Atmospheric Sciences
> 550 Stadium Mall Drive, West Lafayette, IN 47906-2051
> -------------------------------------------------


More information about the Met_help mailing list