UrbanAnalyst / dodgr

Distances on Directed Graphs in R
https://urbananalyst.github.io/dodgr/
128 stars 16 forks source link

RcppParallel update #130

Closed mpadge closed 4 years ago

mpadge commented 4 years ago

Email from Kevin Ushey 17/03/2020

Hello,

This e-mail concerns the release RcppParallel 5.0.0. You are receiving this e-mail because you are maintaining one or more packages on CRAN that depend on the RcppParallel package.

Packages depending on RcppParallel often have issues with ASAN / UBSAN warnings, originating from use of RcppParallel's bundled TBB library (https://software.intel.com/en-us/tbb). Unfortunately, these issues have not been resolved upstream, and I have not been able to resolve these warnings myself as well.

To alleviate this, with RcppParallel 5.0.0, it is now possible to configure the parallel backend used by RcppParallel by setting the RCPP_PARALLEL_BACKEND environment variable. For example:

RCPP_PARALLEL_BACKEND=tbb
RCPP_PARALLEL_BACKEND=tinythread

This explicitly affects the C++ 'parallelFor' and 'parallelReduce' APIs provided by RcppParallel.

To avoid ASAN / UBSAN warnings in future CRAN submissions, it is highly recommended that you call:

Sys.setenv(RCPP_PARALLEL_BACKEND = "tinythread")

before your test suite is run.

If your package explicitly requires TBB-specific functionality, you will likely need to explain this in your submission as you will almost certainly see the aforementioned ASAN / UBSAN errors during testing.

Finally, and most importantly, I hope you and your family are staying safe during the Coronavirus pandemic.

Best, Kevin