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

John Halley Gotway johnhg at rap.ucar.edu
Fri May 1 09:23:25 MDT 2009


Kefeng,

Sorry for not getting back to you sooner on this.  I wanted to check in with you to see how this is going.

If it's available on your machine, I'd suggest using the GNU gfortran compiler instead of g77.  You may have better luck with gfortran than g77.  When using gfortran, you'll need to uncomment the
"-lgfortran" compiler option in the top-level MET Makefile.  And you'd need to rebuild BUFRLIB with gfortran as well.

If using gfortran doesn't help, I'd suggest trying PGI with/without the -DBLOCK4 option.

Thanks,
John

Kefeng.Zhu-1 at ou.edu wrote:
> Hi, John:
> 
> I have tried with the option "-DBLOCK4" and without the option "-DBlOCK". Both of them show the segmentation fault. I have also tried built the program as 64 bit and 32 bit ( "-m32" option). Below is the size of pb2nc*.pb. The before is using 64 bit and the after is using 32 bit.
> -rw-------  1 kfzhu G-81589 6262040 Apr 28 08:38 pb2nc_11248_0_blk.pb ( 64 bit)
> -rw-------  1 kfzhu G-81589 6267448 Apr 28 08:46 pb2nc_14026_0_blk.pb ( 32 bit)
> 
> Also, I have tried built it with pgi, it still failed to the program as the previous version. But it do generate the pb2nc*.pb file, see below:
> 
> **************BUFR ARCHIVE LIBRARY ABORT*****************
>  BUFRLIB: OPENBF - ERROR READING INPUT FILE CONNECTED TO UNIT  11 WHEN CHECKING FOR 'BUFR' IN FIRST 4 BYTES OF RECORD            
>  **************BUFR ARCHIVE LIBRARY ABORT*****************
> 
> -rw-------  1 kfzhu G-81589 6267448 Apr 28 08:54 pb2nc_26729_0_blk.pb
> 
> I built the METv1.1 using the g++ and g77, and with the -m32 option. And using the cwordsh to process the prebufr file. And it can run smoothly. Here is the version of  the gnu: 
> 
> Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
> Thread model: posix
> gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)
> 
> Thanks!
> 
> Kefeng
> 
> 
> 
> 
> Kefeng.Zhu-1 at ou.edu
> 2009-04-28
> 
> 
> 
> 发件人: John Halley Gotway
> 发送时间: 2009-04-28 08:24:00
> 收件人: Zhu, Kefeng
> 抄送: met_help
> 主题: Re: [Met_help] pb2nc 'Segmentation fault' about the version 2
> 
> 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