2

I am trying to run a function that uses BiocParallel and RcppArmadillo. The function runs to 50% completion but then throws the error:

Error: BiocParallel errors
  element index: 1
  first error: Mat::init(): requested size is too large; suggest to enable ARMA_64BIT_WORD

I have tried to troubleshoot using:

  1. Large Matrices in RcppArmadillo via the ARMA_64BIT_WORD define
  2. Handling extremely large and sparse matrices in RcppArmadillo
  3. https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/

And, I have also tried adding the line #define ARMA_64BIT_WORD 1 to /Library/Frameworks/R.framework/Resources/library/RcppArmadillo/include/RcppArmadilloConfig.h as the comments say:

// Under C++11 and C++14, Armadillo now defaults to using int64_t for
// integers.  This prevents us from passing integer vectors to R as
// only used int32_t -- so we select the shorter representation here.
// Unless int64_t is explicitly required during compilation.

However, so far none of these solutions have worked. Is there any solution for this problem?

Any help would be greatly appreciated!

P.S.

R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.2.3
gcc: stable 11.2.0
RcppArmadillo_0.10.7.0.0
OLC
  • 21
  • 1
  • Welcome to StackOverflow. It might help us to help you if you could create a [small reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) as right now I am not too sure what you did, or didn't, do. – Dirk Eddelbuettel Nov 03 '21 at 15:31
  • Were you ever able to solve this? – stackErr Mar 06 '23 at 11:36

0 Answers0