First install newest NVIDIA driver. 'nvidia-experimental-310' from ppa was good for my laptop's GT220M. For desktop's GTX550Ti I needed to install driver manualy from nvidia.com. Next step is to download CUDA pack from developer.nvidia.com, and latest PyCUDA and PyOpenCL from https://pypi.python.org/pypi/pycuda and https://pypi.python.org/pypi/pyopencl respectively.
Then in command line:
sudo gedit /etc/environmentand add to PATH line the following ':/usr/local/cuda-5.0/bin'
sudo gedit /etc/ld.so.confand add lines: /usr/local/cuda-5.0/lib and /lib
sudo gedit /etc/bash.bashrcand add lines to the end:
export PATH=/usr/local/cuda-5.0/bin:$PATHDo:
export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib:$LD_LIBRARY_PATH
sudo ldconfigSo CUDA is installed.
sudo apt-get install freeglut3-dev python-opengl python-pytools python-setuptools python-numpy libboost1.48-all-dev
sudo ln -s /usr/lib/i386-linux-gnu/libglut.so.3 /usr/lib/libglut.so
sudo sh cuda_5.0.35_linux_32_ubuntu11.10-1.run
Unpack PyCUDA and enter the directory:
./configure.py --cuda-root=/usr/local/cuda-5.0 --cudadrv-lib-dir=/usr/lib --boost-inc-dir=/usr/include --boost-lib-dir=/usr/lib --boost-python-libname=boost_python-mt-py27 --boost-thread-libname=boost_thread-mt --no-use-shipped-boostNow you can try to run sometheing from /example directory.
make -j 4
sudo python setup.py install
Unpack PyOpenCL and enter the directory:
python configure.py --boost-inc-dir=/usr/include/boost --boost-lib-dir=/usr/lib --no-use-shipped-boost --boost-python-libname=boost_python-mt-py27 --cl-inc-dir=/usr/local/cuda-5.0/include/ --cl-lib-dir=/usr/local/cuda-5.0/lib --cl-libname=OpenCLFrom now PyCUDA and PyOpenCL are installed and you can check out some examples. Enjoy GPU computation.
make
sudo make install
Instructions for AMD/ATI SDK you can find here http://wiki.tiker.net/PyOpenCL/Installation/Linux/Ubuntu . It maybe necessary to replace boost-python library name as it is in my example.
Комментариев нет:
Отправить комментарий