futureLapplyHet | R Documentation |
future.apply
configured
for a tasks with heterogenous execution times.The lapply()
function is redefined as as
future.apply::future_lapply()
.
Henrik Bengtsson recommends that the configuration of the parallel/distributed programming environment should be kept outside the package and left to the user. The advantage is that the user may take advantage of all parallel/distributed available backends for the Future API.
futureLapplyHet(pop, EvalGene, lF)
pop |
Population of genes. |
EvalGene |
Function for evaluating a gene. |
lF |
Local function factory which provides
all functions needed in |
This configuration has an increased communication and synchronization overhead.
Fitness vector.
Bengtsson H (2021). “A Unifying Framework for Parallel and Distributed Processing in R using Futures.” The R Journal, 13(2), 208–227. <doi:10.32614/RJ-2021-048>
Other Execution Model:
MClapply()
,
MClapplyHet()
,
PparLapply()
,
PparLapplyHet()
,
futureLapply()
pop<-xegaInitPopulation(30, lFxegaGaGene)
library(future)
plan(multisession, workers=2)
popnew<-futureLapplyHet(pop, lFxegaGaGene$EvalGene, lFxegaGaGene)
plan(sequential)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.