-
Notifications
You must be signed in to change notification settings - Fork 26
Build Instructions for Linux
##Dependencies There are essentially three major dependencies that are required:
- OpenCL headers (can be found at Khronos.org)
- An OpenCL SDK specific to your GPU vender (AMD, NVIDIA, Intel, etc.)
- A compiler that supports C++11 (e.g. template aliases)
Note - the package will install if you dependencies 1 & 3 but it will be essentially non-functional. However you will need to install opencl-dev
or ocl-icd-opencl-dev
so you have libOpenCL for the compiler.
The only verified installations at present consisted of using a NVIDIA 970 GTX or a AMD Radeon Graphics Card on a Ubuntu 14.04 system. The installation consisted of: Note, you currently can only have one type installed (NVIDIA or AMD) NVIDIA Driver and CUDA/OpenCL Up-to-date Card
# Install OpenCL headers
sudo apt-get install opencl-headers
####New Card
If you are fortunate enough to have a very recent NVIDIA card that you can use the most recent drivers. This install is quite simple:
# Install NVIDIA Drivers and CUDA
sudo add-apt-repository -y ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-346 nvidia-settings
You can download the .deb
file from NVIDIA here
and install the repository with:
sudo dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb
sudo apt-get update
sudo apt-get install cuda
It is recommended to restart your computer after this installation completes.
####Older Card
If you have an older card that doesn't support the newest drivers then it is more complicated. The following work-flow has proven successful for me on Ubuntu:
- Purge any existing nvidia and cuda implementations (sudo apt-get purge cuda* nvidia-*)
- Download appropriate CUDA toolkit for the specific card. You can figure this out by first checking which NVIDIA driver is compatible with your card by searching for it in NVIDIA's Driver Downloads. Then check which cuda toolkit is compatible with the driver from this Backward Compatibility Table The cuda-6.5 toolkit was appropriate for me which you can download from the CUDA toolkit archive. Once downloaded, run the .run file.
- Reboot computer
- Switch to ttyl (Ctrl-Alt-F1)
- Stop the X server (
sudo stop lightdm
) - Run the cuda run file (
sh cuda_6.5.14_linux_64.run
) - Select 'yes' and accept all defaults
- Required reboot
- Switch to ttyl, stop X server and run the cuda run file again and select 'yes' and default for everything (including the driver again)
- Update
PATH
to include/usr/local/cuda-6.5/bin
andLD_LIBRARY_PATH
to include/usr/local/cuda-6.5/lib64
- Reboot again
If you are using a AMD GPU, the following has proven to work for me on Ubuntu.
#Purge existing fglrx drivers
sudo sh /usr/share/ati/fglrx_uninstall.sh
#Install current fglrx drivers
sudo apt-get install fglrx-updates
#Install opencl-headers
sudo apt-get install opencl-headers
##gpuR package install
Once your driver is installed you can install the gpuR
package.
###Stable Will be posted to CRAN following completion of version 1.0.0 Development
###Unstable
# Dev RViennaCL
devtools::install_github("cdeterman/RViennaCL")
# Dev gpuR
devtools::install_github("cdeterman/gpuR")
Once all these things are set you should be able to install the package and begin using your GPU :)
Please submit additional issues on the issues tab.