Skip to content

gstat now uses Lapack

2 messages · Edzer Pebesma, Tim Peterson

#
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/
#
On 10/20/2015 05:58 AM, Edzer Pebesma wrote:
Hi Edzer,

This is good to hear and I look forward to testing it. FYI, I have also 
been extending gls.c to use BLAS & LAPACK. However, when compiled using 
icc it canl optionally offload BLAS & LAPACK tasks (using openMP 
offload) to a co-processor, such as a Xeon Phi card. Once finished and 
tested I will circulate it.

Cheers

Tim
--------------------
Dr. Tim Peterson

The Department of Infrastructure Engineering
The University of Melbourne, 3010 Australia
T: +61 3 8344 9950 <tel:%2B61%203%208344%209950>, M: +61 0438 385 937 
<tel:%2B61%200438%20385%20937>

Dept. profile : 
http://www.ie.unimelb.edu.au/people/staff.php?person_ID=141135
Research Gate : https://www.researchgate.net/profile/Tim_Peterson7
Google Scholar: 
http://scholar.google.com.au/citations?user=kkYJLF4AAAAJ&hl=en&oi=ao