Re: grdmath problems
Marcelo Banik <[email protected]>
| Newsgroups | gmane.comp.gis.gmt.user |
|---|---|
| Message-ID | <CAN-U1_YtOZpUCP1hXadMrwVnp57sFfsdTe8CSD6hSfq1uYA8Ew@mail.gmail.com> |
Hi Branden, I didn't execute script siposg4511-1.sh because: # dirty link creation to find gdal.h rm -R /usr/local/include ln -s /usr/include/gdal /usr/local/include Appears to be much aggressive to my system. I decide to use the original install_gmt4.sh script, without your minor modification, and some minimal modification in your GMT4param.txt to fit my system configuration (see attached file). Then from a directory with files: $ ls gmt-4.5.11-src.tar.bz2 GMT4param.txt gshhg-gmt-nc4-2.2.4.tar.gz install_gmt4.sh I run the command: $ sudo sh -c "sh install_gmt4.sh GMT4param.txt" > install.log 2>&1 And did the test: $ /usr/src/gmt-4.5.11/bin/grdmath -R0/10/0/10 -I1 X = 1.grd $ /usr/src/gmt-4.5.11/bin/grdmath -R0/10/0/10 -I1 X = 2.grd $ /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 Finally I get your error! Then I did: $ export PATH=$PATH:/usr/src/gmt-4.5.11/bin $ which grdmath /usr/src/gmt-4.5.11/bin/grdmath $ 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 And now it works. For some unknown reason, it fails if an explicit path is used. I don't have this problem with my gmt4.5.11 installation. I'm not sure if it have some relation with your choice to not use shared lib. I could test it later, but first, let us now if including /usr/src/gmt-4.5.11/bin to your PATH works. Regards, Marcelo On Thu, Jan 23, 2014 at 2:36 PM, Branden Christensen < [email protected]> wrote: > Marcelo: > > > I also get: > > e51a8827d9b0ce3f36cfe6be01f24931 gmt-4.5.11-src.tar.bz2 > > Attached is the script I used to install GMT 4.5.11. Unpack this tgz file, > cd to usr/src and execute "siposg4511-1.sh". > > > 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 Thu, Jan 23, 2014 at 4:07 PM, Marcelo Banik <[email protected]>wrote: > >> Hi Branden, >> >> >> Here I have: >> >> $ uname -a >> >> Linux acer 3.2.0-41-generic #66-Ubuntu SMP Thu Apr 25 03:27:11 UTC 2013 >> x86_64 x86_64 x86_64 GNU/Linux >> >> >> $ cat /etc/issue >> >> Ubuntu 12.04.4 LTS \n \l >> >> >> It isn't identical, but I didn't expect that these minor differences >> could be an issue. >> >> >> From source files, I get: >> >> $ md5sum *.bz2 >> >> fd4abdbbc5cb48087a12a4c762b87123 gmt-4.5.11-non-gpl-src.tar.bz2 >> >> e51a8827d9b0ce3f36cfe6be01f24931 gmt-4.5.11-src.tar.bz2 >> >> >> Did you get the same values? >> >> >> Could you send your GMT4param.txt file? I could try to install here >> using it, just to try to reproduce your results. I don't expect that it >> could change any thing, but I don't know what to do. >> >> >> I only get a “buffer overflow detected” when I accidentally included >> option -Vd, but it don't appear to be your case. >> >> >> Regards, >> >> >> Marcelo >> >> >> >> >> On Thu, Jan 23, 2014 at 1:08 PM, Branden Christensen < >> [email protected]> wrote: >> >>> Hi all: >>> >>> >>> Marcelo, thank you for taking the time to try that. >>> >>> I just created a new, virgin virtual machine with 12.04: >>> >>> osop@shakemap:~$ uname -a >>> Linux shakemap 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 >>> 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux >>> osop@shakemap:~$ cat /etc/issue >>> Ubuntu 12.04.2 LTS \n \l >>> >>> I then installed GMT 4.5.11 from source. >>> >>> And then I attempted: >>> >>> osop@shakemap:~$ /usr/src/gmt-4.5.11/bin/grdmath -R0/10/0/10 -I1 X = >>> 1.grd >>> osop@shakemap:~$ /usr/src/gmt-4.5.11/bin/grdmath -R0/10/0/10 -I1 X = >>> 2.grd >>> osop@shakemap:~$ /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 I am getting the same results.... >>> >>> >>> 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:59 PM, Marcelo Banik <[email protected]>wrote: >>> >>>> Hi, >>>> >>>> It works fine at my ubuntu 12.04 LTS 64bits GMT 4.5.11 installed from >>>> source code. >>>> >>>> Regards, >>>> >>>> Marcelo >>>> >>>> >>>> >>>> On Wed, Jan 22, 2014 at 5:54 PM, J.J. Green < >>>> [email protected]> wrote: >>>> >>>>> Hi, >>>>> >>>>> Sounds like a flakey GMT in Ubuntu, see earlier messages >>>>> on this list. On >>>>> >>>>> jjg@flounder ~ $ cat /etc/issue >>>>> Linux Mint 16 Petra \n \l >>>>> >>>>> with >>>>> >>>>> jjg@flounder ~ $ apt-cache policy gmt >>>>> gmt: >>>>> Installed: 4.5.7-2ubuntu1 >>>>> Candidate: 4.5.7-2ubuntu1 >>>>> Package pin: 4.5.7-2ubuntu1 >>>>> Version table: >>>>> 4.5.9-1 1001 >>>>> 500 http://archive.ubuntu.com/ubuntu/ saucy/universe amd64 >>>>> Packages >>>>> *** 4.5.7-2ubuntu1 1001 >>>>> 500 http://archive.ubuntu.com/ubuntu/ raring/universe amd64 >>>>> Packages >>>>> 100 /var/lib/dpkg/status >>>>> >>>>> This achieved with >>>>> >>>>> jjg@flounder ~ $ cat /etc/apt/preferences.d/pin-gmt4 >>>>> Package: gmt >>>>> Pin: release n=raring* >>>>> Pin-Priority: 1001 >>>>> >>>>> Package: gmt-doc >>>>> Pin: release v=13.04, l=Ubuntu >>>>> Pin-Priority: 1001 >>>>> >>>>> Package: libgmt4 >>>>> Pin: release v=13.04, l=Ubuntu >>>>> Pin-Priority: 1001 >>>>> >>>>> Package: * >>>>> Pin: release v=13.04, l=Ubuntu >>>>> Pin-Priority: -1 >>>>> >>>>> I get no error for >>>>> >>>>> jjg@flounder ~ $ GMT grdmath -R0/10/0/10 -I1 X = 1.grd >>>>> jjg@flounder ~ $ GMT grdmath -R0/10/0/10 -I1 X = 2.grd >>>>> jjg@flounder ~ $ GMT 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 >>>>> >>>>> and >>>>> >>>>> jjg@flounder ~ $ ls -l *.grd >>>>> -rw-r--r-- 1 jjg jjg 1240 Jan 22 19:41 1.grd >>>>> -rw-r--r-- 1 jjg jjg 1240 Jan 22 19:41 2.grd >>>>> -rw-r--r-- 1 jjg jjg 1508 Jan 22 19:42 3.grd >>>>> >>>>> perhaps you could revert to 4.5.7 too >>>>> >>>>> Cheers >>>>> >>>>> Jim >>>>> -- >>>>> J.J. Green, Seaview Sensing Ltd., >>>>> http://seaviewsensing.com >>>>> >>>>> >>>>> 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] > To unsubscribe, send the message "signoff gmt-help" to [email protected]
GMT4param.txt
(text/plain, 2.5 KB)
# This file contains parameters needed by the install script # for GMT4 Version 4.5.1. Give this parameter file # as the argument to the install_gmt.sh script and the whole # installation process can be placed in the background. # Default answers will be selected where none is given. # You can edit the values, but do not remove definitions! # # This script was created by install_gmt.sh on # # 2013. nov. 23., szombat, 16.17.17 CET # # Do NOT add any spaces around the = signs. The # file MUST conform to Bourne shell syntax #--------------------------------------------- # GMT4 VERSION TO INSTALL #--------------------------------------------- VERSION=4.5.11 #--------------------------------------------- # SYSTEM UTILITIES AND FTP SETTING #--------------------------------------------- GMT_make=make passive_ftp=y #--------------------------------------------- # NETCDF SECTION #--------------------------------------------- netcdf_path=/usr #--------------------------------------------- # GSHHG SECTION #--------------------------------------------- GSHHG_install=y GSHHG_ftp=n GSHHG_path=/usr/src #--------------------------------------------- # GDAL SECTION #--------------------------------------------- use_gdal=y gdal_path=/usr/bin/gdal-config #--------------------------------------------- # GMT4 & GSHHG FTP SECTION #--------------------------------------------- GMT_ftp=n GMT_inst_gmt=y GMT_ftpsite=1 #--------------------------------------------- # GMT4 SUPPLEMENTS SELECT SECTION #--------------------------------------------- GMT_suppl_mex=d GMT_suppl_xgrid=d #--------------------------------------------- # GMT4 ENVIRONMENT SECTION #--------------------------------------------- GMT_si=y GMT_ps=y GMT_prefix=/usr/src/gmt-4.5.11 GMT_bin=/usr/src/gmt-4.5.11/bin GMT_lib=/usr/src/gmt-4.5.11/lib GMT_share=/usr/src/gmt-4.5.11/share GMT_include=/usr/src/gmt-4.5.11/include GMT_man=/usr/src/gmt-4.5.11/man GMT_doc=/usr/src/gmt-4.5.11/share/doc/gmt GMT_sharedir=/usr/src/gmt-4.5.11/share #--------------------------------------------- # COMPILING & LINKING SECTION #--------------------------------------------- GMT_sharedlib=n GMT_cc= GMT_64= GMT_triangle=n GMT_flock=n #--------------------------------------------- # TEST & PRINT SECTION #--------------------------------------------- GMT_run_examples=y GMT_delete=n #--------------------------------------------- # MEX SECTION #--------------------------------------------- MATDIR=/usr/local/matlab mex_mdir= mex_xdir=