cdeterman / gpuR

R interface to use GPU's
241 stars 26 forks source link

NVIDIA GPU ViennaCL fatal error (Windows 10) #145

Open CodeSmith92 opened 5 years ago

CodeSmith92 commented 5 years ago

Hi,

I've been trying (and failing) to download gpuR from Rstudio. I have the most recent versions of R and R-tools. And I set the environmental variables as such:

Sys.setenv(OPENCL_LIB64 = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/lib/x64") Sys.setenv(OPENCL_INC = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/include") Sys.setenv(CUDA_HOME="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0") Sys.setenv(PATH=paste(Sys.getenv("PATH"), "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin", sep = ":"))

However, I keep getting the following error message at the very end of the download:

Error: package or namespace load failed for 'gpuR': .onAttach failed in attachNamespace() for 'gpuR', details: call: initContexts() error: ViennaCL: FATAL ERROR: ViennaCL encountered an unknown OpenCL error. Most likely your OpenCL SDK or driver is not installed properly. In some cases, this error is due to an invalid global work size or several kernel compilation errors. If you think that this is a bug in ViennaCL, please report it at viennacl-support@lists.sourceforge.net and supply at least the following information:


Do you have any idea what's going wrong here? From what I've checked, the SDK was properly downloaded, and the NVIDIA drivers are up to date. Is the CUDA_HOME variable maybe set improperly? Any help would be greatly appreciated!

Thank you!

cdeterman commented 5 years ago

Is this the CRAN release or the develop version from this repository?

CodeSmith92 commented 5 years ago

It's the CRAN release using install.packages('gpuR')

cdeterman commented 5 years ago

Please try installing the develop version with the following

devtools::install_github('cdeterman', ref = 'develop')

I have made some updates in this branch that may address the issue. I want to confirm if it is still a problem here. Thanks.

CodeSmith92 commented 5 years ago

I got the same error. Here's the end of the configuration output (please let me know if you need to see the whole output):

Rd warning: C:/Users/dcorrell/AppData/Local/Temp/RtmpSc5dzi/R.INSTALL1804790825f7/gpuR/man/pmax.Rd:21: file link 'pmax' in package 'base' does not exist and so has been treated as a topic Rd warning: C:/Users/dcorrell/AppData/Local/Temp/RtmpSc5dzi/R.INSTALL1804790825f7/gpuR/man/pmax.Rd:21: file link 'pmin' in package 'base' does not exist and so has been treated as a topic pmin.vclVector html
pocl_check html
print.gpuMatrix html
qr-methods html
qr.R-methods html
Rd warning: C:/Users/dcorrell/AppData/Local/Temp/RtmpSc5dzi/R.INSTALL1804790825f7/gpuR/man/qr.R-methods.Rd:26: file link 'qr.R' in package 'base' does not exist and so has been treated as a topic Rd warning: C:/Users/dcorrell/AppData/Local/Temp/RtmpSc5dzi/R.INSTALL1804790825f7/gpuR/man/qr.R-methods.Rd:26: file link 'qr.Q' in package 'base' does not exist and so has been treated as a topic setContext html
set_device_context html
setup_opencl html
solve-methods html
svd-methods html
synchronize html
t-methods html
typeof-gpuR-methods html
vclMatrix-class html
vclMatrix-crossprod html
vclMatrix-methods html
vclMatrix.colSums html
vclVector-class html
vclVector-methods html
zgpuMatrix-class html
zvclMatrix-class html
building package indices installing vignettes ** testing if installed package can be loaded *** arch - i386 Error: package or namespace load failed for 'gpuR': .onAttach failed in attachNamespace() for 'gpuR', details: call: initContexts() error: ViennaCL: FATAL ERROR: ViennaCL encountered an unknown OpenCL error. Most likely your OpenCL SDK or driver is not installed properly. In some cases, this error is due to an invalid global work size or several kernel compilation errors. If you think that this is a bug in ViennaCL, please report it at viennacl-support@lists.sourceforge.net and supply at least the following information:

cdeterman commented 5 years ago

@SmittyD-92 what is your Windows 10 version? I wonder if this is related to the issue #144.

znmeb commented 5 years ago

I got the same error on Arch Linux, so it's probably not Windows-related. It went away when I installed all the NVidia and OpenCL packages on Arch. Here's the list; it's probably similar for other distros:

  clinfo \
  clpeak-git \
  compute-runtime-bin \
  cuda \
  cudnn \
  nvidia \
  nvidia-settings \
  opencl-headers \
  opencl-nvidia \
  pocl \

Notes:

  1. This is an HP Omen dual-booted Windows 10 Pro and Arch Linux. The GPU is an NVidia 1050Ti.
  2. compute-runtime-bin is the Intel OpenCL driver for the Intel GPU. So, including pocl I have three OpenCL devices in Arch.
cdeterman commented 5 years ago

@SmittyD-92 did any of the information by @znmeb help? Is something perhaps missing in your installation?

gabrielodom commented 4 years ago

Similar issue here: I was able to install gpuR on one windows machine (windows 7) and one mac, but could not install on a second windows machine (windows 10, v1903, OS build 18362.657; NVIDIA Quadro P2000) from either CRAN or GitHub (devel version; not to nitpick, but the devtools code above is missing the repo). Messages:

Error: package or namespace load failed for 'gpuR': .onAttach failed in attachNamespace() for 'gpuR', details: call: initContexts() error: ViennaCL: FATAL ERROR: ViennaCL encountered an unknown OpenCL error. Most likely your OpenCL SDK or driver is not installed properly. In some cases, this error is due to an invalid global work size or several kernel compilation errors. If you think that this is a bug in ViennaCL, please report it at viennacl-support@lists.sourceforge.net and supply at least the following information:

  • Operating System
  • Which OpenCL implementation (AMD, NVIDIA, etc.)
  • ViennaCL version Many thanks in advance! Error: loading failed Execution halted ERROR: loading failed
  • removing 'C:/Users/godom/Documents/R/win-library/3.6/gpuR' Warning in install.packages : installation of package ‘gpuR’ had non-zero exit status

Per reading through Issue #49, I have Rtools 35 installed. I've installed the GitHub version of RViennaCL. I've re-installed both curl and httr.

As a note, I originally had R 3.6.1, and the package install wouldn't even get past the C++/Fortran message. After I upgraded to R 3.6.2, I was able to get past that issue to this ViennaCL one.

namanpaul commented 4 years ago

Hi, I am encountering a similar error message while installation:


** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'gpuR':
 .onAttach failed in attachNamespace() for 'gpuR', details:
  call: initContexts()
  error: ViennaCL: FATAL ERROR: ViennaCL encountered an unknown OpenCL error. Most likely your OpenCL SDK or driver is not installed properly. In some cases, this error is due to an invalid global work size or several kernel compilation errors.
If you think that this is a bug in ViennaCL, please report it at viennacl-support@lists.sourceforge.net and supply at least the following information:
 * Operating System
 * Which OpenCL implementation (AMD, NVIDIA, etc.)
 * ViennaCL version
Many thanks in advance!
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'C:/Users/naman/OneDrive/Documents/R/win-library/3.6/gpuR'
Warning in install.packages :
  installation of package ‘gpuR’ had non-zero exit status

Any help would be much appreciated!

Additionally I was unable to install the git version of gpuR. Error in utils::download.file(url, path, method = method, quiet = quiet, : cannot open URL 'https://api.github.com/repos/cdeterman/gpuR/tarball/develop'

egoipse commented 2 months ago

Any news about this issue? I got the same error:

Error: package or namespace load failed for ‘gpuR’:
 .onAttach falló en attachNamespace() para 'gpuR', detalles:
  llamada: NULL
  error: ViennaCL: FATAL ERROR: ViennaCL encountered an unknown OpenCL error. Most likely your OpenCL SDK or driver is not installed properly. In some cases, this error is due to an invalid global work size or several kernel compilation errors.
If you think that this is a bug in ViennaCL, please report it at viennacl-support@lists.sourceforge.net and supply at least the following information:
 * Operating System
 * Which OpenCL implementation (AMD, NVIDIA, etc.)
 * ViennaCL version
Many thanks in advance!
Error: loading failed
Ejecución interrumpida

SessionInfo:


R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Debian GNU/Linux 12 (bookworm)

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0

locale:
 [1] LC_CTYPE=es_CL.UTF-8       LC_NUMERIC=C               LC_TIME=es_CL.UTF-8        LC_COLLATE=es_CL.UTF-8    
 [5] LC_MONETARY=es_CL.UTF-8    LC_MESSAGES=es_CL.UTF-8    LC_PAPER=es_CL.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=es_CL.UTF-8 LC_IDENTIFICATION=C       

time zone: America/Santiago
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.4.1 cli_3.6.3      jsonlite_1.8.8 rlang_1.1.4