[R-sig-Geo] gstat now uses Lapack

Edzer Pebesma edzer.pebesma at uni-muenster.de
Mon Oct 19 20:58:21 CEST 2015


gstat 1.1-0, now on CRAN, no longer comes with its own functions for
matrix factorization and solving systems of equations [1], but now
directly uses Lapack (dpotrf and dtrsm) through R's own lapack interface
and R_ext/Lapack.h header files.

For global kriging at one location from 10,000 observations, as in

library(sp)
library(gstat)
set.seed(1331)
n = 10000
pts = SpatialPoints(cbind(x = runif(n), y = runif(n)))
pts$z = runif(n)
k <- krige(z~1, pts, pts[1,], vgm(1, "Exp", 1))

I see a speed increase from 120 (gstat 1.0-26) to 46 seconds; using
openblas on a 4 core laptop brings this down to 15 seconds - I expect
sth similar with MKL/RevoR.

For local kriging on large data sets with smaller neighborhoods and many
locations, I wouldn't expect large improvements; for global kriging of
large data sets to many prediction locations, krige0 may be faster when
you use openblas or MKL - as long as things fit in memory.

I'd be happy to hear experiences (positive and negative), or otherwise
reactions or questions.

[1] it formerly used meschach,
http://homepage.math.uiowa.edu/~dstewart/meschach/
-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi),  University of Münster,
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 33081
Journal of Statistical Software:   http://www.jstatsoft.org/
Computers & Geosciences:   http://elsevier.com/locate/cageo/
Spatial Statistics Society http://www.spatialstatistics.info

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20151019/dba5ec90/attachment.bin>


More information about the R-sig-Geo mailing list