cublas

Hello

I think that my version of R, which is compiled with openBLAS, is having trouble recognizing the cublas


Here is my subroutine

subroutine blah(x,istat)
!DEC$ ATTRIBUTES DLLEXPORT :: blah
  use cublas
  use cudafor

  implicit none
  integer, parameter :: m = 3, n = 5, k = 2
  integer :: i,j
  real :: x
  real :: a(m,k) = reshape((/1.3,3.6,3.05,2.5,-2.0,-0.03/),(/m,k/))
real :: b(k,n) = reshape((/2.0,12.4,-0.2,2.7,3.4,-7.1,38.9,1.2,23.9,2.4/),(/k,n/))
real :: c(m,n) = 0.0, c_blas(m,n) = 0.0

  real, device :: a_d(m,k), b_d(k,n), c_d(m,n)
  real, parameter :: alpha = 1.0, beta = 0.0
  integer :: lda = m, ldb = k, ldc = m
  integer :: istat

 
  a_d = a; b_d = b; c_d = c
  istat = 0
!  istat = istat + cublasInit()
  call cublasSgemm('n','n',m,n,k, &
       alpha,a_d,lda,b_d,ldb,beta,c_d,ldc)

  c = c_d


x = 4.0
end subroutine blah