Difference between revisions of "HPC:CUDA"
From hpcwiki
(→Base Installation) |
(→Base Installation) |
||
Line 14: | Line 14: | ||
# rpm -ivh epel-release-7-9.noarch.rpm | # rpm -ivh epel-release-7-9.noarch.rpm | ||
* ''Update (alternative) for CentOS 7.4: it is necessary to use epel v. 7.11 and to install nVidia graphics driver'' | * ''Update (alternative) for CentOS 7.4: it is necessary to use epel v. 7.11 and to install nVidia graphics driver'' | ||
− | ** Download graphics driver NVIDIA-Linux-x86_64-390.46.run from http://www.nvidia.com/Download/index.aspx | + | ** Download graphics driver NVIDIA-Linux-x86_64-390.46.run from http://www.nvidia.com/Download/index.aspx |
# bash NVIDIA-Linux-x86_64-390.46.run | # bash NVIDIA-Linux-x86_64-390.46.run | ||
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-11.noarch.rpm | # wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-11.noarch.rpm |
Revision as of 17:35, 21 April 2018
Contents |
CUDA Development
CUDA installation process in worker nodes
- Main doc: http://docs.nvidia.com/cuda/index.html
- Installation docs: https://developer.nvidia.com/cuda-downloads
- Full installation guide, here
Base Installation
- Install EPEL (Extra Packages for Enterprise Linux) - Result: OK
- Note: this fulfill the requirement of the
dkms
package for CentOS 7 - Site: https://developer.nvidia.com/cuda-zone
- Note: this fulfill the requirement of the
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm # rpm -ivh epel-release-7-9.noarch.rpm
- Update (alternative) for CentOS 7.4: it is necessary to use epel v. 7.11 and to install nVidia graphics driver
- Download graphics driver NVIDIA-Linux-x86_64-390.46.run from http://www.nvidia.com/Download/index.aspx
# bash NVIDIA-Linux-x86_64-390.46.run # wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-11.noarch.rpm # rpm -ivh epel-release-7-11.noarch.rpm
- Get CUDA local installation RPM file - Result: OK
# wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-rhel7-8-0-local-ga2-8.0.61-1.x86_64-rpm # mv cuda-repo-rhel7-8-0-local-ga2-8.0.61-1.x86_64-rpm cuda-repo-rhel7-8-0-local-ga2-8.0.61-1.x86_64.rpm
- Install CUDA package - Result: OK
# rpm -i cuda-repo-rhel7-8-0-local-ga2-8.0.61-1.x86_64.rpm # yum clean all # yum install cuda
Configuration
- Create or edit the file
/etc/modprobe.d/blacklist-nouveau.conf
with the following contents:
blacklist nouveau options nouveau modeset=0
- Regenerate the kernel initramfs:
# dracut --force
- Create a file
/etc/profile.d/cuda.sh
containing
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Test
It seems it's necessary to restart each machine, because the system must load the cuda driver (without the noveau driver) - Reboot OK (node '11')
- Create user
testing
# adduser testing # passwd testing
- Log in as user
testing
# su testing
- Create testing directory
$ cd $ mkdir cuda $ mkdir cuda/testing
- Copy testing examples
$ cd cuda/testing $ cuda-install-samples-8.0.sh ./
- Enter an arbitrary example and run
$ cd NVIDIA_CUDA-8.0_Samples/0_Simple/matrixMul $ make $ ./matrixMul