gstat icon indicating copy to clipboard operation
gstat copied to clipboard

multicores in `variogramST`

Open Raz316 opened this issue 3 years ago • 11 comments

I use the function of variogramST. In this function, number of cores to use in parallel can be determined using cores =.

However, even though I specify the number of cores, it seems only one core is used.

I use Windows10. Is there anything to prepare to use multicores before I specify cores = in variogramST?

Raz316 avatar Oct 12 '20 05:10 Raz316

The futures package is used for this; please consult it's documentation.

edzer avatar Oct 12 '20 06:10 edzer

I tried to figure out this problem with not only Windows but also Mac and Linux. However, core = did not work to use multicores. Since future package works with my PC environment, I would like you to examine if multicore process really works in gstat package.

Raz316 avatar Oct 25 '20 08:10 Raz316

It works for me.

edzer avatar Oct 25 '20 09:10 edzer

Mac, Rstudio?

Raz316 avatar Oct 25 '20 09:10 Raz316

Linux, R.

edzer avatar Oct 25 '20 09:10 edzer

It isn't working for me either. I looked into the R source code and, for STIDF objects, the cores parameter is not being passed from variogramST to variogramST.STIDF here. I tweaked the source code by adding cores=cores at line 102 and after rebuilding the package it's now parallelizing for me.

sbashevkin avatar Jan 21 '21 21:01 sbashevkin

Like that?

edzer avatar Jan 21 '21 21:01 edzer

Yes, exactly. Thank you!

sbashevkin avatar Jan 21 '21 21:01 sbashevkin

Thank you for the new information.

@edzer Did you change the source code in the gstat package?

From the package, it has not worked for me...

Raz316 avatar Jan 25 '21 07:01 Raz316

I changed it on GitHub, so you'd have to install it from there.

edzer avatar Jan 25 '21 08:01 edzer

Thank you. I could.

Raz316 avatar Jan 25 '21 13:01 Raz316