You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to generate rasters using the nlm_gaussianfield() function. However, the generation fails whenever the function is called in a parallel session.
# Required packages
library(NLMR)
library(parallel)
# Works
mclapply(1:2, mc.cores=1, function(x) {
nlm_gaussianfield(ncol=5, nrow=5)
})
# Does not work
mclapply(1:2, mc.cores=2, function(x) {
nlm_gaussianfield(ncol=5, nrow=5)
})
This yields the following error message:
[[1]]
[1] "Error in RandomFieldsUtils::RFoptions(...) : \n 'RFoptions(...)' may be used only outside any parallel code\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in RandomFieldsUtils::RFoptions(...): 'RFoptions(...)' may be used only outside any parallel code>
This appears to be an issue related to the RandomFields and RandomFieldsUtils packages, as the same code works when I install older package versions from the archive:
Hello
I'm trying to generate rasters using the
nlm_gaussianfield()
function. However, the generation fails whenever the function is called in a parallel session.This yields the following error message:
This appears to be an issue related to the
RandomFields
andRandomFieldsUtils
packages, as the same code works when I install older package versions from the archive:Here's my
sessionInfo()
The text was updated successfully, but these errors were encountered: