@txbob, Thanks for the comments. I had actually started by running deviceQuery - but when that failed, I turned to the simpler program defined above. For the record, when running deviceQuery, I get the following output:
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 30
-> unknown error
Result = FAIL
So, not much help there. Given the two potential sources you mentioned, I’ll start w/ your Item #2. As your referenced discussion suggested, I searched optimus Cuda and found some instructions for engaging the Optimus set for Thinkpads. (I was encouraged by this b/c I’m trying to do all this on a Lenovo W700 Thinkpad). The particular instructions were for a Thinkpad W520. However, the problem seems to be that I don’t have an ‘Optimus’ option w/in my BIOS (I can only switch between a PCIe graphics option when ‘docked’ or to use the ‘Internal’ graphics card - but there does not seem to be a way to specify my NVidia GPU over the GPU that is probably attached to the motherboard of the laptop.) So the Optimus route does not seem to work for me. (My W700 is either too old - or I have the wrong BIOS installed to get Optimus functioning…)
As for your Item #1, here’s how I got Cuda 6.5 going on my system (w/ comments on why I did each step):
- Started with a clean operating install of Ubuntu 14.04
- If I try to use any kind of advanced packaging tool (e.g. sudo apt-get install cuda) or even download the cuda 6.5 DEB file, it automatically tries to install Cuda 8.0. So I had to use the ‘distribution-independent package’ install method as follows.
- First, I got the 340.98 Nvidia driver running by doing the following:
sudo apt-get --purge remove nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
- Then go to the ‘Additional Drivers’ app and specifically select the NVidia 340.98 driver and ‘apply changes’ and then reboot.
- Then go to CUDA Toolkit 6.5 | NVIDIA Developer and go to the Linux x86 tab and download the cuda_6.5.14_linux_64.run file (which btw takes at least an hour to download!)
- I then extracted the three *.run files w/in this file by running:
sh cuda_6.5.14_linux_64.run -extract=/home/eric/Downloads/
6a. This creates three *.run files:
cuda-samples-linux-6.5.14-18745345.run
cuda-linux64-rel-6.5.14-18749181.run
NVIDIA-Linux-x86_64-340.29.run
6b. Btw, if instead of 340.98 which I installed above, I try to move forward with the 340.29 driver here, when I try to reboot, I am unable to even log-in and am forced to reinstall the O/S and start over!
7. Make the run files executable and run the Cuda install with:
sudo chmod +x *.run
sudo ./cuda-linux64-rel-6.5.14_18749181.run
8 Then edit the path, etc. variables by editing the /etc/environment file to the following:
PATH="/usr/local/cuda-6.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
LD_LIBRARY_PATH="/usr/local/cuda-6.5/lib64"
- Reboot
- Install the samples and run deviceQuery with the following commands
sudo ./cuda-samples-linux-6.5.14-18745345.run
cd /usr/local/cuda/samples
sudo chown -R eric:eric
cd 1_Utilities/deviceQuery
make
./deviceQuery
- … and upon doing the above, I get the output I gave at the top of this post.
So, unless someone can see a mistake in the process I’ve used above, it appears that Cuda running on my laptop is not able to access the NVidia GPU. Is it just not possible to ‘turn on’ this GPU for Cuda access b/c it’s too old? Or is there some command or process that would allow me to do that? For example, is the BIOS I’m running out of date? How would I find an updated BIOS that could give me Optimus functionality?