Giter VIP home page Giter VIP logo

gputools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gputools's Issues

install on windows and get this message ERROR: compilation failed for package 'gputools'

I try to install gputools package.
I installed CUDA 8.1 my GPU is GT525M(Laptop).
This my path
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;
C:\Python27;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0;
C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;
C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;
C:\Users\Boobeejung.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;
C:\Program Files\Microsoft SQL Server\120\Tools\Binn;
C:\Program Files\Microsoft SQL Server\130\Tools\Binn;
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
C:\Anaconda2;C:\Anaconda2\Scripts;
C:\Anaconda2\Library\bin;
C:\Program Files\Git\cmd;
D:\OpenCV\opencv\build\x64\vc12\bin;
C:\Program Files\R\R-3.3.1\bin

and I run this command and got this message
R CMD INSTALL --configure-args="
--with-nvcc=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe
--with-r-lib=C:\Users\Boobeejung\Documents\R\win-library\3.3"
C:/Users/Boobeejung/Downloads/gputools_1.0.tar.gz

image

How to solve that

NVRTC - where do I put inst/cuda/kendall.cu?

The latest 1.1 version of GpuTools uses the nvrtc for kendall.cu. Added to the source code distribution is:

inst/cuda/kendall.cu

My question is, if installing gputools completely manually (long story), where do I need to place this file once I have installed the package into R? So my /library/gputools/ directory looks like this:

gputools/DESCRIPTION
gputools/INDEX
gputools/Meta\Rd.rds
gputools/Meta\hsearch.rds
gputools/Meta\links.rds
gputools/Meta\nsInfo.rds
gputools/Meta\package.rds
gputools/NAMESPACE
gputools/NEWS
gputools/R\gputools
gputools/R\gputools.rdb
gputools/R\gputools.rdx
gputools/help\AnIndex
gputools/help\aliases.rds
gputools/help\gputools.rdb
gputools/help\gputools.rdx
gputools/help\paths.rds
gputools/html\00Index.html
gputools/html\R.css
gputools/libs\x64\gputools.so

Within this structure, where do I need to place the "inst/cuda/kendall.cu" directories such that the nvrtc finds them during the nvrtc compile process? Or do I place these directories somewhere else in my linux os?

/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope

In arch linux, I try to install gputools_1.0.tar.gz with R CMD INSTALL --configure-args="--with-nvcc=/opt/cuda/bin/nvcc --with-r-include=/usr/include/R" gputools_1.0.tar.gz but I get the post's title error.

Full Output:

$ R CMD INSTALL --configure-args="--with-nvcc=/opt/cuda/bin/nvcc  --with-r-include=/usr/include/R" gputools_1.0.tar.gz 
* installing to library ‘/home/censored/R/x86_64-pc-linux-gnu-library/3.2’
* installing *source* package ‘gputools’ ...
** package ‘gputools’ successfully unpacked and MD5 sums checked
checking "CUDA compiler"... "using NVCC=/opt/cuda/bin/nvcc"
checking "root of the CUDA install directory"... "environment variable CUDA_HOME not set"
"using CUDA_HOME=/opt/cuda"
checking "location of CUDA libraries"... checking for "/opt/cuda/lib/libcublas.so"... no
checking for "/opt/cuda/lib64/libcublas.so"... yes
checking "R"... "using /usr/lib64/R for the root of the R install directory"
"using /usr/include/R for R header files"
checking for rpath flag style... checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
rpath flag style... gnu
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
configure: creating ./config.status
config.status: creating src/Makefile
** libs
** arch - 
/opt/cuda/bin/nvcc -c -Xcompiler "-fpic -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong" -I. -I"/opt/cuda/include" -I"/usr/include/R" rinterface.cu -o rinterface.o
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
   return (char *) memcpy (__dest, __src, __n) + __n;
                                          ^
Makefile:32: recipe for target 'rinterface.o' failed
make: *** [rinterface.o] Error 1
ERROR: compilation failed for package ‘gputools’
* removing ‘/home/censored/R/x86_64-pc-linux-gnu-library/3.2/gputools’

Is there a hope? :)

WISH: Formal package tests

Hi, thanks for working on this. I should also say that I'm not a user of the package, but I'm interested in HPC for R in general.

I'd like to suggest that you add package tests to your package to increase the confidence in the package. It would be helpful if these would compare the results (ideally near numerically equal) to standard R alternatives, e.g. hclust(). You can probably take several of your example() code and turn the into package tests as a start.

If this package can "promise" numerical similarities to standard solutions, I think it increases the chances for the package to be used as an optional tool, iff supported. Almost like automatic parallel processing via mcapply() et al. with automatic fallback to lapply() when no parallel backend is available.

Just some thoughts. Cheers.

gputools fails R CMD check

While it appears to build and install correctly, the R CMD check fails.
I am building gputools on ubuntu 14.04 using CUDA 6.5 deb packages from nvidia.
makefile is patched to remove arch10 that is not supported anymore.

  • checking compiled code ... NOTE
    Note: information on .o files is not available
    File ‘/usr/local/src/R/gputools.Rcheck/gputools/libs/gputools.so’:
    Found ‘exit’, possibly from ‘exit’ (C)
    Found ‘rand’, possibly from ‘rand’ (C)
    Found ‘srand’, possibly from ‘srand’ (C)

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor the C RNG. The
detected symbols are linked into the code but might come from libraries
and not actually be called.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.

  • checking examples ... ERROR
    Running examples in ‘gputools-Ex.R’ failed
    The error most likely occurred in:

Name: gpuCor

Title: Calculate Various Correlation Coefficients With a GPU

Aliases: gpuCor

** Examples

numAvars <- 5
numBvars <- 10
numSamples <- 30
A <- matrix(runif(numAvars_numSamples), numSamples, numAvars)
B <- matrix(runif(numBvars_numSamples), numSamples, numBvars)
gpuCor(A, B, method="pearson")
Warning in gpuCor(A, B, method = "pearson") :
PMCC function : malloc and memcpy
Error in gpuCor(A, B, method = "pearson") : unknown error
Calls: gpuCor -> .C
Execution halted

Missing Files, MD5 Checksums Errors

As far as I can see, gputools is missing a lot of the files necessary for installation and others do not match up with the MD5 checksums. My installation ends at

configure: creating ./config.status
config.status: creating src/Makefile
config.status: error: cannot find input file: `R/gpuSvm.R.in'

You can check for yourself on the nullsatz/gputools code page. These files are not there in the R directory. Here is a list of the MD5 checksums errors:

noah@noah-Aspire-M5-481TG:~/Downloads$ R CMD INSTALL gputools

  • installing to library ‘/home/noah/R/x86_64-pc-linux-gnu-library/2.15’
  • installing source package ‘gputools’ ...
    files ‘LICENSE’, ‘R/gpuSvm.R.in’, ‘man/gpuSvmPredict.Rd’, ‘man/gpuSvmTrain.Rd’, ‘src/classification.cu’, ‘src/classification.h’ are missing
    files ‘DESCRIPTION’, ‘INSTALL’, ‘NAMESPACE’, ‘NEWS’, ‘R/gpuMatMult.R’, ‘configure’, ‘configure.ac’, ‘man/gpuFastICA.Rd’, ‘man/gpuGlm.Rd’, ‘man/gpuLm.Rd’, ‘man/gpuQr.Rd’, ‘man/gpuSvd.Rd’, ‘src/matmult.cu’, ‘src/matmult.h’, ‘src/rinterface.cu’ have the wrong MD5 checksums

Thank you!

Can't install on Ubuntu 16.04

Probable reason: Looking for R.h in /usr/lib/R/include instead of /usr/share/R/include. After manually adding the symlink, installation works.

Is there any reason you create a Makefile and not a Makevars?

out of memory

I'm getting the following out of memory error
screen shot 2017-11-03 at 8 09 09 pm

Is there a way to increase the available memory?

unknown error with gputools R version 3.1.2 Cuda 6.5, GeFource GTX 750 TI

when I tried to follow this example http://dsnotes.com/blog/2015/06/04/installing-cuda-toolkit-and-gputools/

I received the following :

library(gputools)
N <- 1e3
m <- matrix(sample(100,size = N*N, replace = T), nrow = N)
system.time(gpuDist(m))
Error in gpuDist(m) : unknown error
In addition: Warning message:
In gpuDist(m) : distance function : malloc and memcpy
Timing stopped at: 0.172 0.02 0.364

http://stackoverflow.com/questions/32686664/unknown-error-with-gputools-r-version-3-1-2-cuda-6-5-gefource-gtx-750-ti/32703695#32703695

header files missing - building application

Hi there at gputools. I am trying to rebuild the gputools package so that I can run on a Windows platform. A number of the source files refer to a header file R.h (as I believe is standard practice for writing an interface function between R and C code). The source tar ball from the CRAN site does not include the R.h file and so I am unable to build the application in Visual Studio. Is there a reason that this file no longer exists in the collection of source files?
Additionally in the gpuHclust.R wrapper file there are calls to three C functions Rdistances, Rhcluster and Rdistclust. However these C files also don't appear in the tar ball.
Is it possible to make available a complete collection of source files so that the application can be built from scratch and a package for R running on Windows created?

nvcc fatal : Unknown option 'F/Library/Frameworks/R.framework/..'

R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Platform: x86_64-apple-darwin13.4.0 (64-bit)

Installed gputools_1.0 without problems.
Installing gputools_1.1 immediately thereafter delivered the following error:

/usr/local/cuda/bin/nvcc -shared   -F/Library/Frameworks/R.framework/.. -framework R 
-lpcre -llzma -lbz2 -lz -licucore -lm -liconv  -lpcre -llzma -lbz2 -lz -licucore -lm -liconv 
-lcublas -lnvrtc -lcuda  rinterface.o mi.o sort.o granger.o qrdecomp.o correlation.o 
hcluster.o distance.o matmult.o lsfit.o kendall.o cuseful.o -o gputools.so

nvcc fatal   : Unknown option 'F/Library/Frameworks/R.framework/..'
make: *** [gputools.so] Error 1
ERROR: compilation failed for package ‘gputools’

Obviously, nvcc doesn't recognize the -F option. Is there any resolution for this issue?

GPU Tools does not install from CRAN on CUDA Toolkit 6.5

nvcc from CUDA 6.5 no longer supports compute capability 1.0, therefore installation from CRAN fails: it could not compile it. I had to clone it from github and edit Makefile.
Please add detection of CUDA Toolkit version or remove support of this obsolete compute capability.

Vers. 1.0 - compilation with gcc 4.9.2 (@Fedora 21) crashes : unregognized option '-Wp' !

make

/usr/local/cuda/bin/nvcc -c -Xcompiler "-fpic -I/usr/local/include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" -I. -I"/usr/local/cuda/include" -I"/usr/lib64/R/include" rinterface.cu -o rinterface.o
gcc: error: unrecognized command line option ‘-Wp’
Makefile:32: recipe for target 'rinterface.o' failed

Any hint ?

make: *** [rinterface.o] Error 1, MD5 Checksums Errors, CULA

Installing version 0.28 I came across the following errors:

The MD5 checksums is still wrong.

interface.cu:16:14: fatal error: R.h: No such file or directory ;; make: *** [rinterface.o] Error 1 r

It is saying I don't have CULA, when I have the 64-bit linux version of CULA (well it actually recognizes this, but later finds then prints that I don't have CULA at all).

Thanks for your timely fix on the last bug.

noah@noah-Aspire-M5-481TG:~/Downloads$ R CMD INSTALL gputools-master

  • installing to library ‘/home/noah/R/x86_64-pc-linux-gnu-library/2.15’
  • installing source package ‘gputools’ ...
    files ‘DESCRIPTION’, ‘NEWS’, ‘R/gpuMatMult.R’, ‘configure’, ‘configure.ac’, ‘src/Makefile.in’, ‘src/matmult.cu’, ‘src/matmult.h’, ‘src/rinterface.cu’, ‘src/rinterface.h’ have the wrong MD5 checksums
    configure: checking for critical tools used by configure
    checking "environment variable COMPILER_BINDIR"... "using COMPILER_BINDIR=/opt/cuda/bin"
    checking for /opt/cuda/bin/gcc... yes
    "gcc found in /opt/cuda/bin"
    checking "environment variable CUDA_HOME"... "using CUDA_HOME=/opt/cuda"
    checking "environment variable CULA_HOME"... "using CULA_HOME=/usr/local/cula"
    checking for /opt/cuda/bin/nvcc... yes
    "nvcc found"
    checking "whether this is the 64 bit linux version of CUDA"... checking for /opt/cuda/lib64/libcublas.so... yes
    "yes -- using /opt/cuda/lib64 for CUDA libs"
    ./configure: line 1883: /usr/lib/R: Is a directory
    "using -I/usr/share/R/include for R header files"
    "using -L/usr/lib/R/lib -lR for R shared libraries"
    checking "whether this is the 64 bit version of CULA"... checking for /usr/local/cula/lib64/libcula.so... no
    checking for /usr/local/cula/lib64/libcula.dylib... no
    "no"
    checking "checking whether cula is present at all"... checking for /usr/local/cula/lib/libcula.so... no
    checking for /usr/local/cula/lib/libcula.dylib... no
    "cula is not installed; gpuFastICA is disabled"
    configure: determining host platform
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    configure: creating ./config.status
    config.status: creating src/Makefile
    config.status: creating R/gpuFastICA.R
    config.status: creating R/gpuSvd.R
    ** libs
    ** arch -
    /opt/cuda/bin/nvcc -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -c -I. -I/opt/cuda/include -I"/usr/lib/R/include" --compiler-bindir /opt/cuda/bin -Xcompiler -fpic rinterface.cu -o rinterface.o
    rinterface.cu:16:14: fatal error: R.h: No such file or directory
    compilation terminated.
    make: *** [rinterface.o] Error 1
    ERROR: compilation failed for package ‘gputools’
  • removing ‘/home/noah/R/x86_64-pc-linux-gnu-library/2.15/gputools’

R.h not found

installation on Ubuntu 14.04 tries to use /usr/lib/R/include for the header files, but the header files are under /usr/share/R/include.

A save way of finding the location of header files in R is R CMD config --cppflags, I think.

Can't install on Ubuntu 16.04

The install command:

R CMD INSTALL gputools_1.1.tar.gz

fails with this error:

/usr/bin/ld: cannot find -lpcre
/usr/bin/ld: cannot find -llzma
/usr/bin/ld: cannot find -lbz2
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
Makefile:25: recipe for target 'gputools.so' failed
make: *** [gputools.so] Error 1
ERROR: compilation failed for package 'gputools'

  • removing '/usr/local/src/stats/R-3.4.2/GenuineIntel/library/gputools'

The full install log is attached.

install.log

cannot install on R 3.5.1

When downloading and install from .zip I get:

install.packages("D:/gputools.zip", repos = NULL, type = "win.binary")
Installing package into ‘C:/Users/DELL/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
cannot open compressed file 'gputools/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
install.packages("D:/gputools.zip", repos = NULL, type = "win.binary",lib ='C:\Users\DELL\Documents\R\win-library\3.5')
Error: '\U' used without hex digits in character string starting "'C:\U"
install.packages("D:/gputools.zip", repos = NULL, type = "win.binary",lib ='C:/Users/DELL/Documents/R/win-library/3.5')
Warning in install.packages :
cannot open compressed file 'gputools/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
When using devtools:


install_github('nullsatz/gputools')
Downloading GitHub repo nullsatz/gputools@master
from URL https://api.github.com/repos/nullsatz/gputools/zipball/master
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installing gputools
"C:/PROGRA1/R/R-351.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet
CMD INSTALL
"C:/Users/DELL/AppData/Local/Temp/RtmpaWmhEP/devtoolsd1839887730/nullsatz-gputools-f856299"
--library="C:/Users/DELL/Documents/R/win-library/3.5" --install-tests

  • installing source package 'gputools' ...


    WARNING: this package has a configure script
    It probably needs manual configuration


** libs

*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'gputools'

  • removing 'C:/Users/DELL/Documents/R/win-library/3.5/gputools'
    In R CMD INSTALL
    Installation failed: Command failed (1)

Installation error of using a variable declared with a __device__ modifier directly in the host code

Welcome at  Tue Mar  8 18:22:33 2016
* installing *source* package ‘gputools’ ...
** package ‘gputools’ successfully unpacked and MD5 sums checked
checking "CUDA compiler"... "environment variable NVCC not set"
checking for nvcc... /usr/local/cuda/bin/nvcc
"using NVCC=/usr/local/cuda/bin/nvcc"
checking "root of the CUDA install directory"... "using CUDA_HOME=/usr/local/cuda"
checking "location of CUDA libraries"... checking for "/usr/local/cuda/lib/libcublas.so"... no
checking for "/usr/local/cuda/lib64/libcublas.so"... no
checking for "/usr/local/cuda/lib/libcublas.dylib"... yes
checking "R"... "using /usr/local/Cellar/r/3.2.3_1/R.framework/Resources for the root of the R install directory"
"using /usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include for R header files"
checking for rpath flag style... checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
rpath flag style... llvm
checking build system type... i386-apple-darwin15.3.0
checking host system type... i386-apple-darwin15.3.0
configure: creating ./config.status
config.status: creating src/Makefile
** libs
** arch -
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" rinterface.cu -o rinterface.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" mi.cu -o mi.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" sort.cu -o sort.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" granger.cu -o granger.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" qrdecomp.cu -o qrdecomp.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" correlation.cu -o correlation.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" hcluster.cu -o hcluster.o
hcluster.cu(449): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(457): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(468): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(516): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(517): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(518): warning: a __device__ variable "hcluster_min_val_d" cannot be directly read in a host function

hcluster.cu(518): warning: a __device__ variable "hcluster_min_col_d" cannot be directly read in a host function

hcluster.cu(522): warning: a __device__ variable "hcluster_min_val_d" cannot be directly read in a host function

hcluster.cu(523): warning: a __device__ variable "hcluster_min_col_d" cannot be directly read in a host function

hcluster.cu(523): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(523): warning: a __device__ variable "hcluster_sub_d" cannot be directly read in a host function

hcluster.cu(524): warning: a __device__ variable "hcluster_sup_d" cannot be directly read in a host function

hcluster.cu(524): warning: a __device__ variable "hcluster_merge_val_d" cannot be directly read in a host function

hcluster.cu(530): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(531): warning: a __device__ variable "hcluster_sub_d" cannot be directly read in a host function

hcluster.cu(532): warning: a __device__ variable "hcluster_sup_d" cannot be directly read in a host function

hcluster.cu(532): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(532): warning: a __device__ variable "hcluster_merge_val_d" cannot be directly read in a host function

hcluster.cu(539): warning: a __device__ variable "hcluster_sub_d" cannot be directly read in a host function

hcluster.cu(541): warning: a __device__ variable "hcluster_sup_d" cannot be directly read in a host function

hcluster.cu(543): warning: a __device__ variable "hcluster_merge_val_d" cannot be directly read in a host function

hcluster.cu(548): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(549): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(550): warning: a __device__ variable "hcluster_min_val_d" cannot be directly read in a host function

hcluster.cu(551): warning: a __device__ variable "hcluster_min_col_d" cannot be directly read in a host function

hcluster.cu(552): warning: a __device__ variable "hcluster_sub_d" cannot be directly read in a host function

hcluster.cu(553): warning: a __device__ variable "hcluster_sup_d" cannot be directly read in a host function

hcluster.cu(554): warning: a __device__ variable "hcluster_merge_val_d" cannot be directly read in a host function

hcluster.cu(561): warning: a __device__ variable "hcluster_dist_d" cannot be directly written in a host function

hcluster.cu(579): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(589): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(636): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(637): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(638): warning: a __device__ variable "hcluster_min_val_d" cannot be directly read in a host function

hcluster.cu(638): warning: a __device__ variable "hcluster_min_col_d" cannot be directly read in a host function

hcluster.cu(642): warning: a __device__ variable "hcluster_min_val_d" cannot be directly read in a host function

hcluster.cu(643): warning: a __device__ variable "hcluster_min_col_d" cannot be directly read in a host function

hcluster.cu(643): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(643): warning: a __device__ variable "hcluster_sub_d" cannot be directly read in a host function

hcluster.cu(644): warning: a __device__ variable "hcluster_sup_d" cannot be directly read in a host function

hcluster.cu(644): warning: a __device__ variable "hcluster_merge_val_d" cannot be directly read in a host function

hcluster.cu(650): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(651): warning: a __device__ variable "hcluster_sub_d" cannot be directly read in a host function

hcluster.cu(652): warning: a __device__ variable "hcluster_sup_d" cannot be directly read in a host function

hcluster.cu(652): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(652): warning: a __device__ variable "hcluster_merge_val_d" cannot be directly read in a host function

hcluster.cu(659): warning: a __device__ variable "hcluster_sub_d" cannot be directly read in a host function

hcluster.cu(661): warning: a __device__ variable "hcluster_sup_d" cannot be directly read in a host function

hcluster.cu(663): warning: a __device__ variable "hcluster_merge_val_d" cannot be directly read in a host function

hcluster.cu(668): warning: a __device__ variable "hcluster_dist_d" cannot be directly read in a host function

hcluster.cu(669): warning: a __device__ variable "hcluster_count_d" cannot be directly read in a host function

hcluster.cu(670): warning: a __device__ variable "hcluster_min_val_d" cannot be directly read in a host function

hcluster.cu(671): warning: a __device__ variable "hcluster_min_col_d" cannot be directly read in a host function

hcluster.cu(672): warning: a __device__ variable "hcluster_sub_d" cannot be directly read in a host function

hcluster.cu(673): warning: a __device__ variable "hcluster_sup_d" cannot be directly read in a host function

hcluster.cu(674): warning: a __device__ variable "hcluster_merge_val_d" cannot be directly read in a host function

/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" distance.cu -o distance.o
distance.cu(829): warning: a __constant__ variable "distance_vg_a_d" cannot be directly read in a host function

distance.cu(837): warning: a __constant__ variable "distance_vg_a_d" cannot be directly read in a host function

distance.cu(838): warning: a __constant__ variable "distance_vg_a_d" cannot be directly read in a host function

distance.cu(838): warning: a __device__ variable "distance_d_d" cannot be directly read in a host function

distance.cu(843): warning: a __constant__ variable "distance_vg_b_d" cannot be directly read in a host function

distance.cu(848): warning: a __constant__ variable "distance_vg_a_d" cannot be directly read in a host function

distance.cu(848): warning: a __constant__ variable "distance_vg_b_d" cannot be directly read in a host function

distance.cu(849): warning: a __device__ variable "distance_d_d" cannot be directly read in a host function

distance.cu(853): warning: a __device__ variable "distance_d_d" cannot be directly read in a host function

distance.cu(858): warning: a __constant__ variable "distance_vg_a_d" cannot be directly read in a host function

distance.cu(859): warning: a __constant__ variable "distance_vg_b_d" cannot be directly read in a host function

distance.cu(860): warning: a __device__ variable "distance_d_d" cannot be directly read in a host function

/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" matmult.cu -o matmult.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" lsfit.cu -o lsfit.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" kendall.cu -o kendall.o
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fPIC -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -g -O2" -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.2.3_1/R.framework/Resources/include" cuseful.cu -o cuseful.o
d/usr/local/cuda/bin/nvcc -shared -Xlinker -rpath,"/usr/local/cuda/lib" -Xlinker "-L/usr/local/opt/openblas/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/usr/local/lib  -F/usr/local/Cellar/r/3.2.3_1/R.framework/.. -framework R -lpcre -llzma -lbz2 -lz -lm -liconv -licuuc -licui18n" -L"/usr/local/cuda/lib" -lcublas  rinterface.o mi.o sort.o granger.o qrdecomp.o correlation.o hcluster.o distance.o matmult.o lsfit.o kendall.o cuseful.o -o gputools.so
ld: library not found for -licuuc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [gputools.so] Error 1
ERROR: compilation failed for package ‘gputools’
* removing ‘../R/library/gputools’

The downloaded source packages are in
    ‘../RtmpJYFHbo/downloaded_packages’
Warning message:
In install.packages("gputools") :
  installation of package ‘gputools’ had non-zero exit status

They're mainly within this file, hcluster.cu.
and caused by these codes:

cudaMalloc((void**)&hcluster_count_d, n * sizeof(float));
    cudaMalloc((void**)&hcluster_min_val_d, n * sizeof(float));
    cudaMalloc((void**)&hcluster_min_col_d, n * sizeof(size_t));
    cudaMalloc((void**)&hcluster_sub_d, (n - 1) * sizeof(int));
    cudaMalloc((void**)&hcluster_sup_d, (n - 1) * sizeof(int));
    cudaMalloc((void**)&hcluster_merge_val_d, (n - 1) * sizeof(float));

This page may be helpful to you, since I have little knowledge about C/CPP/CudaC currently.

Error in .C("RgpuLSFit", Package = "gputools", qr = qr, n = as.integer(ngoodobs), : argument 16 is empty.

Dear Josh,
Running the gpuGlm examples (both) from the gputools package I run into the quoted error.

Error in .C("RgpuLSFit", Package = "gputools", qr = qr, n = as.integer(ngoodobs), : argument 16 is empty.

My system:

R 3.4.0
Debian stretch
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so
gputools_1.2
rJava_0.9-8

(as given by sessionInfo)

Other examples (e.g. gpuLm, or gpuLsfit) work fine.

Many thanks for your support!

"error: cuda kernel compile failed" with cuda 8.0.61 on MacOS X 10.12

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/.

Issue installing gputools on a linux machine with Geforce GT 720

Hello,
I am trying to install gputools (version published on CRAN on 2015-11-11), and I got the error I show below. I have a linux machine with Ubuntu 14.04 and a GEFORCE GT 720 graphics card running Revolution R Open. I look for similar issues but it seems that the structure of the make files changed and I don knoew where to modify the gencode.

/usr/local/cuda/bin/nvcc -gencode arch=compute_10,code=sm_10 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -c -I. -I"/usr/local/cuda/include" -I"/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/include" -Xcompiler -fpic rinterface.cu -o rinterface.o
nvcc fatal : Unsupported gpu architecture 'compute_10'
make: *** [rinterface.o] Error 1
ERROR: compilation failed for package ‘gputools’

  • removing ‘/home/marcelo/R/x86_64-pc-linux-gnu-library/3.2/gputools’

Thanks,
Marcelo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.