"error: cuda kernel compile failed" with cuda 8.0.61 on MacOS X 10.12
Opened this issue · 2 comments
xrobin commented
I'm using R-3.3.3 from MacPorts and cuda 8.0.61 on MacOS X 10.12.
The build succeeds but the package fails to install with the following error:
Error : .onLoad failed in loadNamespace() for 'gputools', details:
call: fun(libname, pkgname)
error:
cuda kernel compile failed
Here is the full transcript of R CMD INSTALL:
xavier@imac-xavier:~/build/gputools$ R CMD INSTALL .
* installing to library ‘/Users/xavier/R/library’
* installing *source* package ‘gputools’ ...
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/clang++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/bin/clang -E
checking for grep that handles long lines and -e... /opt/local/bin/grep
checking for egrep... /opt/local/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking cuda.h usability... yes
checking cuda.h presence... yes
checking for cuda.h... yes
checking nvrtc.h usability... yes
checking nvrtc.h presence... yes
checking for nvrtc.h... yes
checking for library containing cuGetErrorName... -lcuda
checking for library containing cudaMalloc... -lcudart
checking for library containing nvrtcCreateProgram... -lnvrtc
checking for library containing cublasSetMatrix... -lcublas
checking build system type... i386-apple-darwin16.0.0
checking host system type... i386-apple-darwin16.0.0
configure: creating ./config.status
config.status: creating src/Makevars
** libs
make: Nothing to be done for 'all'.
installing to /Users/xavier/R/library/gputools/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Warning in fun(libname, pkgname) :
nvrtc: error: failed to load builtins
Error : .onLoad failed in loadNamespace() for 'gputools', details:
call: fun(libname, pkgname)
error:
cuda kernel compile failed
Error: loading failed
2: stop("loading failed", call. = FALSE)
1: tools:::.test_load_package("gputools", "/Users/xavier/R/library")
ERROR: loading failed
* removing ‘/Users/xavier/R/library/gputools’
* restoring previous ‘/Users/xavier/R/library/gputools’
And the software versions:
xavier@imac-xavier:~/build$ /usr/local/cuda/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:46_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
xavier@imac-xavier:~/build$ R --version
R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin16.0.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.
xrobin commented
In addition I have exported the following environment variables:
export CUDA_HOME=/usr/local/cuda/
export LD_LIBRARY_PATH=/usr/local/cuda/lib
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib
gputools 0.1-1 installs just fine. Version 1.1 gives compiler errors that seem to have been fixed in the github version.
leichtle commented
Same issue for me with R 3.4.0