Parallel / Multicore Processing in R for an Integer Program?

こ雲淡風輕ζ 提交于 2019-12-06 14:56:07

问题


Are there any packages specifically to let R run faster via parallel computing? I have made a very large IP that needs to run for a while, so I was wondering if there was a specific package in R that could help me run my IP. Currently, I have a function that returns the solution of an IP and the primary line that R gets stuck on (for a very...very long time) is when I use lp (....all.int = TRUE). My CPU is around 12.5% (8 cores) on my Windows computer, and I want it to near 100

Edit: I tried using the doParallel package,

library('doParallel')
cl <- makeCluster(8)
registerDoParallel(cl)

But my CPU usage is still not at 100%. What else do i need to do? Is there a specific package that makes optimization problems run faster? Most parallel packages help with simulation, and foreach seems to only work for iterative structures/ apply functions. I just want R to use all my CPU usage

来源:https://stackoverflow.com/questions/31868370/parallel-multicore-processing-in-r-for-an-integer-program

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!