-
Notifications
You must be signed in to change notification settings - Fork 5
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
multicore options #226
Comments
Yeah a bit complicated. I have something very similar implemented here: https://github.com/traitecoevo/APCalign/blob/multicore/R/multicore.R . My impression is that multicore is a bit in flux for the open source community. The older There is a "new" open source way of doing parallel processing on Linux called "openMP" that's apparently a lot more efficient on newer chips. Windows 11 decided to support openMP it but Mac doesn't currently because their CPUs are different. So the newest R packages are all going that way, including the |
I think the key advance is the "shared memory" part: https://en.wikipedia.org/wiki/Shared_memory Which is also key for machine learning computing |
Hi @wcornwell, That's very interesting. I didn't know about OpenMP, sounds great. (nice slide deck here: https://www.bu.edu/tech/files/2017/09/OpenMP_2017Fall.pdf). I looked into the code and it's surprisingly easy to implement. I could easily use this in plant for a big speed up. BUT!!!! The tension with osx is discouraging. (some info here https://mac.r-project.org/openmp/ -> "Warning! Everything described on this page is strictly experimental and not officially supported by CRAN, R-core or R Foundation. In may break at any time. The information is provided in the hope of being useful to some tech-savvy people. It is not intended for the regular R user." ) So yes, let's leave this for now. Code is here in the issue for anyone who wants it. |
A bit worrying about MacOS for scientific computing going forward...maybe should think more about Linux... |
closing for now |
hi! @wcornwell was wondering about multicore options.
Rather than making the package be able to handle multicore processing, which is hard,
It's relatively easy to put a wrapper around the package functions and thereby make it multicore. The code below demonstrates this. It leads to a speed up from 8.511s to 3.3s on a list of 226 names.
I had most success with
parallel
package, but this won't work on windows.I had little success with futures, which should work across platform.
WDYT @wcornwell ? There's less need for this now that we've sped things up a lot. This demo could be added as a vignette for the limited number of possible users who need this?
The text was updated successfully, but these errors were encountered: