[Rcpp-devel] failed to compile code on the server with simple operations on matrices with type fmat {RcppArmadillo}
Yue Li
gorillayue at gmail.com
Wed Jun 3 05:11:27 CEST 2015
Dear List,
I’m having an issue with compiling Rcpp code using ‘fmat’ matrix type on the server (Linux distro:
CentOS release 5.11 (Final)) and wondering if someone has a quick fix.
Basically, the following code works fine on my Macbook (R 3.2) but not on the server (Run/sessionInfo pasted).
Any help would be greatly appreciated!
Many thanks,
Yue
Code (test_fmat.cpp):
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
// we only include RcppArmadillo.h which pulls Rcpp.h in for us
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo, BH, bigmemory)]]
using namespace Rcpp;
using namespace arma;
// [[Rcpp::export]]
fmat fmatMultiply(fmat x, fmat y)
{
fmat ans = x * y;
return ans;
}
In R:
> sourceCpp('test_fmat.cpp')
Error in dyn.load("/tmp/RtmpGGitfL/sourcecpp_20827ca6cab1/sourceCpp_99301.so") :
unable to load shared object '/tmp/RtmpGGitfL/sourcecpp_20827ca6cab1/sourceCpp_99301.so':
/tmp/RtmpGGitfL/sourcecpp_20827ca6cab1/sourceCpp_99301.so: undefined symbol: sgemm_
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_0.11.3
loaded via a namespace (and not attached):
[1] BH_1.54.0-4 RcppArmadillo_0.4.450.1.0
[3] bigmemory_4.5.1 bigmemory.sri_0.1.3
[5] tools_3.1.0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150602/3fc8c42a/attachment-0001.html>
More information about the Rcpp-devel
mailing list