ecmerkle/blavaan

use of parallel computing

ecmerkle opened this issue · 3 comments

For mac & linux users, mclapply() is used once or twice during post-estimation computations (like in postpred()). Give the user an option to turn off parallelization in case there is some problem with parallelization (use lapply() instead).

@ecmerkle consider switching the parallelization control over to future using multiprocess plan architecture. If parallelization isn't possible, future will automatically drop down to sequential evaluation.

Thanks, will check this out. This looks like it could also provide a solution for windows users, who currently do not have a parallelization option for some of the blavaan computations.

Just switch to future.apply::future_lapply() and just set future::plan() outside of blavaan library. That’s useful to who want to use MPI or HPC computing with blavaan.