[Shake-dev] cannot install shakemap fully and get some errors when run the exmaple

Gabe Plank gabe at seismo.unr.edu
Fri Aug 6 17:56:04 UTC 2010


Hi Martin - I use SM-3.5 on Ubuntu Jaunty 64-bit. Here are most of my
notes for the SM-3.5 installation. Some of these issues were pertinent
for th SM-3.2 install and may no longer be relevant.

Shakemap 3.5 installation notes - Gabe Plank

A. INSTALLATION-RELATED CONFIGS
-------------------------------
(1) using gcc-4.3.3 perl-5.10
-------------------------------
(2) Download and build NetCDF 4.1.1
-------------------------------
(3) Download and build GMT-4.4.0. Make sure to build against NetCDF 4.1.1
This fixes runtime errors in grind. I tried other configurations of
GMT/NetCDF and this is the only one that worked for me on Ubuntu.
-------------------------------
(4) Download and build mp-2.9.8
1. Makefile.lnx needs the include path appended with /usr/include
2. Need to install libxaw7-dev to get Athena Widget headers
3. Need to instal libexpat1-dev to get XML parsing library headers
4. Put a link to mp in shakemap/bin
-------------------------------
(5) Additional perl modules needed
*enum.pm - this is a non-standard perl module on Ubuntu. Fixed by
finding it on CPAN and copying it into the <shake_home>/perl/lib.
*sudo apt-get install libxml-simple-perl
*sudo apt-get install libmail-sender-perl
*sudo apt-get install libtime-modules-perl

Maybe some other ones as well....look at the install log for errors.
-------------------------------
(5) setenv PERL5LIB <shake_home>/perl/lib:<shake_home>/lib;$PERL5LIB
Otherwise the installation process will probably not find
ShakeConfig.pm and some other SM modules.
-------------------------------
(6) ~/.gmtdefaults4 file using MEASURE_UNIT=meter causes build failures.
Fixed by changing to inch.
-------------------------------
(7) Be sure to edit <shake_home>/include/macros to use the new GMT and
NetCDF versions.
-------------------------------
(8) If there are errors on the make installation, even if you correct
them and re-run, some things will not get generated properly (such as
the tvmap and intensity scale postscripts) and binaries may not get
copied up to the top level bin directory. Use ldd to make sure that
the C programs in <shake_home>/src/contour are built against the
correct versions of GMT and NetCDF.


B. RUNTIME-RELATED CONFIGS
(1) crappy text in output map
On Linux, the default /usr/bin/convert makes bad jpg images from
postscript (for me). Install graphicsmagick. Set the genex.conf
convert var to use 'gm' in the args line. Hack shakemap's JpgMaps.pm
lines 98 and 101 with 'convert' in the argument string, so the final
command looks like 'gm convert ...'.
If genex.conf::convert setting could include spaces, one would not
have to hack the JpgMaps perl module.
-------------------------------
(2) pscoast error
transfer: Destination 'foxx.seismo.unr.edu' list 'weblist' not found
grind: Not enough stations in search radius (0 < 6): bias computation
abandoned.
grind: 0 stations flagged out this iteration
Regression: No source mechanism specified. Using default.
Executing: /usr/lib/gmt/bin//pscoast -Df -P
-R-116.2271/-113.5271/40.2601/42.0601 -JM10.0 -S0 -O
pscoast: full resolution shoreline data base not installed
pscoast: No databases available - aborts
mapping: Error running command:
/usr/lib/gmt/bin//pscoast -Df -P -R-116.2271/-113.5271/40.2601/42.0601
-JM10.0 -S0 -O|

shake: Error in mapping: 256

This was fixed by installing myHigh Res coastline file
GSHHS1.10_high.tar.bz2 into gmt-4.4.0/share/coast.
-------------------------------
(3) keep in mind that shakemap wants pga and psa measurements in
*percent* gravity, not in gravity. This was noted in the SM-3.5 docs
but not in the SM-3.2 docs.
-------------------------------
(4) Timezone bug
When the server's TZ is GMT, event.xml is using GMT, and
mapping.conf is using use_utc=false, the timezone string gets corrupted. To fix:

perl/lib/Shake/Timezone.pm line 60
change:
substr($tz,1,1) = $isdst ? "D" : "S";

to
unless ($tz eq "GMT"){
  substr($tz,1,1) = $isdst ? "D" : "S";
}

This was reported in 3.2 by me but not fixed in 3.5. Not an issue if
your runtime user's TZ is set to your local timezone.
-------------------------------
(5) DBD::mysql bug
There's a critical bug in DBD::mysql that has not been fixed yet.
http://rt.cpan.org/Public/Bug/Display.html?id=39866

I downgraded to the following package and the problem is fixed:
(32-bit)
http://launchpadlibrarian.net/14522785/libdbd-mysql-perl_4.006-1build1_i386.deb
(64-bit)
libdbd-mysql-perl_4.006-1build1_amd64.deb

You also have to pin the version in the /etc/apt/preferences file:
Package: libdbd-mysql-perl
Pin: version 4.006*
Pin-Priority: 1001
-------------------------------
(6) Obsolete .bin file needs to be turned into a grd file. This is documented.
In lib/sitecorr:
xyz2grd -R-123.000/-111.008/33.00/43.992 -I30c
30s_123_111_33_44_vsgrid.txt -G30s_123_111_33_44_vsgrid.grd
-------------------------------
(7) You'll need to run makeMMIsiteTable on your site correction files
in lib/sitecorr, to generate the appropriate .cpt files there. This is
documented.
-------------------------------
(8) Runtime errors in grind:
grdmath: posixio.c:412: px_get: Assertion `extent != 0' failed.
grdmath: posixio.c:412: px_get: Assertion `extent != 0' failed.
grdmath: posixio.c:412: px_get: Assertion `extent != 0' failed.
grdmath: GMT SYNTAX ERROR:
/data/rtapps1/bin/shakemap-3.5/bin/../data/2010163_312414/richter/pga_rock.grd
is not a number, operator or file name
grdmath: posixio.c:412: px_get: Assertion `extent != 0' failed.
grdmath: GMT SYNTAX ERROR:
/data/rtapps1/bin/shakemap-3.5/bin/../data/2010163_312414/richter/pga_rock.grd
is not a number, operator or file name
grdmath: GMT SYNTAX ERROR:
/data/rtapps1/bin/shakemap-3.5/bin/../data/2010163_312414/richter/pgv_rock.grd
is not a number, operator or file name
grdmath: posixio.c:412: px_get: Assertion `extent != 0' failed.
grdmath: GMT SYNTAX ERROR:
/data/rtapps1/bin/shakemap-3.5/bin/../data/2010163_312414/richter/mi_rock.grd
is not a number, operator or file name
gmt2rgb: posixio.c:412: px_get: Assertion `extent != 0' failed.
grdmath: GMT SYNTAX ERROR:
/data/rtapps1/bin/shakemap-3.5/bin/../data/2010163_312414/output/map_r.grd
is not a number, operator or file name
grdmath: GMT SYNTAX ERROR:
/data/rtapps1/bin/shakemap-3.5/bin/../data/2010163_312414/output/mi.grd
is not a number, operator or file name
grdinfo: Could not find file
[/data/rtapps1/bin/shakemap-3.5/bin/../data/2010163_312414/output/pga.grd]
GMThd: unknown accessor 'file'
at /data/rtapps1/bin/shakemap-3.5/bin/../bin/grind line 1826
shake: Error in grind: 2560

As mentioned, this was solved by downloading gmt-4.4.0 and
netcdf-4.1.1, and rebuilding the code from <SHAKE_HOME>/src.
-------------------------------
(9) If you had problems on installation, you may need to regenerate
the tvmap and intensity map postscript scale legends with your new
(4.0.0) version of gmt:
<shake_home>/bin/tvscale
<shake_home>/bin/iiscale Wald_99

Note that in SM-3.5 the iiscale program needs an argument now. I
didn't see this documented anywhere.
-------------------------------
(10) Note that I did NOT have to regenerate my topo grids with
gmt-4.4.1. The 4.3 versions worked fine.


--
// Gabe Plank
// Seismic Network Analyst
// Nevada Seismological Laboratory
// University of Nevada, Reno
// 775.784.7039


On Fri, Aug 6, 2010 at 2:23 AM, Martin <varbone-shake at yahoo.com> wrote:
> Hello,
>
> 1. when I run "make all" under directory /opt/shakemap, I get bellow complain.
>
> ************** output message start **************************
> .......
> make[2]: Leaving directory `/opt/shakemap/src/queue'
> /opt/shakemap/src/shake
> make[2]: Entering directory `/opt/shakemap/src/shake'
> /usr/bin/install -m 0755 print /opt/shakemap/bin
> Can't locate ShakeConfig.pm in @INC (@INC contains: /usr/bin/../lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at print line 8.
> BEGIN failed--compilation aborted at print line 8.
> make[2]: *** [/opt/shakemap/bin/print] Error 2
> make[2]: Leaving directory `/opt/shakemap/src/shake'
> .........
> ************** output message end **************************
>
> 2. cannot make web
> $ cd /opt/shakemap/lib
> $ make web
> Nothing to be done for `web'
>
> 3. there is no 'getciim' and 'getciim_us' in dir '/opt/shakemap/bin/'
> $ ./shake -event 9583161 -v
> shake: Running: '/opt/shakemap/bin/../bin/retrieve -event 9583161'
> retrieve: CONFIG ERROR: 'program' statement at line 41 in /opt/shakemap/bin/../config/retrieve.conf:
>        Can't find getciim in /opt/shakemap/bin/../bin
> retrieve: CONFIG ERROR: 'program' statement at line 42 in /opt/shakemap/bin/../config/retrieve.conf:
>        Can't find getciim_us in /opt/shakemap/bin/../bin
> retrieve: Error in config file, quitting...
> shake: Error in retrieve: 256
>
> 4. after comment out three lines in file retrieve.conf
> #program        : getciim
> #program         : getciim_us
> #program         : getnsmp
> *********************output message start ***********************
> $ ./shake -event 9583161 -v
> shake: Running: '/opt/shakemap/bin/../bin/retrieve -event 9583161'
> Using zone CI.
> shake: Running: '/opt/shakemap/bin/../bin/pending -event 9583161'
> transfer: ----- Starting Transfer at 08/06/2010 17:15:22 -----
> transfer: ----- Transfer finished at 08/06/2010 17:15:22 -----
> shake: Done with 'pending'
> shake: Running: '/opt/shakemap/bin/../bin/grind -event 9583161 -qtm -xml'
> Uncertainty computation skipped (no Intensity > 6.0)
> shake: Done with 'grind'
> shake: Running: '/opt/shakemap/bin/../bin/tag -event 9583161'
> shake: Done with 'tag'
> shake: Running: '/opt/shakemap/bin/../bin/mapping -event 9583161 -timestamp -itopo -verbose -gsm'
> Running: /opt/shakemap/bin/../bin/echo -117.650000 35.593000 | /usr/lib/gmt/bin/mapproject -R-120.1500000000/-117.6500000000/33.5330000000/35.5930000000 -JM16.51
> Running: /opt/shakemap/bin/../bin/echo -117.650000 35.593000 | /usr/lib/gmt/bin/mapproject -R-120.1500000000/-117.6500000000/33.5330000000/35.5930000000 -JM25.4
> Running: /usr/lib/gmt/bin/psbasemap -Ba60mf30m/a30mf30mWSen -P -R-120.1500000000/-117.6500000000/33.5330000000/35.5930000000 -JM16.51 -X2.54 -Y2.54 -K
> Running: /usr/lib/gmt/bin/psbasemap -Ba60mf30m/a30mf30mWSen -P -R-120.1500000000/-117.6500000000/33.5330000000/35.5930000000 -JM16.51 -X2.54 -Y6.35 -K
> Running: /usr/lib/gmt/bin/psxy /opt/shakemap/bin/../lib/mapping/ca_roads.xy -P -R-120.1500000000/-117.6500000000/33.5330000000/35.5930000000 -JM16.51 -M -W6/153/153/153 -O -K
> psxy: Option -M is deprecated (but is processed correctly).  Please use -m instead
> Running: /usr/lib/gmt/bin/pscoast -P -R-120.1500000000/-117.6500000000/33.5330000000/35.5930000000 -JM16.51 -N1/5 -N2/5 -Df -W5 -S120/160/220 -Ia/2/120/160/220 -O -K
> pscoast: full resolution shoreline data base not installed
> pscoast: full resolution political boundary data base not installed
> pscoast: full resolution river data base not installed
> pscoast: No databases available - aborts
> mapping: Error running command:
> /usr/lib/gmt/bin/pscoast -P -R-120.1500000000/-117.6500000000/33.5330000000/35.5930000000 -JM16.51 -N1/5 -N2/5 -Df -W5 -S120/160/220 -Ia/2/120/160/220 -O -K|
>
> shake: Error in mapping: 256
> *********************output message end *************************
>
> Thank you very much.
> Martin
>
>
>
> PS: My OS is Ubuntu 10.4
> packages install script is below.
> ************************* install script start ****************************
> #!/bin/sh
>
> package_name_list="perl
>        libyaml-perl libdbi-perl libdbd-mysql-perl libhtml-template-perl
>        libxml-parser-perl libxml-writer-perl libfile-spec-perl
>        libtime-modules-perl libevent-perl libmail-sender-perl
>        libconfig-general-perl liburi-perl libhtml-tagset-perl
>        libhtml-parser-perl libwww-perl libxml-simple-perl
>        libtemplate-perl
>        libnetcdf4 libnetcdf-dev gmt libgmt4 libgmt-dev
>        imagemagick subversion
>        mysql-server mysql-client phpmyadmin
>        ssh openssh-client openssh-server"
>
> # select *apache* for http server
> # and *DON'T* config phpmyadmin login password
>
> for var in $package_name_list; do
>  apt-get -y install $var
> done
>
> # install perl modules, no deb packages
> perl -MCPAN -e 'install Test::More'
> perl -MCPAN -e 'install Bundle::LWP'
> perl -MCPAN -e 'install MIME::Base64'
> perl -MCPAN -e 'install Digest::MD5'
> perl -MCPAN -e 'install enum'
> ***********************install script end ***************************
>
>
>
>
> _______________________________________________
> Shake-dev mailing list
> Shake-dev at geohazards.usgs.gov
> https://geohazards.usgs.gov/mailman/listinfo/shake-dev
>


More information about the Shake-dev mailing list