Closed stephenashton-dhsc closed 2 years ago
Does it work if you use future alone? i.e. something like this, but with your specific plan()
added in
library(future)
methods::setGeneric(
"my_custom_method",
function(x) {
standardGeneric("my_custom_method")
}
)
methods::setMethod(
"my_custom_method",
methods::signature(),
function(x) {
y <- x^2
return(y)
}
)
value(future(my_custom_method(1)))
If that doesn't work either, it is probably a future or future.batchtools (assuming you are using that) issue. You could probably work around it in the meantime by putting the generic and the method into a package and then making sure that package is loaded on the HPC worker.
No, it's still not working. I'll submit an issue to the future package.
Many thanks! :)
CC @HenrikBengtsson
Hi,
If I try and run the following code on a Windows laptop through RStudio, there are no issues:
However, if I get an error if I send this across to a HPC/UNIX environment using the following batch file:
The error message I get is as follows:
I assume this is to do with the custom method, but am not sure what is causing it - any help you could give would be great! :)