Can't use nvidia GPU optimization (libcublas.so)
Solution 1
Solved.
The server had two graphic cards. One GPU card, and one on board card. I asked the hosting company to turn off the on board card
I was worried about NVIDIA X Server Settings, when I was connecting via VNC.
nvidia-smi
informed me that all was ok.-
I needed to set
LD_LIBRARY_PATH
usingldconfig
, not in/etc/environment
, as explained here.sudo echo "/usr/local/cuda-7.0/lib64" > /etc/ld.so.conf.d/cuda.conf sudo ldconfig
Thanks everybody!
Solution 2
I solved the same problem by putting the following two lines in the file $HOME/.bashrc
export PATH=/usr/local/cuda/bin:/usr/local/cuda/lib64:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
This will set some environment variables in order to run and write CUDA enabled programs.
Related videos on Youtube
virilo
Updated on September 18, 2022Comments
-
virilo over 1 year
I have a Nvidia 750Ti on a dedicated server
I'm trying to install cuda in order to use GPU optimization in Theano.
I did several cuda 7 installations (on Ubuntu server x86_64 12.04, Ubuntu server x86_64 14.04, installing Nvidia drivers manually...).
The current installation is: - Ubuntu 14.04 (updated) - cuda 6.5 (via .run)
After each installation I try the first GPU example in this tutorial but I keep getting the same response:
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python check1.py ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: libcublas.so.6.5: cannot open shared object file: No such file or directory WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available (error: cuda unavilable) [Elemwise{exp,no_inplace}(<TensorType(float32, vector)>)] Looping 1000 times took 1.9148170948 seconds Result is [ 1.23178029 1.61879337 1.52278066 ..., 2.20771813 2.29967761 1.62323284] Used the cpu $ ls -la /usr/local/cuda-6.5/lib64/libcublas.so lrwxrwxrwx 1 root root 16 Jun 14 18:23 /usr/local/cuda-6.5/lib64/libcublas.so -> libcublas.so.6.5
I compiled the nvidia cuda examples. I can execute the matrixMul example. But executing
matrixMulCUBLAS
gives me a similar error related tolibcublas.so
shared objectAlso, when I execute NVIDIA X Server Settings I receive:
You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run nvidia-xconfig as root), and restart X
I execute:
root> nvidia-xconfig
And get the following message in return:
WARNING: Unable to locate/open X configuration file. New X configuration file written to '/etc/X11/xorg.conf'
But in spite of
nvidia-xconfig
, the problem in NVIDIA X Server Settings still remains.In one of the intents, I solved this problem with NVIDIA X Server Settings. But it doesn't solved the problem with libcublas.
I have set related variables via
/etc/environment
CUDA_HOME=/usr/local/cuda-6.5 LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib64 PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/anaconda/bin:/usr/local/cuda-6.5/bin"
I'm a newbie in GPUs and its like a big mess!