[Met_help] [rt.rap.ucar.edu #72101] History for MET 5.0 - pb2nc segmentation fault

Julie Prestopnik via RT met_help at ucar.edu
Mon Jun 1 10:05:29 MDT 2015


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Hello MET helpers,

I am trying to install and run MET 5.0, following the online tutorial. After much difficulty I have managed to get BUFRLIB to compile on my system such that I can actually proceed through the MET configure and make install phases successfully.

However, when I do the make test, pb2nc gives a segmentation fault. Relevant text from the make_test.log is below, although it is not terribly helpful.

This may all stem from issues I had actually compiling BUFRLIB in the first place, but I cannot be sure. I found I had to remove the "-C" flags in addition to adding the suggested "-traditional-cpp" on the two cpp calls in the prepoc.sh script to compile BUFRLIB. This may have had a flow-on effect, but I could not compile BUFRLIB successfully with the "-C" flag in place. (GCC would add GNU headers to the .f files which gfortran didn't like as they were not commented out)

Any assistance would be appreciated as I am at a loss to resolve the seg fault (I have already tried setting my stacksize to unlimited).

NB I have used gcc (version 4.8.2), gfortran and g++ compilers (the same ones to compile both BUFRLIB and MET)

Many thanks,
Kay

-----------------------------------------------------------------------------   make_test.log excerpt ---------------------------------
*** Testing PB2NC application ***


*** Running PB2NC on a PREPBUFR file ***
DEBUG 1: Default Config File: /home/jbavm/WRF/met-5.0/share/met/config/PB2NCConfig_default
DEBUG 1: User Config File: config/PB2NCConfig_G212
DEBUG 1: Creating NetCDF File:                 ../out/pb2nc/sample_pb.nc
DEBUG 1: Processing PrepBufr File:         ../data/sample_obs/prepbufr/ndas.t00z.prepbufr.tm12.20070401.nr
DEBUG 1: Blocking PrepBufr file to:          /tmp/tmp_pb2nc_blk_53974_0
Segmentation fault (core dumped)

*** Testing PLOT_POINT_OBS application ***


*** Running PLOT_POINT_OBS on a sample netCDF observation file ***
DEBUG 2: Using default global grid.
DEBUG 1: Opening netCDF file: ../out/pb2nc/sample_pb.nc
ERROR  :
ERROR  : main() -> trouble opening netCDF file ../out/pb2nc/sample_pb.nc
ERROR  :
-------------------------------------------------------------------------------------------------------------------------------------------

JBA Consulting, South Barn Broughton Hall, Skipton, North Yorkshire, BD23 3AE. Telephone: +441756799919
WEM Framework Suppliers 2013-2017.  Visit our new website at www.jbaconsulting.com<http://www.jbaconsulting.com>.
The JBA Group supports the JBA Trust. Follow us on Twitter @JBAConsulting<http://twitter.com/JBAConsulting> This email is covered by the JBA Consulting email disclaimer<http://www.jbaconsulting.com/disclaimer>
JBA Consulting is the trading name of Jeremy Benn Associates Limited, registered in England, company number 03246693, South Barn, Broughton Hall, Skipton, North Yorkshire, BD23 3AE.


----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: MET 5.0 - pb2nc segmentation fault
From: John Halley Gotway
Time: Fri May 29 16:48:12 2015

Hello Kay,

Sorry to hear that you're having trouble compiling the MET software.
I
have a few questions for you to try to narrow things down.

(1) What version of the GNU compilers are you using?
   Type: g++ --version

(2) What version of BUFRLIB are you trying to compile?

(3) When you attempt to compile BUFRLIB using the following 3
commands,
what output do you get?

   *gcc -c -DUNDERSCORE *.c*
   *gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F*



*ar crv libbufr.a *.o *

Thanks,
John Halley Gotway
met_help at ucar.edu


On Thu, May 28, 2015 at 5:09 AM, Kay Shelton via RT
<met_help at ucar.edu>
wrote:

>
> Thu May 28 05:09:10 2015: Request 72101 was acted upon.
> Transaction: Ticket created by Kay.Shelton at jbaconsulting.com
>        Queue: met_help
>      Subject: MET 5.0 - pb2nc segmentation fault
>        Owner: Nobody
>   Requestors: Kay.Shelton at jbaconsulting.com
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=72101 >
>
>
> Hello MET helpers,
>
> I am trying to install and run MET 5.0, following the online
tutorial.
> After much difficulty I have managed to get BUFRLIB to compile on my
system
> such that I can actually proceed through the MET configure and make
install
> phases successfully.
>
> However, when I do the make test, pb2nc gives a segmentation fault.
> Relevant text from the make_test.log is below, although it is not
terribly
> helpful.
>
> This may all stem from issues I had actually compiling BUFRLIB in
the
> first place, but I cannot be sure. I found I had to remove the "-C"
flags
> in addition to adding the suggested "-traditional-cpp" on the two
cpp calls
> in the prepoc.sh script to compile BUFRLIB. This may have had a
flow-on
> effect, but I could not compile BUFRLIB successfully with the "-C"
flag in
> place. (GCC would add GNU headers to the .f files which gfortran
didn't
> like as they were not commented out)
>
> Any assistance would be appreciated as I am at a loss to resolve the
seg
> fault (I have already tried setting my stacksize to unlimited).
>
> NB I have used gcc (version 4.8.2), gfortran and g++ compilers (the
same
> ones to compile both BUFRLIB and MET)
>
> Many thanks,
> Kay
>
>
-----------------------------------------------------------------------------
>  make_test.log excerpt ---------------------------------
> *** Testing PB2NC application ***
>
>
> *** Running PB2NC on a PREPBUFR file ***
> DEBUG 1: Default Config File:
> /home/jbavm/WRF/met-5.0/share/met/config/PB2NCConfig_default
> DEBUG 1: User Config File: config/PB2NCConfig_G212
> DEBUG 1: Creating NetCDF File:
../out/pb2nc/sample_pb.nc
> DEBUG 1: Processing PrepBufr File:
../data/sample_obs/prepbufr/
> ndas.t00z.prepbufr.tm12.20070401.nr
> DEBUG 1: Blocking PrepBufr file to:
/tmp/tmp_pb2nc_blk_53974_0
> Segmentation fault (core dumped)
>
> *** Testing PLOT_POINT_OBS application ***
>
>
> *** Running PLOT_POINT_OBS on a sample netCDF observation file ***
> DEBUG 2: Using default global grid.
> DEBUG 1: Opening netCDF file: ../out/pb2nc/sample_pb.nc
> ERROR  :
> ERROR  : main() -> trouble opening netCDF file
../out/pb2nc/sample_pb.nc
> ERROR  :
>
>
-------------------------------------------------------------------------------------------------------------------------------------------
>
> JBA Consulting, South Barn Broughton Hall, Skipton, North Yorkshire,
BD23
> 3AE. Telephone: +441756799919
> WEM Framework Suppliers 2013-2017.  Visit our new website at
> www.jbaconsulting.com<http://www.jbaconsulting.com>.
> The JBA Group supports the JBA Trust. Follow us on Twitter
@JBAConsulting<
> http://twitter.com/JBAConsulting> This email is covered by the JBA
> Consulting email disclaimer<http://www.jbaconsulting.com/disclaimer>
> JBA Consulting is the trading name of Jeremy Benn Associates
Limited,
> registered in England, company number 03246693, South Barn,
Broughton Hall,
> Skipton, North Yorkshire, BD23 3AE.
>
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #72101] MET 5.0 - pb2nc segmentation fault
From: Kay Shelton
Time: Mon Jun 01 09:46:21 2015

Hi John,

I have solved my problem, but for completeness I will address your
questions and add my solution.

(1) What version of the GNU compilers are you using?
   Type: g++ --version

(2) What version of BUFRLIB are you trying to compile?

(3) When you attempt to compile BUFRLIB using the following 3
commands,
what output do you get?

   *gcc -c -DUNDERSCORE *.c*
   *gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F*

1) version 4.8.2 (these are the standard ones for me for Ubuntu 14.04
LTS)
2) version 11.0.0
3) If I use those commands, I get a lot of errors for both the gcc and
gfortran commands.

To avoid the errors when compiling BUFRLIB, I followed the advice in
the README_BUFRLIB file regarding adding the -traditional-cpp flag
added to the cpp calls in preproc.sh, executing the gcc command with
the -DUNDERSCORE flag and with `./prepoc.sh`, and then executing the
gfortran command with the flags -DUNDERSCORE and -fno-second-
underscore, and with specific file names given as in the
README_BUFRLIB.

I discovered that in order to execute the gcc command to allow the
gfortran command to run successfully when using GCC version 4.8.2, I
also had to add another flag to the cpp calls in preproc.sh to prevent
C syntax headers being added to the generated .f files. This flag is
-ffreestanding. (Hat tip to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65387). Something along
these lines will possibly be needed for anyone running GCC v4.8+, as
the addition of the C headers are the (new) default behaviour.

Once I compiled BUFRLIB with these options, and set my stacksize to
unlimited, I could install METv5.0 and run the tests successfully.

Thanks for your response, and very glad I got that sorted out.

Kay

________________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Friday, May 29, 2015 11:48 PM
To: Kay Shelton
Subject: Re: [rt.rap.ucar.edu #72101] MET 5.0 - pb2nc segmentation
fault

Hello Kay,

Sorry to hear that you're having trouble compiling the MET software.
I
have a few questions for you to try to narrow things down.

(1) What version of the GNU compilers are you using?
   Type: g++ --version

(2) What version of BUFRLIB are you trying to compile?

(3) When you attempt to compile BUFRLIB using the following 3
commands,
what output do you get?

   *gcc -c -DUNDERSCORE *.c*
   *gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F*



*ar crv libbufr.a *.o *

Thanks,
John Halley Gotway
met_help at ucar.edu


On Thu, May 28, 2015 at 5:09 AM, Kay Shelton via RT
<met_help at ucar.edu>
wrote:

>
> Thu May 28 05:09:10 2015: Request 72101 was acted upon.
> Transaction: Ticket created by Kay.Shelton at jbaconsulting.com
>        Queue: met_help
>      Subject: MET 5.0 - pb2nc segmentation fault
>        Owner: Nobody
>   Requestors: Kay.Shelton at jbaconsulting.com
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=72101 >
>
>
> Hello MET helpers,
>
> I am trying to install and run MET 5.0, following the online
tutorial.
> After much difficulty I have managed to get BUFRLIB to compile on my
system
> such that I can actually proceed through the MET configure and make
install
> phases successfully.
>
> However, when I do the make test, pb2nc gives a segmentation fault.
> Relevant text from the make_test.log is below, although it is not
terribly
> helpful.
>
> This may all stem from issues I had actually compiling BUFRLIB in
the
> first place, but I cannot be sure. I found I had to remove the "-C"
flags
> in addition to adding the suggested "-traditional-cpp" on the two
cpp calls
> in the prepoc.sh script to compile BUFRLIB. This may have had a
flow-on
> effect, but I could not compile BUFRLIB successfully with the "-C"
flag in
> place. (GCC would add GNU headers to the .f files which gfortran
didn't
> like as they were not commented out)
>
> Any assistance would be appreciated as I am at a loss to resolve the
seg
> fault (I have already tried setting my stacksize to unlimited).
>
> NB I have used gcc (version 4.8.2), gfortran and g++ compilers (the
same
> ones to compile both BUFRLIB and MET)
>
> Many thanks,
> Kay
>
>
-----------------------------------------------------------------------------
>  make_test.log excerpt ---------------------------------
> *** Testing PB2NC application ***
>
>
> *** Running PB2NC on a PREPBUFR file ***
> DEBUG 1: Default Config File:
> /home/jbavm/WRF/met-5.0/share/met/config/PB2NCConfig_default
> DEBUG 1: User Config File: config/PB2NCConfig_G212
> DEBUG 1: Creating NetCDF File:
../out/pb2nc/sample_pb.nc
> DEBUG 1: Processing PrepBufr File:
../data/sample_obs/prepbufr/
> ndas.t00z.prepbufr.tm12.20070401.nr
> DEBUG 1: Blocking PrepBufr file to:
/tmp/tmp_pb2nc_blk_53974_0
> Segmentation fault (core dumped)
>
> *** Testing PLOT_POINT_OBS application ***
>
>
> *** Running PLOT_POINT_OBS on a sample netCDF observation file ***
> DEBUG 2: Using default global grid.
> DEBUG 1: Opening netCDF file: ../out/pb2nc/sample_pb.nc
> ERROR  :
> ERROR  : main() -> trouble opening netCDF file
../out/pb2nc/sample_pb.nc
> ERROR  :
>
>
-------------------------------------------------------------------------------------------------------------------------------------------
>
> JBA Consulting, South Barn Broughton Hall, Skipton, North Yorkshire,
BD23
> 3AE. Telephone: +441756799919
> WEM Framework Suppliers 2013-2017.  Visit our new website at
> www.jbaconsulting.com<http://www.jbaconsulting.com>.
> The JBA Group supports the JBA Trust. Follow us on Twitter
@JBAConsulting<
> http://twitter.com/JBAConsulting> This email is covered by the JBA
> Consulting email disclaimer<http://www.jbaconsulting.com/disclaimer>
> JBA Consulting is the trading name of Jeremy Benn Associates
Limited,
> registered in England, company number 03246693, South Barn,
Broughton Hall,
> Skipton, North Yorkshire, BD23 3AE.
>
>


------------------------------------------------
Subject: MET 5.0 - pb2nc segmentation fault
From: Julie Prestopnik
Time: Mon Jun 01 10:05:24 2015

Hi Kay.

John is out today.  I'm so glad to hear that you solved your problem.
Thank you for responding to his questions and for telling us about
your
solution.  We always appreciate the feedback so that we can help
others who
may encounter the same problem.

Please let us know if you have any other questions.

Thanks,
Julie

On Mon, Jun 1, 2015 at 9:46 AM, Kay Shelton via RT <met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=72101 >
>
> Hi John,
>
> I have solved my problem, but for completeness I will address your
> questions and add my solution.
>
> (1) What version of the GNU compilers are you using?
>    Type: g++ --version
>
> (2) What version of BUFRLIB are you trying to compile?
>
> (3) When you attempt to compile BUFRLIB using the following 3
commands,
> what output do you get?
>
>    *gcc -c -DUNDERSCORE *.c*
>    *gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F*
>
> 1) version 4.8.2 (these are the standard ones for me for Ubuntu
14.04 LTS)
> 2) version 11.0.0
> 3) If I use those commands, I get a lot of errors for both the gcc
and
> gfortran commands.
>
> To avoid the errors when compiling BUFRLIB, I followed the advice in
the
> README_BUFRLIB file regarding adding the -traditional-cpp flag added
to the
> cpp calls in preproc.sh, executing the gcc command with the
-DUNDERSCORE
> flag and with `./prepoc.sh`, and then executing the gfortran command
with
> the flags -DUNDERSCORE and -fno-second-underscore, and with specific
file
> names given as in the README_BUFRLIB.
>
> I discovered that in order to execute the gcc command to allow the
> gfortran command to run successfully when using GCC version 4.8.2, I
also
> had to add another flag to the cpp calls in preproc.sh to prevent C
syntax
> headers being added to the generated .f files. This flag is
-ffreestanding.
> (Hat tip to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65387).
> Something along these lines will possibly be needed for anyone
running GCC
> v4.8+, as the addition of the C headers are the (new) default
behaviour.
>
> Once I compiled BUFRLIB with these options, and set my stacksize to
> unlimited, I could install METv5.0 and run the tests successfully.
>
> Thanks for your response, and very glad I got that sorted out.
>
> Kay
>
> ________________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Friday, May 29, 2015 11:48 PM
> To: Kay Shelton
> Subject: Re: [rt.rap.ucar.edu #72101] MET 5.0 - pb2nc segmentation
fault
>
> Hello Kay,
>
> Sorry to hear that you're having trouble compiling the MET software.
I
> have a few questions for you to try to narrow things down.
>
> (1) What version of the GNU compilers are you using?
>    Type: g++ --version
>
> (2) What version of BUFRLIB are you trying to compile?
>
> (3) When you attempt to compile BUFRLIB using the following 3
commands,
> what output do you get?
>
>    *gcc -c -DUNDERSCORE *.c*
>    *gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F*
>
>
>
> *ar crv libbufr.a *.o *
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>
> On Thu, May 28, 2015 at 5:09 AM, Kay Shelton via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > Thu May 28 05:09:10 2015: Request 72101 was acted upon.
> > Transaction: Ticket created by Kay.Shelton at jbaconsulting.com
> >        Queue: met_help
> >      Subject: MET 5.0 - pb2nc segmentation fault
> >        Owner: Nobody
> >   Requestors: Kay.Shelton at jbaconsulting.com
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=72101 >
> >
> >
> > Hello MET helpers,
> >
> > I am trying to install and run MET 5.0, following the online
tutorial.
> > After much difficulty I have managed to get BUFRLIB to compile on
my
> system
> > such that I can actually proceed through the MET configure and
make
> install
> > phases successfully.
> >
> > However, when I do the make test, pb2nc gives a segmentation
fault.
> > Relevant text from the make_test.log is below, although it is not
> terribly
> > helpful.
> >
> > This may all stem from issues I had actually compiling BUFRLIB in
the
> > first place, but I cannot be sure. I found I had to remove the "-
C" flags
> > in addition to adding the suggested "-traditional-cpp" on the two
cpp
> calls
> > in the prepoc.sh script to compile BUFRLIB. This may have had a
flow-on
> > effect, but I could not compile BUFRLIB successfully with the "-C"
flag
> in
> > place. (GCC would add GNU headers to the .f files which gfortran
didn't
> > like as they were not commented out)
> >
> > Any assistance would be appreciated as I am at a loss to resolve
the seg
> > fault (I have already tried setting my stacksize to unlimited).
> >
> > NB I have used gcc (version 4.8.2), gfortran and g++ compilers
(the same
> > ones to compile both BUFRLIB and MET)
> >
> > Many thanks,
> > Kay
> >
> >
>
-----------------------------------------------------------------------------
> >  make_test.log excerpt ---------------------------------
> > *** Testing PB2NC application ***
> >
> >
> > *** Running PB2NC on a PREPBUFR file ***
> > DEBUG 1: Default Config File:
> > /home/jbavm/WRF/met-5.0/share/met/config/PB2NCConfig_default
> > DEBUG 1: User Config File: config/PB2NCConfig_G212
> > DEBUG 1: Creating NetCDF File:
../out/pb2nc/sample_pb.nc
> > DEBUG 1: Processing PrepBufr File:
../data/sample_obs/prepbufr/
> > ndas.t00z.prepbufr.tm12.20070401.nr
> > DEBUG 1: Blocking PrepBufr file to:
/tmp/tmp_pb2nc_blk_53974_0
> > Segmentation fault (core dumped)
> >
> > *** Testing PLOT_POINT_OBS application ***
> >
> >
> > *** Running PLOT_POINT_OBS on a sample netCDF observation file ***
> > DEBUG 2: Using default global grid.
> > DEBUG 1: Opening netCDF file: ../out/pb2nc/sample_pb.nc
> > ERROR  :
> > ERROR  : main() -> trouble opening netCDF file
../out/pb2nc/sample_pb.nc
> > ERROR  :
> >
> >
>
-------------------------------------------------------------------------------------------------------------------------------------------
> >
> > JBA Consulting, South Barn Broughton Hall, Skipton, North
Yorkshire, BD23
> > 3AE. Telephone: +441756799919
> > WEM Framework Suppliers 2013-2017.  Visit our new website at
> > www.jbaconsulting.com<http://www.jbaconsulting.com>.
> > The JBA Group supports the JBA Trust. Follow us on Twitter
> @JBAConsulting<
> > http://twitter.com/JBAConsulting> This email is covered by the JBA
> > Consulting email
disclaimer<http://www.jbaconsulting.com/disclaimer>
> > JBA Consulting is the trading name of Jeremy Benn Associates
Limited,
> > registered in England, company number 03246693, South Barn,
Broughton
> Hall,
> > Skipton, North Yorkshire, BD23 3AE.
> >
> >
>
>
>


--
Julie Prestopnik
National Center for Atmospheric Research
Research Applications Laboratory
Phone: 303.497.8399
Email: jpresto at ucar.edu

------------------------------------------------


More information about the Met_help mailing list