[Met_help] pb2nc 'Segmentation fault' about the version 2

John Halley Gotway johnhg at rap.ucar.edu
Tue Apr 28 07:23:58 MDT 2009


Kefeng,

To answer your question, the major change we've made to PB2NC for METv2.0 is that we're now doing the Fortran-Blocking step internal to PB2NC.  In METv1.1, we required you to run the "cwordsh" utility
to Fortran-Block the input PrepBUFR files on your machine.  Now, we're doing that step inside of PB2NC itself.

In the error message you sent, I see that PB2NC may be having problems while performing that blocking step.  But I'm not sure why.  I see that you must have edited the "tmp_dir" setting in the PB2NC
configuration file to point to the current directory instead of "/tmp":
tmp_dir = "./";
So PB2NC is trying to write that temporary file in the current directory.  Do you have permissions to write to that directory?  After PB2NC seg-faults, do you see a temporary PB2NC file in that
directory?  It'd be named something like pb2nc_NNN_blk.pb.  What is the size of that file?

Also, there is one option when compiling MET that relates to this Fortran-Blocking step.  In the top-level MET Makefile, look in the line that contains "ARCH_FLAGS".  You should see "-DBLOCK4" either
commented out or uncommented.  Whichever you see, try switching it by either adding or removing the '#' character.  Then try rebuilding MET, being sure to do "make clean" first.  And try rerunning the
test scripts.

If you're still experiencing this error after rebuilding, I'll need to get more details from you about the type of operating system and machine your using and the compiler types and versions.

Thanks,
John

Kefeng.Zhu-1 at ou.edu wrote:
> Hi:
> 
> I use the same bufr library as METv1.1. But the METv2.0 didn't work. I'm wondering what possible change in 'pb2nc' may cause such a problem. I have tried to build the pb2nc with and without the option '-DBLOCK4'. Both of them show the segmentation fault in the run time.
> 
> *** Running PB2NC on a PREPBUFR file ***
> Reading Config File:    config/PB2NCConfig_G212
> Creating NetCDF File:   ../out/pb2nc/sample_pb.nc
> Processing PrepBufr File:       ../data/sample_obs/prepbufr/ndas.t00z.prepbufr.tm12.20070401.nr
> Blocking PrepBufr file to:      .//pb2nc_8808_0_blk.pb
> ./test_pb2nc.sh: line 9:  8808 Segmentation fault      ../bin/pb2nc ../data/sample_obs/prepbufr/ndas.t00z.prepbufr.tm12.20070401.nr ../out/pb2nc/sample_pb.nc config/PB2NCConfig_G212 -v 2
> 
> Thanks!
> 
> Kefeng
> 
> 
> 
> 
> 
> 
> Kefeng.Zhu-1 at ou.edu
> 2009-04-24
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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