[Met_help] [rt.rap.ucar.edu #80492] History for MET compile problem on mac

John Halley Gotway via RT met_help at ucar.edu
Tue May 23 11:18:06 MDT 2017


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

Hello,

I’m taking my first shot at installing METv6.0 on my Mac, but am running into a problem in the compile process.  I’m using gfortran/gcc/g++ obtained through Macports.  There’s clearly some issue with linking in the netcdf library…I’m usually fairly adept at diagnosing similar problems from experience with WRF, etc., but I don’t know any c++ so I’m going to need some help with this one. :)  I tried using both the Macports build of netcdf4 as well as a version I compiled myself, but got the same problems both ways.

I’ve attached here the compile logs, with the error messages at the end.  Let me know if there’s other information I can provide to help debug.  I did successfully compile it on a Linux system (and have also compiled previous versions on Mac) so there must be something with the combination of the Mac OS and netcdf4 that I’m not doing right.  Thanks in advance for any help you can provide!

Russ




--
Russ S. Schumacher
Associate Professor
Department of Atmospheric Science
Colorado State University
e-mail: russ.schumacher at colostate.edu
phone: 970.491.8084
web: http://www.atmos.colostate.edu/faculty/schumacher.php





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

Subject: MET compile problem on mac
From: Russ Schumacher
Time: Wed May 17 10:43:47 2017

Hello,

So, I decided to give it one more try with a completely clean compile
of all the netcdf libraries and MET v6.0, and the compile worked this
time!  I don’t think I did anything differently than before, but there
must have been something in the way I had previously compiled the
libraries.

On the downside, when I tried to test the MET binaries (with ‘make
test’), I received some kind of memory allocation error that I’m not
sure how to debug.   The error message is below (the first several
tests were fine, I’m just appending the one that failed, which is
MODE, which is one of the main things I’m hoping to use!)

*** Running MODE on APCP using netCDF input for both forecast and
observation ***
../src/tools/core/mode/mode \
        ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
        ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
        config/MODEConfig_APCP_12 \
        -outdir ../out/mode -v 2
DEBUG 1: Default Config File:
/Users/rschumac/research/ncar/netcdf_for_met/met-
6.0/share/met/config/MODEConfig_default
DEBUG 1: Match Config File: config/MODEConfig_APCP_12
DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
DEBUG 1: Forecast File:
../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc
DEBUG 1: Observation File:
../out/pcp_combine/sample_obs_2005080712V_12A.nc
DEBUG 1: Forecast Field: APCP_12 at A12
DEBUG 1: Observation Field: APCP_12 at A12
DEBUG 2: Processing masking regions.
DEBUG 2: Identifying objects in the forecast and observation fields...
DEBUG 2: Computing contingency table statistics...
DEBUG 2: Identified: 7 forecast objects and 4 observation objects.
DEBUG 2: Performing merging (THRESH) in the forecast field.
DEBUG 2: Performing merging (THRESH) in the observation field.
DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
observation fields.
mode(72850,0x7fffce88f3c0) malloc: *** error for object
0x4045c4c087798ede: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
make[1]: Leaving directory
'/Users/rschumac/research/ncar/netcdf_for_met/met-6.0/scripts'
make: *** [Makefile:843: test] Error 2

Any suggestions on this one would be much appreciated.  Thanks!

Russ



> On May 16, 2017, at 9:29 PM, met_help at ucar.edu via RT
<met_help at ucar.edu> wrote:
>
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
> 	"MET compile problem on mac",
> a summary of which appears below.
>
> There is no need to reply to this message right now.  Your ticket
has been
> assigned an ID of [rt.rap.ucar.edu #80492].
>
> Please include the string:
>
>         [rt.rap.ucar.edu #80492]
>
> in the subject line of all future correspondence about this issue.
To do so,
> you may reply to this message.
>
>                        Thank you,
>                        met_help at ucar.edu
>
>
-------------------------------------------------------------------------
> Hello,
>
> I’m taking my first shot at installing METv6.0 on my Mac, but am
running into a problem in the compile process.  I’m using
gfortran/gcc/g++ obtained through Macports.  There’s clearly some
issue with linking in the netcdf library…I’m usually fairly adept at
diagnosing similar problems from experience with WRF, etc., but I
don’t know any c++ so I’m going to need some help with this one. :)  I
tried using both the Macports build of netcdf4 as well as a version I
compiled myself, but got the same problems both ways.
>
> I’ve attached here the compile logs, with the error messages at the
end.  Let me know if there’s other information I can provide to help
debug.  I did successfully compile it on a Linux system (and have also
compiled previous versions on Mac) so there must be something with the
combination of the Mac OS and netcdf4 that I’m not doing right.
Thanks in advance for any help you can provide!
>
> Russ
>
>
>
>
> --
> Russ S. Schumacher
> Associate Professor
> Department of Atmospheric Science
> Colorado State University
> e-mail: russ.schumacher at colostate.edu
> phone: 970.491.8084
> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>
>
>
>



--
Russ S. Schumacher
Associate Professor
Department of Atmospheric Science
Colorado State University
e-mail: russ.schumacher at colostate.edu
phone: 970.491.8084
web: http://www.atmos.colostate.edu/faculty/schumacher.php







------------------------------------------------
Subject: MET compile problem on mac
From: John Halley Gotway
Time: Wed May 17 11:29:48 2017

Hi Russ,

I'm glad you were able to make progress on the compilation.  I also
have a
Mac on which I compiled met-6.0.  And I'm able to run "make test" with
no
errors, including MODE.  So at least we know that success is possible.

Before we dive in to the details, let me mention another option.  We
gave a
tutorial on MET at NCEP a few weeks ago and for that tutorial, we
prepared
a pre-compiled version of MET in a docker container.  A container is
basically a little virtual machine that's is built once and can easily
be
installed elsewhere.  The caveat is that you'd need administrator
privileges to install "docker" on your machine.

Here's a link to the instructions we provided for installing the pre-
built
met-6.0 docker image for the tutorial.  Just scroll to the bottom of
this
page:

http://www.dtcenter.org/met/users/support/online_tutorial/ncwcp_201704.php

We designed this as a quick and easy way to get up and running with
the MET
online tutorial.  But how you actually use the docker container to do
your
verification tasks requires some thought.

Please let me know which direction you'd like to go.  If you want to
get
met-6.0 compiled as you compiled previous versions, that's fine.  I
can
send you details on how I configured/compiled NetCDF.

Thanks,
John Halley Gotway





On Wed, May 17, 2017 at 10:43 AM, Russ Schumacher via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>
> Hello,
>
> So, I decided to give it one more try with a completely clean
compile of
> all the netcdf libraries and MET v6.0, and the compile worked this
time!  I
> don’t think I did anything differently than before, but there must
have
> been something in the way I had previously compiled the libraries.
>
> On the downside, when I tried to test the MET binaries (with ‘make
test’),
> I received some kind of memory allocation error that I’m not sure
how to
> debug.   The error message is below (the first several tests were
fine, I’m
> just appending the one that failed, which is MODE, which is one of
the main
> things I’m hoping to use!)
>
> *** Running MODE on APCP using netCDF input for both forecast and
> observation ***
> ../src/tools/core/mode/mode \
>         ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
>         ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
>         config/MODEConfig_APCP_12 \
>         -outdir ../out/mode -v 2
> DEBUG 1: Default Config File: /Users/rschumac/research/ncar/
> netcdf_for_met/met-6.0/share/met/config/MODEConfig_default
> DEBUG 1: Match Config File: config/MODEConfig_APCP_12
> DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
> DEBUG 1: Forecast File: ../out/pcp_combine/sample_
> fcst_12L_2005080712V_12A.nc
> DEBUG 1: Observation File: ../out/pcp_combine/sample_obs_
> 2005080712V_12A.nc
> DEBUG 1: Forecast Field: APCP_12 at A12
> DEBUG 1: Observation Field: APCP_12 at A12
> DEBUG 2: Processing masking regions.
> DEBUG 2: Identifying objects in the forecast and observation
fields...
> DEBUG 2: Computing contingency table statistics...
> DEBUG 2: Identified: 7 forecast objects and 4 observation objects.
> DEBUG 2: Performing merging (THRESH) in the forecast field.
> DEBUG 2: Performing merging (THRESH) in the observation field.
> DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
> DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
> observation fields.
> mode(72850,0x7fffce88f3c0) malloc: *** error for object
> 0x4045c4c087798ede: pointer being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
> make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
> make[1]: Leaving directory '/Users/rschumac/research/
> ncar/netcdf_for_met/met-6.0/scripts'
> make: *** [Makefile:843: test] Error 2
>
> Any suggestions on this one would be much appreciated.  Thanks!
>
> Russ
>
>
>
> > On May 16, 2017, at 9:29 PM, met_help at ucar.edu via RT
<met_help at ucar.edu>
> wrote:
> >
> > Greetings,
> >
> > This message has been automatically generated in response to the
> > creation of a trouble ticket regarding:
> >       "MET compile problem on mac",
> > a summary of which appears below.
> >
> > There is no need to reply to this message right now.  Your ticket
has
> been
> > assigned an ID of [rt.rap.ucar.edu #80492].
> >
> > Please include the string:
> >
> >         [rt.rap.ucar.edu #80492]
> >
> > in the subject line of all future correspondence about this issue.
To do
> so,
> > you may reply to this message.
> >
> >                        Thank you,
> >                        met_help at ucar.edu
> >
> > ------------------------------------------------------------
> -------------
> > Hello,
> >
> > I’m taking my first shot at installing METv6.0 on my Mac, but am
running
> into a problem in the compile process.  I’m using gfortran/gcc/g++
obtained
> through Macports.  There’s clearly some issue with linking in the
netcdf
> library…I’m usually fairly adept at diagnosing similar problems from
> experience with WRF, etc., but I don’t know any c++ so I’m going to
need
> some help with this one. :)  I tried using both the Macports build
of
> netcdf4 as well as a version I compiled myself, but got the same
problems
> both ways.
> >
> > I’ve attached here the compile logs, with the error messages at
the
> end.  Let me know if there’s other information I can provide to help
> debug.  I did successfully compile it on a Linux system (and have
also
> compiled previous versions on Mac) so there must be something with
the
> combination of the Mac OS and netcdf4 that I’m not doing right.
Thanks in
> advance for any help you can provide!
> >
> > Russ
> >
> >
> >
> >
> > --
> > Russ S. Schumacher
> > Associate Professor
> > Department of Atmospheric Science
> > Colorado State University
> > e-mail: russ.schumacher at colostate.edu
> > phone: 970.491.8084
> > web: http://www.atmos.colostate.edu/faculty/schumacher.php
> >
> >
> >
> >
>
>
>
> --
> Russ S. Schumacher
> Associate Professor
> Department of Atmospheric Science
> Colorado State University
> e-mail: russ.schumacher at colostate.edu
> phone: 970.491.8084
> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>
>
>
>
>
>
>
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #80492] AutoReply: MET compile problem on mac
From: Russ Schumacher
Time: Wed May 17 12:02:21 2017

Thanks, John!

I actually do have Docker installed and have played with it a little
bit (I’m part of the Big Weather Web group so we’ve been introduced to
the WRF-docker effort as well), but I’m still not totally comfortable
with all of the ins and outs of using it.  I had actually installed
the MET container when I was trying it out so I also have that
running.

So I guess I'm interested in both methods. :)  I have lots of existing
scripts that it’d probably be easier to continue using the ‘normal’
version of MET with (just with V6.0 mainly for the speed upgrades,
etc.).  But I’m definitely interested in learning more about how to
use Docker, especially how to automate aspects of it.  I was able to
do the tutorial exercises but haven’t made it beyond that.

So in the short term if we can figure out a (relatively) easy fix to
get everything working locally with the new version, that’d be great,
but I may get in touch with more Docker-related questions in the
future!

Russ




> On May 17, 2017, at 11:29 AM, John Halley Gotway via RT
<met_help at ucar.edu> wrote:
>
> Hi Russ,
>
> I'm glad you were able to make progress on the compilation.  I also
have a
> Mac on which I compiled met-6.0.  And I'm able to run "make test"
with no
> errors, including MODE.  So at least we know that success is
possible.
>
> Before we dive in to the details, let me mention another option.  We
gave a
> tutorial on MET at NCEP a few weeks ago and for that tutorial, we
prepared
> a pre-compiled version of MET in a docker container.  A container is
> basically a little virtual machine that's is built once and can
easily be
> installed elsewhere.  The caveat is that you'd need administrator
> privileges to install "docker" on your machine.
>
> Here's a link to the instructions we provided for installing the
pre-built
> met-6.0 docker image for the tutorial.  Just scroll to the bottom of
this
> page:
>
>
http://www.dtcenter.org/met/users/support/online_tutorial/ncwcp_201704.php
>
> We designed this as a quick and easy way to get up and running with
the MET
> online tutorial.  But how you actually use the docker container to
do your
> verification tasks requires some thought.
>
> Please let me know which direction you'd like to go.  If you want to
get
> met-6.0 compiled as you compiled previous versions, that's fine.  I
can
> send you details on how I configured/compiled NetCDF.
>
> Thanks,
> John Halley Gotway
>
>
>
>
>
> On Wed, May 17, 2017 at 10:43 AM, Russ Schumacher via RT
<met_help at ucar.edu>
> wrote:
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>>
>> Hello,
>>
>> So, I decided to give it one more try with a completely clean
compile of
>> all the netcdf libraries and MET v6.0, and the compile worked this
time!  I
>> don’t think I did anything differently than before, but there must
have
>> been something in the way I had previously compiled the libraries.
>>
>> On the downside, when I tried to test the MET binaries (with ‘make
test’),
>> I received some kind of memory allocation error that I’m not sure
how to
>> debug.   The error message is below (the first several tests were
fine, I’m
>> just appending the one that failed, which is MODE, which is one of
the main
>> things I’m hoping to use!)
>>
>> *** Running MODE on APCP using netCDF input for both forecast and
>> observation ***
>> ../src/tools/core/mode/mode \
>>        ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
>>        ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
>>        config/MODEConfig_APCP_12 \
>>        -outdir ../out/mode -v 2
>> DEBUG 1: Default Config File: /Users/rschumac/research/ncar/
>> netcdf_for_met/met-6.0/share/met/config/MODEConfig_default
>> DEBUG 1: Match Config File: config/MODEConfig_APCP_12
>> DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
>> DEBUG 1: Forecast File: ../out/pcp_combine/sample_
>> fcst_12L_2005080712V_12A.nc
>> DEBUG 1: Observation File: ../out/pcp_combine/sample_obs_
>> 2005080712V_12A.nc
>> DEBUG 1: Forecast Field: APCP_12 at A12
>> DEBUG 1: Observation Field: APCP_12 at A12
>> DEBUG 2: Processing masking regions.
>> DEBUG 2: Identifying objects in the forecast and observation
fields...
>> DEBUG 2: Computing contingency table statistics...
>> DEBUG 2: Identified: 7 forecast objects and 4 observation objects.
>> DEBUG 2: Performing merging (THRESH) in the forecast field.
>> DEBUG 2: Performing merging (THRESH) in the observation field.
>> DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
>> DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
>> observation fields.
>> mode(72850,0x7fffce88f3c0) malloc: *** error for object
>> 0x4045c4c087798ede: pointer being freed was not allocated
>> *** set a breakpoint in malloc_error_break to debug
>> make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
>> make[1]: Leaving directory '/Users/rschumac/research/
>> ncar/netcdf_for_met/met-6.0/scripts'
>> make: *** [Makefile:843: test] Error 2
>>
>> Any suggestions on this one would be much appreciated.  Thanks!
>>
>> Russ
>>
>>
>>
>>> On May 16, 2017, at 9:29 PM, met_help at ucar.edu via RT
<met_help at ucar.edu>
>> wrote:
>>>
>>> Greetings,
>>>
>>> This message has been automatically generated in response to the
>>> creation of a trouble ticket regarding:
>>>      "MET compile problem on mac",
>>> a summary of which appears below.
>>>
>>> There is no need to reply to this message right now.  Your ticket
has
>> been
>>> assigned an ID of [rt.rap.ucar.edu #80492].
>>>
>>> Please include the string:
>>>
>>>        [rt.rap.ucar.edu #80492]
>>>
>>> in the subject line of all future correspondence about this issue.
To do
>> so,
>>> you may reply to this message.
>>>
>>>                       Thank you,
>>>                       met_help at ucar.edu
>>>
>>> ------------------------------------------------------------
>> -------------
>>> Hello,
>>>
>>> I’m taking my first shot at installing METv6.0 on my Mac, but am
running
>> into a problem in the compile process.  I’m using gfortran/gcc/g++
obtained
>> through Macports.  There’s clearly some issue with linking in the
netcdf
>> library…I’m usually fairly adept at diagnosing similar problems
from
>> experience with WRF, etc., but I don’t know any c++ so I’m going to
need
>> some help with this one. :)  I tried using both the Macports build
of
>> netcdf4 as well as a version I compiled myself, but got the same
problems
>> both ways.
>>>
>>> I’ve attached here the compile logs, with the error messages at
the
>> end.  Let me know if there’s other information I can provide to
help
>> debug.  I did successfully compile it on a Linux system (and have
also
>> compiled previous versions on Mac) so there must be something with
the
>> combination of the Mac OS and netcdf4 that I’m not doing right.
Thanks in
>> advance for any help you can provide!
>>>
>>> Russ
>>>
>>>
>>>
>>>
>>> --
>>> Russ S. Schumacher
>>> Associate Professor
>>> Department of Atmospheric Science
>>> Colorado State University
>>> e-mail: russ.schumacher at colostate.edu
>>> phone: 970.491.8084
>>> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Russ S. Schumacher
>> Associate Professor
>> Department of Atmospheric Science
>> Colorado State University
>> e-mail: russ.schumacher at colostate.edu
>> phone: 970.491.8084
>> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>>
>>
>>
>>
>>
>>
>>
>>
>



--
Russ S. Schumacher
Associate Professor
Department of Atmospheric Science
Colorado State University
e-mail: russ.schumacher at colostate.edu
phone: 970.491.8084
web: http://www.atmos.colostate.edu/faculty/schumacher.php








------------------------------------------------
Subject: MET compile problem on mac
From: John Halley Gotway
Time: Wed May 17 12:16:00 2017

Russ,

OK, sounds reasonable.  Could you please send me two files from you
top-level MET directory:
- config.log tells me about your system
- make_install.log (or where ever you wrote the output of make)

If you didn't save the make output to a file, please run:
   make clean
   make install test >& make_install_test.log

And then send me "make_install_test.log".

Thanks,
John

On Wed, May 17, 2017 at 12:02 PM, Russ Schumacher via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>
> Thanks, John!
>
> I actually do have Docker installed and have played with it a little
bit
> (I’m part of the Big Weather Web group so we’ve been introduced to
the
> WRF-docker effort as well), but I’m still not totally comfortable
with all
> of the ins and outs of using it.  I had actually installed the MET
> container when I was trying it out so I also have that running.
>
> So I guess I'm interested in both methods. :)  I have lots of
existing
> scripts that it’d probably be easier to continue using the ‘normal’
version
> of MET with (just with V6.0 mainly for the speed upgrades, etc.).
But I’m
> definitely interested in learning more about how to use Docker,
especially
> how to automate aspects of it.  I was able to do the tutorial
exercises but
> haven’t made it beyond that.
>
> So in the short term if we can figure out a (relatively) easy fix to
get
> everything working locally with the new version, that’d be great,
but I may
> get in touch with more Docker-related questions in the future!
>
> Russ
>
>
>
>
> > On May 17, 2017, at 11:29 AM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
> >
> > Hi Russ,
> >
> > I'm glad you were able to make progress on the compilation.  I
also have
> a
> > Mac on which I compiled met-6.0.  And I'm able to run "make test"
with no
> > errors, including MODE.  So at least we know that success is
possible.
> >
> > Before we dive in to the details, let me mention another option.
We
> gave a
> > tutorial on MET at NCEP a few weeks ago and for that tutorial, we
> prepared
> > a pre-compiled version of MET in a docker container.  A container
is
> > basically a little virtual machine that's is built once and can
easily be
> > installed elsewhere.  The caveat is that you'd need administrator
> > privileges to install "docker" on your machine.
> >
> > Here's a link to the instructions we provided for installing the
> pre-built
> > met-6.0 docker image for the tutorial.  Just scroll to the bottom
of this
> > page:
> >
> > http://www.dtcenter.org/met/users/support/online_tutorial/nc
> wcp_201704.php
> >
> > We designed this as a quick and easy way to get up and running
with the
> MET
> > online tutorial.  But how you actually use the docker container to
do
> your
> > verification tasks requires some thought.
> >
> > Please let me know which direction you'd like to go.  If you want
to get
> > met-6.0 compiled as you compiled previous versions, that's fine.
I can
> > send you details on how I configured/compiled NetCDF.
> >
> > Thanks,
> > John Halley Gotway
> >
> >
> >
> >
> >
> > On Wed, May 17, 2017 at 10:43 AM, Russ Schumacher via RT <
> met_help at ucar.edu>
> > wrote:
> >
> >>
> >> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
> >>
> >> Hello,
> >>
> >> So, I decided to give it one more try with a completely clean
compile of
> >> all the netcdf libraries and MET v6.0, and the compile worked
this
> time!  I
> >> don’t think I did anything differently than before, but there
must have
> >> been something in the way I had previously compiled the
libraries.
> >>
> >> On the downside, when I tried to test the MET binaries (with
‘make
> test’),
> >> I received some kind of memory allocation error that I’m not sure
how to
> >> debug.   The error message is below (the first several tests were
fine,
> I’m
> >> just appending the one that failed, which is MODE, which is one
of the
> main
> >> things I’m hoping to use!)
> >>
> >> *** Running MODE on APCP using netCDF input for both forecast and
> >> observation ***
> >> ../src/tools/core/mode/mode \
> >>        ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
> >>        ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
> >>        config/MODEConfig_APCP_12 \
> >>        -outdir ../out/mode -v 2
> >> DEBUG 1: Default Config File: /Users/rschumac/research/ncar/
> >> netcdf_for_met/met-6.0/share/met/config/MODEConfig_default
> >> DEBUG 1: Match Config File: config/MODEConfig_APCP_12
> >> DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
> >> DEBUG 1: Forecast File: ../out/pcp_combine/sample_
> >> fcst_12L_2005080712V_12A.nc
> >> DEBUG 1: Observation File: ../out/pcp_combine/sample_obs_
> >> 2005080712V_12A.nc
> >> DEBUG 1: Forecast Field: APCP_12 at A12
> >> DEBUG 1: Observation Field: APCP_12 at A12
> >> DEBUG 2: Processing masking regions.
> >> DEBUG 2: Identifying objects in the forecast and observation
fields...
> >> DEBUG 2: Computing contingency table statistics...
> >> DEBUG 2: Identified: 7 forecast objects and 4 observation
objects.
> >> DEBUG 2: Performing merging (THRESH) in the forecast field.
> >> DEBUG 2: Performing merging (THRESH) in the observation field.
> >> DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
> >> DEBUG 2: Performing matching (MERGE_BOTH) between the forecast
and
> >> observation fields.
> >> mode(72850,0x7fffce88f3c0) malloc: *** error for object
> >> 0x4045c4c087798ede: pointer being freed was not allocated
> >> *** set a breakpoint in malloc_error_break to debug
> >> make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
> >> make[1]: Leaving directory '/Users/rschumac/research/
> >> ncar/netcdf_for_met/met-6.0/scripts'
> >> make: *** [Makefile:843: test] Error 2
> >>
> >> Any suggestions on this one would be much appreciated.  Thanks!
> >>
> >> Russ
> >>
> >>
> >>
> >>> On May 16, 2017, at 9:29 PM, met_help at ucar.edu via RT <
> met_help at ucar.edu>
> >> wrote:
> >>>
> >>> Greetings,
> >>>
> >>> This message has been automatically generated in response to the
> >>> creation of a trouble ticket regarding:
> >>>      "MET compile problem on mac",
> >>> a summary of which appears below.
> >>>
> >>> There is no need to reply to this message right now.  Your
ticket has
> >> been
> >>> assigned an ID of [rt.rap.ucar.edu #80492].
> >>>
> >>> Please include the string:
> >>>
> >>>        [rt.rap.ucar.edu #80492]
> >>>
> >>> in the subject line of all future correspondence about this
issue. To
> do
> >> so,
> >>> you may reply to this message.
> >>>
> >>>                       Thank you,
> >>>                       met_help at ucar.edu
> >>>
> >>> ------------------------------------------------------------
> >> -------------
> >>> Hello,
> >>>
> >>> I’m taking my first shot at installing METv6.0 on my Mac, but am
> running
> >> into a problem in the compile process.  I’m using
gfortran/gcc/g++
> obtained
> >> through Macports.  There’s clearly some issue with linking in the
netcdf
> >> library…I’m usually fairly adept at diagnosing similar problems
from
> >> experience with WRF, etc., but I don’t know any c++ so I’m going
to need
> >> some help with this one. :)  I tried using both the Macports
build of
> >> netcdf4 as well as a version I compiled myself, but got the same
> problems
> >> both ways.
> >>>
> >>> I’ve attached here the compile logs, with the error messages at
the
> >> end.  Let me know if there’s other information I can provide to
help
> >> debug.  I did successfully compile it on a Linux system (and have
also
> >> compiled previous versions on Mac) so there must be something
with the
> >> combination of the Mac OS and netcdf4 that I’m not doing right.
Thanks
> in
> >> advance for any help you can provide!
> >>>
> >>> Russ
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Russ S. Schumacher
> >>> Associate Professor
> >>> Department of Atmospheric Science
> >>> Colorado State University
> >>> e-mail: russ.schumacher at colostate.edu
> >>> phone: 970.491.8084
> >>> web: http://www.atmos.colostate.edu/faculty/schumacher.php
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Russ S. Schumacher
> >> Associate Professor
> >> Department of Atmospheric Science
> >> Colorado State University
> >> e-mail: russ.schumacher at colostate.edu
> >> phone: 970.491.8084
> >> web: http://www.atmos.colostate.edu/faculty/schumacher.php
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
>
>
>
> --
> Russ S. Schumacher
> Associate Professor
> Department of Atmospheric Science
> Colorado State University
> e-mail: russ.schumacher at colostate.edu
> phone: 970.491.8084
> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>
>
>
>
>
>
>
>
>

------------------------------------------------
Subject: MET compile problem on mac
From: Russ Schumacher
Time: Wed May 17 12:18:27 2017

Here they are!

Russ


------------------------------------------------
Subject: MET compile problem on mac
From: Russ Schumacher
Time: Wed May 17 12:18:27 2017


> On May 17, 2017, at 12:16 PM, John Halley Gotway via RT
<met_help at ucar.edu> wrote:
>
> Russ,
>
> OK, sounds reasonable.  Could you please send me two files from you
> top-level MET directory:
> - config.log tells me about your system
> - make_install.log (or where ever you wrote the output of make)
>
> If you didn't save the make output to a file, please run:
>   make clean
>   make install test >& make_install_test.log
>
> And then send me "make_install_test.log".
>
> Thanks,
> John
>
> On Wed, May 17, 2017 at 12:02 PM, Russ Schumacher via RT
<met_help at ucar.edu>
> wrote:
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>>
>> Thanks, John!
>>
>> I actually do have Docker installed and have played with it a
little bit
>> (I’m part of the Big Weather Web group so we’ve been introduced to
the
>> WRF-docker effort as well), but I’m still not totally comfortable
with all
>> of the ins and outs of using it.  I had actually installed the MET
>> container when I was trying it out so I also have that running.
>>
>> So I guess I'm interested in both methods. :)  I have lots of
existing
>> scripts that it’d probably be easier to continue using the ‘normal’
version
>> of MET with (just with V6.0 mainly for the speed upgrades, etc.).
But I’m
>> definitely interested in learning more about how to use Docker,
especially
>> how to automate aspects of it.  I was able to do the tutorial
exercises but
>> haven’t made it beyond that.
>>
>> So in the short term if we can figure out a (relatively) easy fix
to get
>> everything working locally with the new version, that’d be great,
but I may
>> get in touch with more Docker-related questions in the future!
>>
>> Russ
>>
>>
>>
>>
>>> On May 17, 2017, at 11:29 AM, John Halley Gotway via RT <
>> met_help at ucar.edu> wrote:
>>>
>>> Hi Russ,
>>>
>>> I'm glad you were able to make progress on the compilation.  I
also have
>> a
>>> Mac on which I compiled met-6.0.  And I'm able to run "make test"
with no
>>> errors, including MODE.  So at least we know that success is
possible.
>>>
>>> Before we dive in to the details, let me mention another option.
We
>> gave a
>>> tutorial on MET at NCEP a few weeks ago and for that tutorial, we
>> prepared
>>> a pre-compiled version of MET in a docker container.  A container
is
>>> basically a little virtual machine that's is built once and can
easily be
>>> installed elsewhere.  The caveat is that you'd need administrator
>>> privileges to install "docker" on your machine.
>>>
>>> Here's a link to the instructions we provided for installing the
>> pre-built
>>> met-6.0 docker image for the tutorial.  Just scroll to the bottom
of this
>>> page:
>>>
>>> http://www.dtcenter.org/met/users/support/online_tutorial/nc
>> wcp_201704.php
>>>
>>> We designed this as a quick and easy way to get up and running
with the
>> MET
>>> online tutorial.  But how you actually use the docker container to
do
>> your
>>> verification tasks requires some thought.
>>>
>>> Please let me know which direction you'd like to go.  If you want
to get
>>> met-6.0 compiled as you compiled previous versions, that's fine.
I can
>>> send you details on how I configured/compiled NetCDF.
>>>
>>> Thanks,
>>> John Halley Gotway
>>>
>>>
>>>
>>>
>>>
>>> On Wed, May 17, 2017 at 10:43 AM, Russ Schumacher via RT <
>> met_help at ucar.edu>
>>> wrote:
>>>
>>>>
>>>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>>>>
>>>> Hello,
>>>>
>>>> So, I decided to give it one more try with a completely clean
compile of
>>>> all the netcdf libraries and MET v6.0, and the compile worked
this
>> time!  I
>>>> don’t think I did anything differently than before, but there
must have
>>>> been something in the way I had previously compiled the
libraries.
>>>>
>>>> On the downside, when I tried to test the MET binaries (with
‘make
>> test’),
>>>> I received some kind of memory allocation error that I’m not sure
how to
>>>> debug.   The error message is below (the first several tests were
fine,
>> I’m
>>>> just appending the one that failed, which is MODE, which is one
of the
>> main
>>>> things I’m hoping to use!)
>>>>
>>>> *** Running MODE on APCP using netCDF input for both forecast and
>>>> observation ***
>>>> ../src/tools/core/mode/mode \
>>>>       ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
>>>>       ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
>>>>       config/MODEConfig_APCP_12 \
>>>>       -outdir ../out/mode -v 2
>>>> DEBUG 1: Default Config File: /Users/rschumac/research/ncar/
>>>> netcdf_for_met/met-6.0/share/met/config/MODEConfig_default
>>>> DEBUG 1: Match Config File: config/MODEConfig_APCP_12
>>>> DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
>>>> DEBUG 1: Forecast File: ../out/pcp_combine/sample_
>>>> fcst_12L_2005080712V_12A.nc
>>>> DEBUG 1: Observation File: ../out/pcp_combine/sample_obs_
>>>> 2005080712V_12A.nc
>>>> DEBUG 1: Forecast Field: APCP_12 at A12
>>>> DEBUG 1: Observation Field: APCP_12 at A12
>>>> DEBUG 2: Processing masking regions.
>>>> DEBUG 2: Identifying objects in the forecast and observation
fields...
>>>> DEBUG 2: Computing contingency table statistics...
>>>> DEBUG 2: Identified: 7 forecast objects and 4 observation
objects.
>>>> DEBUG 2: Performing merging (THRESH) in the forecast field.
>>>> DEBUG 2: Performing merging (THRESH) in the observation field.
>>>> DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
>>>> DEBUG 2: Performing matching (MERGE_BOTH) between the forecast
and
>>>> observation fields.
>>>> mode(72850,0x7fffce88f3c0) malloc: *** error for object
>>>> 0x4045c4c087798ede: pointer being freed was not allocated
>>>> *** set a breakpoint in malloc_error_break to debug
>>>> make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
>>>> make[1]: Leaving directory '/Users/rschumac/research/
>>>> ncar/netcdf_for_met/met-6.0/scripts'
>>>> make: *** [Makefile:843: test] Error 2
>>>>
>>>> Any suggestions on this one would be much appreciated.  Thanks!
>>>>
>>>> Russ
>>>>
>>>>
>>>>
>>>>> On May 16, 2017, at 9:29 PM, met_help at ucar.edu via RT <
>> met_help at ucar.edu>
>>>> wrote:
>>>>>
>>>>> Greetings,
>>>>>
>>>>> This message has been automatically generated in response to the
>>>>> creation of a trouble ticket regarding:
>>>>>     "MET compile problem on mac",
>>>>> a summary of which appears below.
>>>>>
>>>>> There is no need to reply to this message right now.  Your
ticket has
>>>> been
>>>>> assigned an ID of [rt.rap.ucar.edu #80492].
>>>>>
>>>>> Please include the string:
>>>>>
>>>>>       [rt.rap.ucar.edu #80492]
>>>>>
>>>>> in the subject line of all future correspondence about this
issue. To
>> do
>>>> so,
>>>>> you may reply to this message.
>>>>>
>>>>>                      Thank you,
>>>>>                      met_help at ucar.edu
>>>>>
>>>>> ------------------------------------------------------------
>>>> -------------
>>>>> Hello,
>>>>>
>>>>> I’m taking my first shot at installing METv6.0 on my Mac, but am
>> running
>>>> into a problem in the compile process.  I’m using
gfortran/gcc/g++
>> obtained
>>>> through Macports.  There’s clearly some issue with linking in the
netcdf
>>>> library…I’m usually fairly adept at diagnosing similar problems
from
>>>> experience with WRF, etc., but I don’t know any c++ so I’m going
to need
>>>> some help with this one. :)  I tried using both the Macports
build of
>>>> netcdf4 as well as a version I compiled myself, but got the same
>> problems
>>>> both ways.
>>>>>
>>>>> I’ve attached here the compile logs, with the error messages at
the
>>>> end.  Let me know if there’s other information I can provide to
help
>>>> debug.  I did successfully compile it on a Linux system (and have
also
>>>> compiled previous versions on Mac) so there must be something
with the
>>>> combination of the Mac OS and netcdf4 that I’m not doing right.
Thanks
>> in
>>>> advance for any help you can provide!
>>>>>
>>>>> Russ
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Russ S. Schumacher
>>>>> Associate Professor
>>>>> Department of Atmospheric Science
>>>>> Colorado State University
>>>>> e-mail: russ.schumacher at colostate.edu
>>>>> phone: 970.491.8084
>>>>> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Russ S. Schumacher
>>>> Associate Professor
>>>> Department of Atmospheric Science
>>>> Colorado State University
>>>> e-mail: russ.schumacher at colostate.edu
>>>> phone: 970.491.8084
>>>> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Russ S. Schumacher
>> Associate Professor
>> Department of Atmospheric Science
>> Colorado State University
>> e-mail: russ.schumacher at colostate.edu
>> phone: 970.491.8084
>> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>>
>>
>>
>>
>>
>>
>>
>>
>>
>



--
Russ S. Schumacher
Associate Professor
Department of Atmospheric Science
Colorado State University
e-mail: russ.schumacher at colostate.edu
phone: 970.491.8084
web: http://www.atmos.colostate.edu/faculty/schumacher.php







------------------------------------------------
Subject: MET compile problem on mac
From: John Halley Gotway
Time: Wed May 17 15:05:10 2017

Russ,

Randy Bullock and I thought for a while about this and ended up
profiling
this run of mode using valgrind.  Lo and behold, it uncovered some
real
issues.  The bad news is that we have a lot of minor issues to sift
through
prior to the next release of MET to harden up the code base!  But the
good
news is that found an obvious memory problem where mode is deleting
memory.  We're missing some square brackets on a few lines '[]' and
it's
not unreasonable to believe that this would be problematic with some
compilers but not others.

I have an updated version of the file named "mode_exec.cc" that I've
attached to this message.  Please use it to replace
"met-6.0/src/tools/core/mode/mode_exec.cc".  Then do a "make clean
install
test >& make_met.log".

Please let me know if this fixes the segfault you got from mode.  I'll
keep
my fingers crossed!

Thanks,
John


On Wed, May 17, 2017 at 12:18 PM, Russ Schumacher via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>
> Here they are!
>
> Russ
>
>
>

------------------------------------------------
Subject: MET compile problem on mac
From: Russ Schumacher
Time: Wed May 17 17:08:56 2017

Hi John,

Unfortunately I got the same error after applying this new code (error
messages below)…in the meantime though I got a successful compile and
test on another of our Linux machines that I can use just as easily.
I’m still interested in getting it installed on the Mac (and happy to
help you continue to debug!) but it’s not an urgent concern.  Thanks
for all the help!

Russ



*** Running MODE on APCP using netCDF input for both forecast and
observation ***
../src/tools/core/mode/mode \
        ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
        ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
        config/MODEConfig_APCP_12 \
        -outdir ../out/mode -v 2
DEBUG 1: Default Config File:
/Users/rschumac/research/ncar/netcdf_for_met/met-
6.0/share/met/config/MODEConfig_default
DEBUG 1: Match Config File: config/MODEConfig_APCP_12
DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
DEBUG 1: Forecast File:
../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc
DEBUG 1: Observation File:
../out/pcp_combine/sample_obs_2005080712V_12A.nc
DEBUG 1: Forecast Field: APCP_12 at A12
DEBUG 1: Observation Field: APCP_12 at A12
DEBUG 2: Processing masking regions.
DEBUG 2: Identifying objects in the forecast and observation fields...
DEBUG 2: Computing contingency table statistics...
DEBUG 2: Identified: 7 forecast objects and 4 observation objects.
DEBUG 2: Performing merging (THRESH) in the forecast field.
DEBUG 2: Performing merging (THRESH) in the observation field.
DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
observation fields.
mode(7444,0x7fffce88f3c0) malloc: *** error for object
0x4045c4c087798ede: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
make[1]: Leaving directory
'/Users/rschumac/research/ncar/netcdf_for_met/met-6.0/scripts'
make: *** [Makefile:843: test] Error 2



> On May 17, 2017, at 3:05 PM, John Halley Gotway via RT
<met_help at ucar.edu> wrote:
>
> Russ,
>
> Randy Bullock and I thought for a while about this and ended up
profiling
> this run of mode using valgrind.  Lo and behold, it uncovered some
real
> issues.  The bad news is that we have a lot of minor issues to sift
through
> prior to the next release of MET to harden up the code base!  But
the good
> news is that found an obvious memory problem where mode is deleting
> memory.  We're missing some square brackets on a few lines '[]' and
it's
> not unreasonable to believe that this would be problematic with some
> compilers but not others.
>
> I have an updated version of the file named "mode_exec.cc" that I've
> attached to this message.  Please use it to replace
> "met-6.0/src/tools/core/mode/mode_exec.cc".  Then do a "make clean
install
> test >& make_met.log".
>
> Please let me know if this fixes the segfault you got from mode.
I'll keep
> my fingers crossed!
>
> Thanks,
> John
>
>
> On Wed, May 17, 2017 at 12:18 PM, Russ Schumacher via RT
<met_help at ucar.edu>
> wrote:
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>>
>> Here they are!
>>
>> Russ
>>
>>
>>
>
> <mode_exec.cc>



--
Russ S. Schumacher
Associate Professor
Department of Atmospheric Science
Colorado State University
e-mail: russ.schumacher at colostate.edu
phone: 970.491.8084
web: http://www.atmos.colostate.edu/faculty/schumacher.php







------------------------------------------------
Subject: MET compile problem on mac
From: John Halley Gotway
Time: Thu May 18 07:28:11 2017

Russ,

Ok, thanks for letting me know.  Too bad that didn't do the trick.

But I'm glad you got it working elsewhere.  I did see somewhat
somewhat
similar behavior, specifically from mode, on another user's Linux
build.
One compiler version led to an error while another version did not.

I'm glad to have a way forward at least.  We'll use valgrind to search
for
and resolve memory issues prior to the next release.  Once we're
finished
we'all send you a pre-release tarball and ask you to test on your Mac.
I'll create a development ticket in our tracking system to make sure
we
remember to do that.

Thanks,
John


On Wed, May 17, 2017 at 5:08 PM Russ Schumacher via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>
> Hi John,
>
> Unfortunately I got the same error after applying this new code
(error
> messages below)…in the meantime though I got a successful compile
and test
> on another of our Linux machines that I can use just as easily. I’m
still
> interested in getting it installed on the Mac (and happy to help you
> continue to debug!) but it’s not an urgent concern.  Thanks for all
the
> help!
>
> Russ
>
>
>
> *** Running MODE on APCP using netCDF input for both forecast and
> observation ***
> ../src/tools/core/mode/mode \
>         ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
>         ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
>         config/MODEConfig_APCP_12 \
>         -outdir ../out/mode -v 2
> DEBUG 1: Default Config File:
> /Users/rschumac/research/ncar/netcdf_for_met/met-
6.0/share/met/config/MODEConfig_default
> DEBUG 1: Match Config File: config/MODEConfig_APCP_12
> DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
> DEBUG 1: Forecast File:
> ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc
> DEBUG 1: Observation File:
../out/pcp_combine/sample_obs_2005080712V_12A.nc
> DEBUG 1: Forecast Field: APCP_12 at A12
> DEBUG 1: Observation Field: APCP_12 at A12
> DEBUG 2: Processing masking regions.
> DEBUG 2: Identifying objects in the forecast and observation
fields...
> DEBUG 2: Computing contingency table statistics...
> DEBUG 2: Identified: 7 forecast objects and 4 observation objects.
> DEBUG 2: Performing merging (THRESH) in the forecast field.
> DEBUG 2: Performing merging (THRESH) in the observation field.
> DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
> DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
> observation fields.
> mode(7444,0x7fffce88f3c0) malloc: *** error for object
0x4045c4c087798ede:
> pointer being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
> make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
> make[1]: Leaving directory
> '/Users/rschumac/research/ncar/netcdf_for_met/met-6.0/scripts'
> make: *** [Makefile:843: test] Error 2
>
>
>
> > On May 17, 2017, at 3:05 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
> >
> > Russ,
> >
> > Randy Bullock and I thought for a while about this and ended up
profiling
> > this run of mode using valgrind.  Lo and behold, it uncovered some
real
> > issues.  The bad news is that we have a lot of minor issues to
sift
> through
> > prior to the next release of MET to harden up the code base!  But
the
> good
> > news is that found an obvious memory problem where mode is
deleting
> > memory.  We're missing some square brackets on a few lines '[]'
and it's
> > not unreasonable to believe that this would be problematic with
some
> > compilers but not others.
> >
> > I have an updated version of the file named "mode_exec.cc" that
I've
> > attached to this message.  Please use it to replace
> > "met-6.0/src/tools/core/mode/mode_exec.cc".  Then do a "make clean
> install
> > test >& make_met.log".
> >
> > Please let me know if this fixes the segfault you got from mode.
I'll
> keep
> > my fingers crossed!
> >
> > Thanks,
> > John
> >
> >
> > On Wed, May 17, 2017 at 12:18 PM, Russ Schumacher via RT <
> met_help at ucar.edu>
> > wrote:
> >
> >>
> >> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
> >>
> >> Here they are!
> >>
> >> Russ
> >>
> >>
> >>
> >
> > <mode_exec.cc>
>
>
>
> --
> Russ S. Schumacher
> Associate Professor
> Department of Atmospheric Science
> Colorado State University
> e-mail: russ.schumacher at colostate.edu
> phone: 970.491.8084
> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>
>
>
>
>
>
>
>

------------------------------------------------
Subject: MET compile problem on mac
From: Russ Schumacher
Time: Fri May 19 12:06:06 2017

Hi John,

So I tried one more thing that actually seemed to solve the problem
(though I don’t know enough about c++ to know what the difference
between the compilers are.)

Previously, I had been using the Macports version of all the compilers
(gfortran, gcc, g++), and this is where MODE was failing in the test.

I tried one more iteration, using the Macports version of gfortran and
gcc, but instead using the Xcode version of g++ (clang).  Compiling
all the netcdf libraries using this set of compilers, and then
compiling MET, yielded no errors in the compile or the test.  (I
didn’t even need to apply the fix to the mode code that you had sent.)

 If it helps for future development, here are the details of the two
g++ compilers:

(this version worked)
[rschumac at parana met-6.0]$ /usr/bin/g++ --version
Configured with:
--prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-
include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.41)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

(this one didn’t)
[rschumac at parana met-6.0]$ /opt/local/bin/g++ --version
g++ (MacPorts gcc6 6.3.0_2) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

Thanks again for all the help!

Russ




> On May 18, 2017, at 7:28 AM, John Halley Gotway via RT
<met_help at ucar.edu> wrote:
>
> Russ,
>
> Ok, thanks for letting me know.  Too bad that didn't do the trick.
>
> But I'm glad you got it working elsewhere.  I did see somewhat
somewhat
> similar behavior, specifically from mode, on another user's Linux
build.
> One compiler version led to an error while another version did not.
>
> I'm glad to have a way forward at least.  We'll use valgrind to
search for
> and resolve memory issues prior to the next release.  Once we're
finished
> we'all send you a pre-release tarball and ask you to test on your
Mac.
> I'll create a development ticket in our tracking system to make sure
we
> remember to do that.
>
> Thanks,
> John
>
>
> On Wed, May 17, 2017 at 5:08 PM Russ Schumacher via RT
<met_help at ucar.edu>
> wrote:
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>>
>> Hi John,
>>
>> Unfortunately I got the same error after applying this new code
(error
>> messages below)…in the meantime though I got a successful compile
and test
>> on another of our Linux machines that I can use just as easily. I’m
still
>> interested in getting it installed on the Mac (and happy to help
you
>> continue to debug!) but it’s not an urgent concern.  Thanks for all
the
>> help!
>>
>> Russ
>>
>>
>>
>> *** Running MODE on APCP using netCDF input for both forecast and
>> observation ***
>> ../src/tools/core/mode/mode \
>>        ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
>>        ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
>>        config/MODEConfig_APCP_12 \
>>        -outdir ../out/mode -v 2
>> DEBUG 1: Default Config File:
>> /Users/rschumac/research/ncar/netcdf_for_met/met-
6.0/share/met/config/MODEConfig_default
>> DEBUG 1: Match Config File: config/MODEConfig_APCP_12
>> DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
>> DEBUG 1: Forecast File:
>> ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc
>> DEBUG 1: Observation File:
../out/pcp_combine/sample_obs_2005080712V_12A.nc
>> DEBUG 1: Forecast Field: APCP_12 at A12
>> DEBUG 1: Observation Field: APCP_12 at A12
>> DEBUG 2: Processing masking regions.
>> DEBUG 2: Identifying objects in the forecast and observation
fields...
>> DEBUG 2: Computing contingency table statistics...
>> DEBUG 2: Identified: 7 forecast objects and 4 observation objects.
>> DEBUG 2: Performing merging (THRESH) in the forecast field.
>> DEBUG 2: Performing merging (THRESH) in the observation field.
>> DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
>> DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
>> observation fields.
>> mode(7444,0x7fffce88f3c0) malloc: *** error for object
0x4045c4c087798ede:
>> pointer being freed was not allocated
>> *** set a breakpoint in malloc_error_break to debug
>> make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
>> make[1]: Leaving directory
>> '/Users/rschumac/research/ncar/netcdf_for_met/met-6.0/scripts'
>> make: *** [Makefile:843: test] Error 2
>>
>>
>>
>>> On May 17, 2017, at 3:05 PM, John Halley Gotway via RT <
>> met_help at ucar.edu> wrote:
>>>
>>> Russ,
>>>
>>> Randy Bullock and I thought for a while about this and ended up
profiling
>>> this run of mode using valgrind.  Lo and behold, it uncovered some
real
>>> issues.  The bad news is that we have a lot of minor issues to
sift
>> through
>>> prior to the next release of MET to harden up the code base!  But
the
>> good
>>> news is that found an obvious memory problem where mode is
deleting
>>> memory.  We're missing some square brackets on a few lines '[]'
and it's
>>> not unreasonable to believe that this would be problematic with
some
>>> compilers but not others.
>>>
>>> I have an updated version of the file named "mode_exec.cc" that
I've
>>> attached to this message.  Please use it to replace
>>> "met-6.0/src/tools/core/mode/mode_exec.cc".  Then do a "make clean
>> install
>>> test >& make_met.log".
>>>
>>> Please let me know if this fixes the segfault you got from mode.
I'll
>> keep
>>> my fingers crossed!
>>>
>>> Thanks,
>>> John
>>>
>>>
>>> On Wed, May 17, 2017 at 12:18 PM, Russ Schumacher via RT <
>> met_help at ucar.edu>
>>> wrote:
>>>
>>>>
>>>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>>>>
>>>> Here they are!
>>>>
>>>> Russ
>>>>
>>>>
>>>>
>>>
>>> <mode_exec.cc>
>>
>>
>>
>> --
>> Russ S. Schumacher
>> Associate Professor
>> Department of Atmospheric Science
>> Colorado State University
>> e-mail: russ.schumacher at colostate.edu
>> phone: 970.491.8084
>> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>>
>>
>>
>>
>>
>>
>>
>>
>



--
Russ S. Schumacher
Associate Professor
Department of Atmospheric Science
Colorado State University
e-mail: russ.schumacher at colostate.edu
phone: 970.491.8084
web: http://www.atmos.colostate.edu/faculty/schumacher.php







------------------------------------------------
Subject: MET compile problem on mac
From: John Halley Gotway
Time: Fri May 19 12:15:24 2017

Russ,

Thanks for the info.  I'm glad that switching compiler versions
resolved
it.  That is really interesting.  The other user I mentioned who
experienced a segfault from MODE was using g++ 6.3.1 on RedHat:

g++(GCC) 6.3.1 20161221 (RedHat)

That's awfully close to version 6.3.0 that you were using.  I have no
idea
about the subtleties of these compiler versions, but it's pretty
suspicious.

Nevertheless, this problem led us to discover some memory usage that
we can
clean up.  If possible, I'll try testing out met-6.1 using gcc 6.3.0
via
mac ports on my machine.

Thanks,
John

On Fri, May 19, 2017 at 12:06 PM, Russ Schumacher via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
>
> Hi John,
>
> So I tried one more thing that actually seemed to solve the problem
> (though I don’t know enough about c++ to know what the difference
between
> the compilers are.)
>
> Previously, I had been using the Macports version of all the
compilers
> (gfortran, gcc, g++), and this is where MODE was failing in the
test.
>
> I tried one more iteration, using the Macports version of gfortran
and
> gcc, but instead using the Xcode version of g++ (clang).  Compiling
all the
> netcdf libraries using this set of compilers, and then compiling
MET,
> yielded no errors in the compile or the test.  (I didn’t even need
to apply
> the fix to the mode code that you had sent.)
>
>  If it helps for future development, here are the details of the two
g++
> compilers:
>
> (this version worked)
> [rschumac at parana met-6.0]$ /usr/bin/g++ --version
> Configured with:
--prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 8.1.0 (clang-802.0.41)
> Target: x86_64-apple-darwin16.5.0
> Thread model: posix
> InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/
> XcodeDefault.xctoolchain/usr/bin
>
> (this one didn’t)
> [rschumac at parana met-6.0]$ /opt/local/bin/g++ --version
> g++ (MacPorts gcc6 6.3.0_2) 6.3.0
> Copyright (C) 2016 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There
is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
>
> Thanks again for all the help!
>
> Russ
>
>
>
>
> > On May 18, 2017, at 7:28 AM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
> >
> > Russ,
> >
> > Ok, thanks for letting me know.  Too bad that didn't do the trick.
> >
> > But I'm glad you got it working elsewhere.  I did see somewhat
somewhat
> > similar behavior, specifically from mode, on another user's Linux
build.
> > One compiler version led to an error while another version did
not.
> >
> > I'm glad to have a way forward at least.  We'll use valgrind to
search
> for
> > and resolve memory issues prior to the next release.  Once we're
finished
> > we'all send you a pre-release tarball and ask you to test on your
Mac.
> > I'll create a development ticket in our tracking system to make
sure we
> > remember to do that.
> >
> > Thanks,
> > John
> >
> >
> > On Wed, May 17, 2017 at 5:08 PM Russ Schumacher via RT <
> met_help at ucar.edu>
> > wrote:
> >
> >>
> >> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
> >>
> >> Hi John,
> >>
> >> Unfortunately I got the same error after applying this new code
(error
> >> messages below)…in the meantime though I got a successful compile
and
> test
> >> on another of our Linux machines that I can use just as easily.
I’m
> still
> >> interested in getting it installed on the Mac (and happy to help
you
> >> continue to debug!) but it’s not an urgent concern.  Thanks for
all the
> >> help!
> >>
> >> Russ
> >>
> >>
> >>
> >> *** Running MODE on APCP using netCDF input for both forecast and
> >> observation ***
> >> ../src/tools/core/mode/mode \
> >>        ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc \
> >>        ../out/pcp_combine/sample_obs_2005080712V_12A.nc \
> >>        config/MODEConfig_APCP_12 \
> >>        -outdir ../out/mode -v 2
> >> DEBUG 1: Default Config File:
> >> /Users/rschumac/research/ncar/netcdf_for_met/met-6.0/share/
> met/config/MODEConfig_default
> >> DEBUG 1: Match Config File: config/MODEConfig_APCP_12
> >> DEBUG 1: Merge Config File: config/MODEConfig_APCP_12
> >> DEBUG 1: Forecast File:
> >> ../out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc
> >> DEBUG 1: Observation File: ../out/pcp_combine/sample_obs_
> 2005080712V_12A.nc
> >> DEBUG 1: Forecast Field: APCP_12 at A12
> >> DEBUG 1: Observation Field: APCP_12 at A12
> >> DEBUG 2: Processing masking regions.
> >> DEBUG 2: Identifying objects in the forecast and observation
fields...
> >> DEBUG 2: Computing contingency table statistics...
> >> DEBUG 2: Identified: 7 forecast objects and 4 observation
objects.
> >> DEBUG 2: Performing merging (THRESH) in the forecast field.
> >> DEBUG 2: Performing merging (THRESH) in the observation field.
> >> DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
> >> DEBUG 2: Performing matching (MERGE_BOTH) between the forecast
and
> >> observation fields.
> >> mode(7444,0x7fffce88f3c0) malloc: *** error for object
> 0x4045c4c087798ede:
> >> pointer being freed was not allocated
> >> *** set a breakpoint in malloc_error_break to debug
> >> make[1]: *** [mk/mode.mk:23: mode] Abort trap: 6
> >> make[1]: Leaving directory
> >> '/Users/rschumac/research/ncar/netcdf_for_met/met-6.0/scripts'
> >> make: *** [Makefile:843: test] Error 2
> >>
> >>
> >>
> >>> On May 17, 2017, at 3:05 PM, John Halley Gotway via RT <
> >> met_help at ucar.edu> wrote:
> >>>
> >>> Russ,
> >>>
> >>> Randy Bullock and I thought for a while about this and ended up
> profiling
> >>> this run of mode using valgrind.  Lo and behold, it uncovered
some real
> >>> issues.  The bad news is that we have a lot of minor issues to
sift
> >> through
> >>> prior to the next release of MET to harden up the code base!
But the
> >> good
> >>> news is that found an obvious memory problem where mode is
deleting
> >>> memory.  We're missing some square brackets on a few lines '[]'
and
> it's
> >>> not unreasonable to believe that this would be problematic with
some
> >>> compilers but not others.
> >>>
> >>> I have an updated version of the file named "mode_exec.cc" that
I've
> >>> attached to this message.  Please use it to replace
> >>> "met-6.0/src/tools/core/mode/mode_exec.cc".  Then do a "make
clean
> >> install
> >>> test >& make_met.log".
> >>>
> >>> Please let me know if this fixes the segfault you got from mode.
I'll
> >> keep
> >>> my fingers crossed!
> >>>
> >>> Thanks,
> >>> John
> >>>
> >>>
> >>> On Wed, May 17, 2017 at 12:18 PM, Russ Schumacher via RT <
> >> met_help at ucar.edu>
> >>> wrote:
> >>>
> >>>>
> >>>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80492 >
> >>>>
> >>>> Here they are!
> >>>>
> >>>> Russ
> >>>>
> >>>>
> >>>>
> >>>
> >>> <mode_exec.cc>
> >>
> >>
> >>
> >> --
> >> Russ S. Schumacher
> >> Associate Professor
> >> Department of Atmospheric Science
> >> Colorado State University
> >> e-mail: russ.schumacher at colostate.edu
> >> phone: 970.491.8084
> >> web: http://www.atmos.colostate.edu/faculty/schumacher.php
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
>
>
>
> --
> Russ S. Schumacher
> Associate Professor
> Department of Atmospheric Science
> Colorado State University
> e-mail: russ.schumacher at colostate.edu
> phone: 970.491.8084
> web: http://www.atmos.colostate.edu/faculty/schumacher.php
>
>
>
>
>
>
>
>

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


More information about the Met_help mailing list