Skip to content
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

RD test failure with reduced LAPACK #213

Closed
eddelbuettel opened this issue Mar 29, 2018 · 8 comments
Closed

RD test failure with reduced LAPACK #213

eddelbuettel opened this issue Mar 29, 2018 · 8 comments

Comments

@eddelbuettel
Copy link
Member

@kthohr I get this on R-devel with an embedded LAPACK on Ubuntu 17.10:

--------------------------- 
Test file: /home/edd/git/rcpparmadillo/RcppArmadillo.Rcheck/RcppArmadillo/unitTests/runit.Rlapack.R 
.setUp (before test.Rlapack): ERROR !! 
Error executing .setUp before test.Rlapack : Error in dyn.load("/tmp/Rtmp0RSN4J/sourceCpp-x86_64-pc-linux-gnu-0.12.16/sourcecpp_60e72fa3cfdb/sourceCpp_8.so") : 
  unable to load shared object '/tmp/Rtmp0RSN4J/sourceCpp-x86_64-pc-linux-gnu-0.12.16/sourcecpp_60e72fa3cfdb/sourceCpp_8.so':
  /tmp/Rtmp0RSN4J/sourceCpp-x86_64-pc-linux-gnu-0.12.16/sourcecpp_60e72fa3cfdb/sourceCpp_8.so: undefined symbol: zgbsv_
--------------------------- 

I presume this passed on your macOS box?

@kthohr
Copy link
Contributor

kthohr commented Mar 29, 2018

Hmm... zgbsv is only used with band matrices (and is indeed missing on Rlapack). I will investigate why this is being called by my tests.

And yes passed on my macOS computer (which uses system Lapack).

@kthohr
Copy link
Contributor

kthohr commented Mar 29, 2018

I just ran the tests on a Windows machine with Rlapack and everything passed.

Executing test function test.Rlapack  ...  done successfully.

Just to be clear: that R-devel is linking with Rlapack? If so, the crippled_lapack switch must be missing.

@kthohr
Copy link
Contributor

kthohr commented Mar 29, 2018

I think this is the culprit: https://github.com/RcppCore/RcppArmadillo/blob/master/configure.ac#L85

The crippled_lapack switch needs to be enabled for all Rlapack cases.

@eddelbuettel
Copy link
Member Author

Doh. I think you are spot on.

@kthohr
Copy link
Contributor

kthohr commented Mar 29, 2018

Actually this PR might fix @baptiste 's issue, too.

#207 (comment)

@eddelbuettel
Copy link
Member Author

But only platforms that do not use the embedded Rlapack -- on those he would have to add the lapack routine called by Armadillo in his package to fill-in. Or am I missing something here?

@kthohr
Copy link
Contributor

kthohr commented Mar 29, 2018

From @baptiste 's description, the Linux build on CRAN failed due to a generic solve() call when the inputs were complex-valued. This is also what my unit test was doing.

From my understanding of the Armadillo code, solve() will alternate between different solvers depending on the properties of the input matrices, which includes the band matrix case, but this special case isn't required to return a solution (it's just used to exploit a simplified structure where available). ARMA_CRIPPLED_LAPACK should rule out these routines:

https://github.com/conradsnicta/armadillo-code/blob/unstable/include/armadillo_bits/auxlib_meat.hpp#L3755

My guess is that the configure script saw an R version > 3.3.0 and did not set ARMA_CRIPPLED_LAPACK, so the band matrix routines were not removed.

@baptiste
Copy link

baptiste commented Mar 29, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants