Re: grdmath problems

Paul Wessel <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
No, this should be good - I just need to reproduce it in Ubuntu, or have some of our other guys try it as well (Marcelo? Eduardo?)

-p

On Jan 22, 2014, at 9:16 AM, Branden Christensen <[email protected]> wrote:

> Paul:
> 
> 
> I get this:
> osop@osop-displays2:~$ /usr/src/gmt-4.5.11/bin/grdmath -R0/10/0/10 -I1 X = 1.grd
> osop@osop-displays2:~$ /usr/src/gmt-4.5.11/bin/grdmath -R0/10/0/10 -I1 X = 2.grd 
> osop@osop-displays2:~$ /usr/src/gmt-4.5.11/bin/grdmath 1.grd DUP DUP 10 LE 0.65 MUL EXCH DUP DUP DUP 10 GT EXCH 20 LE MUL EXCH 10 SUB 10 DIV -0.05 MUL 0.65 ADD MUL EXCH DUP DUP DUP 20 GT EXCH 30 LE MUL EXCH 20 SUB 10 DIV -0.07 MUL 0.60 ADD MUL EXCH DUP DUP DUP 30 GT EXCH 40 LE MUL EXCH 30 SUB 10 DIV -0.08 MUL 0.53 ADD MUL EXCH 40 GT 0.45 MUL ADD ADD ADD ADD 686 2.grd DIV EXCH POW MUL = 3.grd
> *** buffer overflow detected ***: /usr/src/gmt-4.5.11/bin/grdmath terminated
> 
> So will you still need the original files if these dummy files produce the same error? Please let me know!
> 
> 
> Kind Regards, 
> 
> 
> Branden Christensen
> The Seismo Guys Blog: http://www.osop.com.pa/blog/the-seismo-guys/
> Take a Virtual Tour: http://www.osop.com.pa/tour
> Sign up for the OSOP mailing list: http://www.osop.com.pa/about/osop-mailing-list/
> 
> 
> On Wed, Jan 22, 2014 at 7:05 PM, Paul Wessel <[email protected]> wrote:
> Hi Brandan-
> 
> Even if the input grids dont matter I will need to create dummy ones with the right dimensions since grdmath is reading them to detect -R -I.   If I just try
> 
> grdmath -R0/10/0/10 -I1 X = 1.grd
> grdmath -R0/10/0/10 -I1 X = 2.grd
> grdmath 1.grd DUP DUP 10 LE 0.65 MUL EXCH DUP DUP DUP 10 GT EXCH 20 LE MUL EXCH 10 SUB 10 DIV -0.05 MUL 0.65 ADD MUL EXCH DUP DUP DUP 20 GT EXCH 30 LE MUL EXCH 20 SUB 10 DIV -0.07 MUL 0.60 ADD MUL EXCH DUP DUP DUP 30 GT EXCH 40 LE MUL EXCH 30 SUB 10 DIV -0.08 MUL 0.53 ADD MUL EXCH 40 GT 0.45 MUL ADD ADD ADD ADD 686 2.grd DIV EXCH POW MUL = 3.grd
> 
> I get no errors.  Let me know if the above crashes for you.  I will then fire up Ubuntu in parallels and see what happens there.
> -p
> 
> On Jan 22, 2014, at 8:51 AM, Branden Christensen <[email protected]> wrote:
> 
> > Paul:
> >
> >
> > Buenas tardes.
> >
> > I would like to take up this issue again.
> >
> > The buffer overflow is caused by grdmath on a 64-bit 12.04 LTS Ubuntu machine running GMT 4.5.11.
> >
> > Here is the complete command and resulting error:
> >
> > /usr/src/gmt-4.5.11/bin/grdmath /opt/shakemap2/bin/../data/9583161/richter/pgv_rock.grd DUP DUP 10 LE 0.65 MUL EXCH DUP DUP DUP 10 GT EXCH 20 LE MUL EXCH 10 SUB 10 DIV -0.05 MUL 0.65 ADD MUL EXCH DUP DUP DUP 20 GT EXCH 30 LE MUL EXCH 20 SUB 10 DIV -0.07 MUL 0.60 ADD MUL EXCH DUP DUP DUP 30 GT EXCH 40 LE MUL EXCH 30 SUB 10 DIV -0.08 MUL 0.53 ADD MUL EXCH 40 GT 0.45 MUL ADD ADD ADD ADD 686 /opt/shakemap2/bin/../data/9583161/output/UFVS74PC0J.grd DIV EXCH POW MUL = /opt/shakemap2/bin/../data/9583161/output/pgv.grd
> > *** buffer overflow detected ***: /usr/src/gmt-4.5.11/bin/grdmath terminated
> >
> > The input files do not matter. I created a new directory "tmp" and touched 1.grd, 2.grd and 3.grd. Then:
> > osop@osop-displays2:~/tmp$ /usr/src/gmt-4.5.11/bin/grdmath 1.grd DUP DUP 10 LE 0.65 MUL EXCH DUP DUP DUP 10 GT EXCH 20 LE MUL EXCH 10 SUB 10 DIV -0.05 MUL 0.65 ADD MUL EXCH DUP DUP DUP 20 GT EXCH 30 LE MUL EXCH 20 SUB 10 DIV -0.07 MUL 0.60 ADD MUL EXCH DUP DUP DUP 30 GT EXCH 40 LE MUL EXCH 30 SUB 10 DIV -0.08 MUL 0.53 ADD MUL EXCH 40 GT 0.45 MUL ADD ADD ADD ADD 686 2.grd DIV EXCH POW MUL = 3.grd*** buffer overflow detected ***: /usr/src/gmt-4.5.11/bin/grdmath terminated
> >
> >
> > Thank you for your expertise.
> >
> >
> > Kind Regards from Panama,
> >
> >
> > Branden Christensen
> > The Seismo Guys Blog: http://www.osop.com.pa/blog/the-seismo-guys/
> > Take a Virtual Tour: http://www.osop.com.pa/tour
> > Sign up for the OSOP mailing list: http://www.osop.com.pa/about/osop-mailing-list/
> >
> >
> > On Fri, Nov 29, 2013 at 9:32 AM, Paul Wessel <[email protected]> wrote:
> > Brendan-
> >
> > It would be helpful if you could save the files used to run the grdmath command below which seems to be the first that crashes.  However, that is clearly not the full grdmath command since there is no -R -I or gridfile on the input side. If I am to be of any help I will need an actual grdmath command line that crashes and all the input files that it requires so I can try to recreate the situation here.
> >
> > Cheers,
> > -p
> >
> >
> >
> > On Nov 28, 2013, at 5:54 PM, Branden Christensen <[email protected]> wrote:
> >
> >> grdmath: (/opt/shakemap2/bin/../data/9583161/output/hwxDhIWuGY.xy) PDIST 27.47 HYPOT = /opt/shakemap2/bin/../data/9583161/output/D7FwNIcwDT.grd
> >> *** buffer overflow detected ***: /usr/lib/gmt/bin/grdmath terminated
> >
> > To unsubscribe, send the message "signoff gmt-help" to [email protected]
> >
> > To unsubscribe, send the message "signoff gmt-help" to [email protected]
> 
> To unsubscribe, send the message "signoff gmt-help" to [email protected]
> 
> To unsubscribe, send the message "signoff gmt-help" to [email protected]


To unsubscribe, send the message "signoff gmt-help" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.