Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVIDIA GPU ViennaCL fatal error (Windows 10) #145

Open
CodeSmith92 opened this issue Dec 10, 2018 · 10 comments
Open

NVIDIA GPU ViennaCL fatal error (Windows 10) #145

CodeSmith92 opened this issue Dec 10, 2018 · 10 comments

Comments

@CodeSmith92
Copy link

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 [email protected] 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
    *** arch - x64
    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 [email protected] 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 for 'i386', 'x64'
  • removing 'H:/My Documents/R/win-library/3.5/gpuR'
    In R CMD INSTALL
    Warning in install.packages :
    installation of package ‘gpuR’ had non-zero exit status

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
Copy link
Owner

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

@CodeSmith92
Copy link
Author

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

@cdeterman
Copy link
Owner

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
Copy link
Author

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 [email protected] 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
    *** arch - x64
    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 [email protected] 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 for 'i386', 'x64'
  • removing 'H:/My Documents/R/win-library/3.5/gpuR'
    In R CMD INSTALL
    Error in i.p(...) :
    (converted from warning) installation of package ‘C:/Users/dcorrell/AppData/Local/Temp/Rtmp63f9Ev/file1db84d2342fe/gpuR_2.0.3.tar.gz’ had non-zero exit status
    In addition: Warning messages:
    1: In untar2(tarfile, files, list, exdir) :
    skipping pax global extended headers
    2: In untar2(tarfile, files, list, exdir) :
    skipping pax global extended headers

@cdeterman
Copy link
Owner

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

@znmeb
Copy link

znmeb commented Dec 20, 2018

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
Copy link
Owner

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

@gabrielodom
Copy link

gabrielodom commented Feb 27, 2020

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 [email protected] 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
Copy link

namanpaul commented May 22, 2020

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 [email protected] 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
  • Operating System: Windows 10, 64-bit
  • Which OpenCL implementation: NVIDIA
  • ViennaCL version: 1.7.1

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
Copy link

egoipse commented Aug 6, 2024

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 [email protected] 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   

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants