-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues when running on UNIX HPC environment #615
Comments
Please note |
Having done some further testing, I believe this is to do with the It also fails when using I suspect this means that the error is actually present in |
I can also confirm that this behaviour is present on my Windows laptop - the code fails when using |
Hi, I can reproduce this. I was surprised that it worked for multisession, but not sequential and multicore; normally it's the other way around. However, it turns out, this is most likely related to the recent #608 bug. The workaround is the same: set (hidden) option library(future)
library(methods)
options(future.globals.keepWhere = TRUE)
setGeneric("my_custom_method", function(x) {
standardGeneric("my_custom_method")
})
setMethod("my_custom_method", methods::signature(x = "numeric"), function(x) {
x^2
})
plan(sequential) ## works with future.globals.keepWhere = TRUE
# plan(multicore, workers = 2L) ## works with future.globals.keepWhere = TRUE
# plan(multisession, workers = 2L)
f <- future({ my_custom_method(2) })
v <- value(f)
print(v)
stopifnot(v == my_custom_method(2)) |
…d to be found in sequential and multicore futures since future 1.22.0 [#615]
Describe the bug
I can run a future containing a custom method on a Windows laptop within RStudio without issue, but when I launch this onto a HPC node, it fails.
Reproduce example
Return:
Expected behaviour
Session information
Please share your session information after the error has occurred so that we also see which packages and versions are involved;
The text was updated successfully, but these errors were encountered: