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

R CUDA support in new build structure #17

Closed
peterwittek opened this issue Sep 28, 2015 · 4 comments
Closed

R CUDA support in new build structure #17

peterwittek opened this issue Sep 28, 2015 · 4 comments
Assignees

Comments

@peterwittek
Copy link
Owner

With commit 73abe64, the scripts that were floating around for the R interface were merged to a Makefile target. To build the source distribution for R, just issue make r.

The R directory contains a configure script by default. If we build the module without CUDA, the script just exits and the usual R compilation procedure starts. To build with CUDA, you have to supply a parameter to the R install system:

R CMD INSTALL Rsomoclu_1.5.tar.gz --configure-args=/path/to/cuda

The .so file is built correctly and the module is installed, but the test fails. Please look into this.

@xgdgsc
Copy link
Collaborator

xgdgsc commented Sep 28, 2015

R CMD INSTALL Rsomoclu_1.5.tar.gz --configure-args=/path/to/cuda
doesn' t build for me. After some changes as 250ced3 shows, I still get:

g++ -shared -L/usr/lib64/R/lib -Wl,-O1,--sort-common,--as-needed,-z,relro -o Rsomoclu.so Rsomoclu.o denseCpuKernels.o sparseCpuKernels.o mapDistanceFunctions.o training.o uMatrix.o -I/home/gsc/R/x86_64-unknown-linux-gnu-library/Rcpp/include -DHAVE_R -DCUDA denseGpuKernels.cu.co -lgomp -L/opt/cuda/lib64 -lcudart -lcublas -L/usr/lib64/R/lib -lR
** libs
** arch - 
make -C src all
make[1]: *** src: No such file or directory.  Stop.
Makefile:19: recipe for target 'all' failed
make: *** [all] Error 2
ERROR: compilation failed for package ‘Rsomoclu’

@peterwittek
Copy link
Owner Author

My bad, 56be992 fixes it.

@xgdgsc
Copy link
Collaborator

xgdgsc commented Sep 29, 2015

With 833b0d6, it builds and runs fine in both kernels for me.

@peterwittek
Copy link
Owner Author

I just checked, it works perfectly. Thank you.

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

No branches or pull requests

2 participants