Error: BLAS/LAPACK routine 'magma_' gave error code -7
Posted: Thu Aug 22, 2013 2:37 pm
I was trying to run some MAGMA code in R. It works, but for matrices with many columns I get the following error message:
I attached my .cpp file with my code, because the forum flagged it as spam and denied my message. I compile the .cpp in R and run the function using:
I think that something is wrong with the lwork variable, but I am not sure. FIY, the magma_dgeqrf function in the testing folder works perfectly. Does anybody have an idea? Thanks a lot!
Code: Select all
Error: BLAS/LAPACK routine 'magma_' gave error code -7
Code: Select all
library(Rcpp)
PKG_LIBS <- sprintf('-Wl,-rpath,/usr/local/magma/lib -L/usr/local/magma/lib -lmagma /usr/local/magma/lib/libmagma.a -Wl,-rpath,/usr/local/cuda-5.5/lib64 %s', Rcpp:::RcppLdFlags())
PKG_CPPFLAGS <- sprintf('-DADD_ -DHAVE_CUBLAS -I/usr/local/magma/include -I/usr/local/cuda-5.5/include %s', Rcpp:::RcppCxxFlags())
Sys.setenv(PKG_LIBS = PKG_LIBS , PKG_CPPFLAGS = PKG_CPPFLAGS)
R <- file.path(R.home(component = 'bin'), 'R')
file <- '/home/christian/Dropbox/MAGMA/gpuQR_magma.cpp'
cmd <- sprintf('%s CMD SHLIB %s', R, paste(file, collapse = ' '))
system(cmd)
dyn.load('/home/christian/Dropbox/MAGMA/gpuQR_magma.so')
set.seed(100)
n_row <- 1000
n_col <- 1000
A <- matrix(rnorm(n_row * n_col), n_row, n_col)
res <- .Call('gpuQR_Rcpp', c(A), n_row, n_col)