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              
> 



_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to