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:
- Large Matrices in RcppArmadillo via the ARMA_64BIT_WORD define
- Handling extremely large and sparse matrices in RcppArmadillo
- 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