mcmapply stalls with Rcpp/Armadillo function using openMP
I have issues with mcmapply that only occures if an Rcpp-function, testfun(), is first called outside mcmapply and then called through mcmapply. The issue only exists if: testfun() uses openMP mcmapply uses parallelization (mc.cores>1) If I call mcmapply with testfun(), it runs and finishes without errors. If I first call testfun() separately and afterwards mcmapply, then mcmapply stalls. MWE: Rcpp::sourceCpp(code= " #include <RcppArmadillo.h>; // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] void testfun(int n) { arma::mat foo = arma::sqrt(arma::zeros(n,n)); }") library(parallel) print
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.