Skip to content

Error: there is no package called ‘doFuture’ when run on cluster #489

@KatieBuc

Description

@KatieBuc

Hello,

I am running an r script which works locally, looks like:

library(foreach)
library(parallel)
library(doFuture)
...
doFuture::registerDoFuture()
cl <- parallel::makeCluster(10)
plan(cluster, workers = cl)
...
utility <- foreach(i = 1:5, .combine = c, .packages = c("SSN", "SSNdesign", "mvtnorm", "doFuture", "parallel")) %dopar% {
...}

Which works fine locally but when run on the cluster gives,

Error: there is no package called ‘doFuture’

only after the foreach is called, not on the library import.

I've tried various other calls like

#cl <- parallel::makeCluster(10, libs = .libPaths('//home//n10907700//packages'))
#cl <- future::makeClusterPSOCK(1L, verbose=TRUE)
#cl <- parallel::makeCluster(1L, rscript=file.path(R.home("bin"), "Rscript"))

and also

#plan(cluster, workers = cl, rscript_libs = .libPaths('//home//n10907700//packages'))

same error... when I tried running sequentially on the cluster it works

plan(sequential)

So I'm thinking it's a futures framework thing?

Here's some more info

sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: SUSE Linux Enterprise Server 12 SP5
Matrix products: default
BLAS/LAPACK: /pkg/suse12/software/OpenBLAS/0.3.7-GCC-8.3.0/lib/libopenblas_haswellp-r0.3.7.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.2

also,

print(.libPaths())
[1] "/home/n10907700/packages"
[2] "/pkg/suse12/software/R/3.6.2-foss-2019b/lib64/R/library"
print(find.package("doFuture"))
[1] "/home/n10907700/packages/doFuture"

and

R.home()
[1] "/pkg/suse12/software/R/3.6.2-foss-2019b/lib64/R"
parallel::clusterEvalQ(cl, R.home())
[[1]]
[1] "/pkg/suse12/software/R/3.6.2-foss-2019b/lib64/R"
[[2]]
[1] "/pkg/suse12/software/R/3.6.2-foss-2019b/lib64/R"
[[3]]
[1] "/pkg/suse12/software/R/3.6.2-foss-2019b/lib64/R"
...

Any ideas? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions