futuremice on computing cluster #703
-
I'm about to implement a function in R called [futuremice] (https://www.gerkovink.com/miceVignettes/futuremice/Vignette_futuremice.html) (part of the mice package for multiple imputation), which is based on your package future. Before I was running a non-parallelized version of mice, but now I need to run more imputations so I need to speed up the processing. Before I was specifying 12 threads and 10 imputations were taking perhaps 48 hours to run, now I need to trial at least 30 imputations (more if possible). I'm a parallel computing novice and have a few questions so I can write my code correctly:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The UCSF Wynton HPC environment uses Son of Grid Engine (SGE) as the scheduler. SGE job allocations are automatically recognized by Futureverse (via the parallelly package). For example, if you request a multi-core, single-host job using something like: $ qsub -pe smp 42 myscript.sh where parallelly::availableCores() will detect the number of CPU slots that SGE has allocated to your job and return library(future)
plan(multisession, workers = availableCores()) that will spin up 42 parallel R workers in the background, which then are ready to be used by Since library(future)
plan(multisession)
As long as you're sticking to parallelizing on a single machine, use the above
Nope, let
Nope, you can scratch that thought.
I recommend using |
Beta Was this translation helpful? Give feedback.
The UCSF Wynton HPC environment uses Son of Grid Engine (SGE) as the scheduler. SGE job allocations are automatically recognized by Futureverse (via the parallelly package). For example, if you request a multi-core, single-host job using something like:
where
myscript.sh
then runs R, then:will detect the number of CPU slots that SGE has allocated to your job and return
42
. Therefore, if you use:that will spin up 42 parallel R workers in the background, which then are ready to be used by
future_lapply()
,future_map()
, ...Since
workers = availableCores()
is the defaul…