如果两个GPU卡都不接显示器,则要注意把GPU卡的驱动手动加载,具体可参阅下面的shell程序。
From the releasenotes:
----------------------------------------
Linux
----------------------------------------
* In order to run CUDA applications, the CUDA module must be loaded and the
entries in /dev created. This may be achieved by initializing X Windows, or
by creating a script to load the kernel module and create the entries. An
example script (to be run at boot time):
#!/bin/bash
/sbin/modprobe nvidia
if [ "$?" -eq 0 ]; then
# Count the number of NVIDIA controllers found.
N3D=`/sbin/lspci | grep -i NVIDIA | grep "3D controller" | wc -l`
NVGA=`/sbin/lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l`
N=`expr $N3D + $NVGA - 1`
for i in `seq 0 $N`; do
mknod -m 666 /dev/nvidia$i c 195 $i;
done
mknod -m 666 /dev/nvidiactl c 195 255
else
exit 1
fi
------------------------------------------------------
还有相关的关于GPU驱动的说明
1) Check that you have a CUDA capable GPU: /sbin/lspci |grep -y nvidia
This should report a VGA or 3D controller
2) Check that the nvidia module is loaded and it is the right version: cat /proc/driver/nvidia/version
For CUDA 4.1, it should report 285.05.33
3) Check that you have the right permissions for the /dev/nvidia* files: ls -l /dev/nvidia*
The output should be similar to this if you are using the script in the release notes to load the module( 4.1 omitted it by mistake, look for an old one)
crw-rw-rw- 1 root root 195, 0 Jan 10 16:11 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 Jan 10 16:11 /dev/nvidiactl
or if you are the only user on the machine and are running X, the files should belong to you