New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing future.apply::future_*apply for massively large model via remote parallelisation #136
Conversation
…ply for massively large model via remote parallelisation
I'll consider this, but the case to make the merge doesn't seem that great in that it's almost overkill. The parallel processing may work better over the |
Yes, This commit may head up to overkill the speed up. Implementing after future_*apply functions, I may commit parallelised C++ codes (RcppParallel) and GPU matrix calculations (gpuR) in the parallelised cluster, the heterogeneous computing environment. This commit is just starting point with the performance improvements. I understand the calibration speed issue around mirt() a long time. I'll keep updating this commits steady. I want to listen to your opinion. Future Plan
※ I'm a user of https://www.top500.org/system/177987 now. |
I expect the future_*apply will make a way to parallelise the E step and M step inter- and intra-machines with refactoring codes. That's why I commit the future_*apply first with head up. |
(This work may require modifying some calibration part codes even the gpuR is the wrapper of OpenCL support in R environment!)
I want to implement OpenCL support via future_*apply: less effort but maximising efficiency and speed. So I made a placeholder for OpenCL support via The Short documentation of OpenCL support in R: |
Parallelizing the E and M-steps would take a fairly large amount of code rewriting. As it stands, the E-step could be rewritten partially to use OpenMP, but it's computations are not strictly parallel (at least not embarrassingly) because the expectation table must be shared across nodes, causing write-permission conflicts. I experimented with this idea a while back, but gave up on it when the performance was not working due to all the These are, what some would consider, the major limitation of |
(Lists can parallelise without future_*apply where the for loop)
Yes, I saw the parts what you noted. I agree with you. In the current, it seems too hard to improve C++ level with refactoring. I already know |
How about implementing this in the C++ level? http://viennacl.sourceforge.net/viennacl-about.html |
I'm going to close this for now as I just don't see the benefit to it in this package. Something like this should be applied to a fork of |
Implementing the "future_*apply" API for massively large model via remote parallelisation.
myLapply()
andmySapply()
internally especially model is too massive. (myApply()
will update soon.)itemfit()
,mdirt()
,DIF()
,DTF()
,M2()
,PLCI.mirt()
,lagrange()
,boot.LR()
, and https://github.com/philchalmers/mirt/blob/master/R/03-estimation.R#L729-L740 may run faster or work memory efficient when working with the massively big model with remote clusters.future::future()
supports the MPI interface in the someday (see How to implement resolved() for an MPI-based cluster? HenrikBengtsson/future#130), Themirt()
may run on the supercomputer cluster onapply()
related functions.future()
will be run in themultiprocess
manner within each remote workers, detecting the available number of cores automatically for the heterogeneous cluster.Demo run
future
API was increasing calibration speeds thanparallel
about 7.706 seconds. This difference occurs frommultiprocess
strategy in each connection by automatic detection of the number of cores. If expanding bandwidth, speed will increase more. (e.g. Infiniband: https://en.wikipedia.org/wiki/InfiniBand)future_apply()
someday, remote calibration works will faster than now.Please check my request feel free.
Best,
Seongho