-
Notifications
You must be signed in to change notification settings - Fork 25
Create recipe for oneTBB #78
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
base: master
Are you sure you want to change the base?
Conversation
|
@kbenoit unfortunately, oneTBB is not safe to use as static library, because they do not manage global state correctly. Could you use header-only concurrency implementation instead? For posterity - here is the updated recipes, but for reasons above we don't want to include it. |
|
Also any chance you could use |
|
The development version of RcppParallel has TBB 2022 according NEWS. On Windows, however, it uses TBB in Rtools just like we are doing. I (and probably RcppParallel developers) wish CRAN to have TBB header for Mac in a similar manner. https://github.com/RcppCore/RcppParallel/blob/master/NEWS.md |
|
Relatedly -- I'd like to get a new version of RcppParallel to CRAN, but doing so while also avoiding ABI breakage in existing R packages has proven challenging, as older versions of RcppParallel linked to some components of TBB directly. This issue has been rectified in the most recent RcppParallel release, so I'm planning to submit a new version of RcppParallel (with a new version of TBB) sometime after packages have been rebuilt against the new RcppParallel. |
|
quanteda was one of the packages that directly call TBB components in RcppParallel such as |
|
Just to be clear:
Therefore there are only two options:
|
|
Thank you for explaining. Now I understand why I could not compile our package with oneTBB headers. I agree that RcppParallel is the best package to have oneTBB. I hope @kevinushey and other to allow us to use its components directly. |
|
@kevinushey Do you think you can get |
|
I'm happy to do that, but the main challenge is dealing with ABI breakages when new versions of RcppParallel are released with new versions of TBB (for packages which depend on TBB directly, rather than via RcppParallel APIs). As an example, and so existing installations of Just to confirm this is true, here's what I see if I try to use a version of stringfish that was built against RcppParallel 5.1.11-1 (current CRAN release) but with the development version of RcppParallel installed: Some recent changes in the development version of RcppParallel have it statically linking to TBB; we'll need to consider if that's really safe to do. IIRC this was requested by Tomas as well, so that RcppParallel could use the version of TBB provided by Rtools. |
|
@kevinushey This happens occasionally (e.g. Matrix was changing its ABI) - you just have to synchronize with CRAN to make sure we re-build the binaries in that case (Uwe+I). (When you write to CRAN, please always CC me). |
|
@kevinushey Re static linking - it is not safe, I'd much rather that |
Add TBB (onetbb), needed for the quanteda package that uses these to build parallelism into the binary. Without it, the Mac build is single-threaded only.