[R-sig-Geo] GStat 'predict.c' parallel estimation

Tim Peterson timjp at unimelb.edu.au
Thu Aug 27 02:45:17 CEST 2015

Hi all,

I'm considering editing the GStat kriging file 'predict.c' (while loop 
at line 151-165) for parallel estimation. I require parallel estimation 
for both kriging and indicator simulation and will be applying it to a 
region of ~30 million grid cells, which will be repeated for 300 time 

I appreciate that snow can be used for parallel kriging 
but, because of my computation burden, I require parallel calculation 
using Xeon Phi cards - hence I think the changes should be in 
'predict.c'. Also, in looking at the GStat C-code I suspect that the 
global variables in 'glvars.c' may complicate the parallel calculations. 
So anyway, before I embark upon this task (most likely using openMP), 
I'd be grateful if anyone could share tips or thoughts (and my edits 
will be freely shared.)

Also, some may be questioning the parallel estimation of each 
simulation. Considering that I'm estimating ~30 million cells, and will 
only be using ~70 cores per simulation, I am happy to accept the 
deficiency that recently estimated cells will not be used in the 
estimation of nearby cells within a concurrent parallel cycle. However, 
the estimates do need to be accessible to latter parallel cycles.

Lastly, my backup option is to use openMP to parallelise the GSLib 
Fortran subroutines 'cokb3d.for' and 'sisim.for' (ie outside of R). This 
is mainly because the subroutines are fairly standalone and don't use 
pointers - and hence possibly less problematic to make parallel.

Many thanks,


Dr. Tim Peterson

The Department of Infrastructure Engineering
The University of Melbourne, 3010 Australia
T: +61 3 8344 9950, M: +61 0438 385 937

Dept. profile : 
Research Gate : https://www.researchgate.net/profile/Tim_Peterson7
Google Scholar: 

More information about the R-sig-Geo mailing list