CUDA5/CentOS6.4
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[labs.beatcraft.com]] ~
[[CUDA]]~
#contents
* CUDA5/CentOS6.4 [#uc1c5ea8]
>
This article explains how to install CentOS 6.4 and CUDA5...
~
#ref(CUDA_Tesla.jpg,,45%) ~
~
* Hardware Specification [#de8b31c5]
>
The specification of hardware is shown below~
~
- CPU: Core i7 3770(3.4GHz,4core/8thread)
- Memory: 32GB(DDR3-12800 8GBx4)
- HDD: 1TB(SATA,7200rpm)
- GPU: ETSK20-5GER(nvidia Tesla K20c) ~
>
#ref(CUDA_PC.jpg,,45%) ~
~
Since ETSK20-5GER does not have terminals of display outp...
* To Install CentOS 6.4 (64bit) [#z1f9e64b]
>
The settings of installing CentOS 6.4 are shown below. ~
- Language & Keyboard: Japanese
- Package: Standard Desktop Install
- HDD Partition: Using whole disk, the standard configura...
- Network: DHCP
>
To install CentOS, there is no customization (modificatio...
Please follow the instruction that the installer of CnetO...
Both Firewall and SELinux are configured as Disable.~
* Configuration for Post-Installation of CentOS[#db8c96a0]
>
This part describes how to prepare for installing CUDA af...
** To update CentOS[#sf692f14]
>
The Kernel version of CentOS, which has been just install...
>
$ uname -a
Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP...
>
To update Kernel of CentOS, please apply to yum command.~
>
# yum update
>
After updating Kernel is completed, please reboot the OS ...
>
# reboot
>
After rebooting the CnetOS, please check the newer versio...
>
$ uname -a
Linux localhost.localdomain 2.6.32-358.6.2.el6.x86_64 #1...
>
Create a new user. Then, add the new user to sudo account.~
>
# useradd beat
# passwd beat
>
# /usr/sbin/visudo
...<Omitted>
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to...
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
beat ALL=(ALL) ALL
** To add packages and to modify the configuration [#i1de...
>
The addition of packages and modification of configuratio...
However, to make installing process easier, install ntpd ...
~
Install ntpd.~
>
# yum install ntp
>
Add ntp server.~
>
# vi /etc/ntp/step-tickers
# List of servers used for initial synchronization.
ntp.nict.jp
ntp.jst.mfeed.ad.jp
ntp.ring.gr.jp
>
Boot ntpd.~
>
# /etc/init.d/ntpd start
>
ntpd is added to the service.~
>
# chkconfig --level 3 ntpd on
# chkconfig --level 5 ntpd on
>
Install openssh.~
If openssh is already installed, please skip this part of...
>
# yum install openssh
>
PermitRootLogin and PermitEmptyPasswords, which are locat...
>
# vi /etc/ssh/sshd_config
... <Omitted>
# Authentication:
#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
... <Omitted>
# To disable tunneled clear text passwords, change to ...
#PasswordAuthentication yes
PermitEmptyPasswords no
PasswordAuthentication yes
...
>
Boot sshd. ~
>
# /etc/init.d/sshd start
>
Add service to sshd.~
>
# chkconfig --level 5 sshd on
# chkconfig --level 3 sshd on
* To Install the Driver for Tesla K20c[#n811fcbc]
>
This section describes how to install the driver for Tesl...
** Preparation for installing the Tesla K20c driver [#k7d...
>
To install the deriver for Tesla K20c, the Developer Tool...
>
# yum groupinstall 'Development tools'
>
An error will occur if X is booted during the diver for T...
>
# vi /etc/inittab
...<Omitted>
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you ...
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
# reboot
** To download and install Tesla K20c driver[#w3abdcaf]
>
After rebooting, NVIDIA-Linux-x86_64-319.23.run is downlo...
http://www.nvidia.co.jp/object/linux-display-amd64-319.23...
~
Execute NVIDIA-Linux-x86_64-319.23.run, and if you agree ...
>
# chmod +x NVIDIA-Linux-x86_64-319.23.run
# ./NVIDIA-Linux-x86_64-319.23.run
# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 304.54 ...
GCC version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-...
>
Caution:~
The driver is needed to be re-built after the kernel upda...
The re-build process is required since the updated kernel...
For the reference, the version of the new driver and the ...
>
# uname -a
Linux tesla.beatcraft.com 2.6.32-358.18.1.el6.x86_64 #1 ...
# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 319.23 ...
GCC version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-...
>
To read the driver, create a file at /etc/init.d/nvidea, ...
http://docs.nvidia.com/cuda/cuda-getting-started-guide-fo...
>
# vi /etc/init.d/nvidia
#!/bin/bash
/sbin/modprobe nvidia
if [ "$?" -eq 0 ]; then
# Count the number of NVIDIA controllers found.
NVDEVS=`lspci | grep -i NVIDIA`
N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l`
NVGA=`echo "$NVDEVS" | grep "VGA compatible controlle...
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
# cd /etc/rc5.d/
# ln -s S99nvidia ../init.d/nvidia
# cd /etc/rc3.d/
# ln -s S99nvidia ../init.d/nvidia
* To Install CUDA5 and Execute Samples [#gbfa8ff5]
>
This section shows how to install CUDA5 and executes a sa...
** To download CUDA5 [#ge140c64]
>
Download CUDA for CentOS6 64bit version (cuda_5.0.35_linu...
https://developer.nvidia.com/cuda-downloads ~
~
Add a PATH for CUDA5 in .bashrc. This is a precautionary ...
>
$ cd /home/beat
$ vi .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
export PATH=/usr/local/cuda-5.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib64:/usr/...
# source .bashrc
** To install packages [#md50346c]
>
To build the samples, these packages listed below are req...
>
# yum install freeglut-devel.x86_64 libXi-devel.x86_64 m...
>
Execute cuda_5.0.35_linux_64_rhel6.x-1.run. Specify the d...
>
# chmod +x cuda_5.0.35_linux_64_rhel6.x-1.run
# ./cuda_5.0.35_linux_64_rhel6.x-1.run
>
Sample programs are installed at the directories of /usr/...
~
To let a root user build the samples, add ld.so.conf.d/cu...
>
# cat /etc/ld.so.conf.d/cuda.conf
/usr/local/cuda-5.0/lib
/usr/local/cuda-5.0/lib64
# ldconfig
** To build and execute the samples of CUDA5 [#v02860fe]
>
Let a user build and execute NVIDIA_CUDA-5.0_Samples.~
Copy the file NVIDIA_CUDA-5.0_Samples from /root/NVIDIA_C...
Change the owner of the file NVIDIA_CUDA-5.0_Samples to a...
>
# cp -afr /root/NVIDIA_CUDA-5.0_Samples /home/beat/.
# cd /home/beat
# chown -R beat.beat NVIDIA_CUDA-5.0_Samples
$ cd ~/NVIDIA_CUDA-5.0_Samples
$ make
>
After the build process is completed, Change the director...
~
http://docs.nvidia.com/cuda/cuda-getting-started-guide-fo...
~
To look at the outputs shown below, both deviceQuery and ...
>
$ cd ~/NVIDIA_CUDA-5.0_Samples/bin/linux/release/
$ ./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART stati...
Detected 1 CUDA Capable device(s)
Device 0: "Tesla K20c"
CUDA Driver Version / Runtime Version 5.0 /...
CUDA Capability Major/Minor version number: 3.5
Total amount of global memory: 4800 ...
(13) Multiprocessors x (192) CUDA Cores/MP: 2496 ...
GPU Clock rate: 706 M...
Memory Clock rate: 2600 ...
Memory Bus Width: 320-bit
L2 Cache Size: 13107...
Max Texture Dimension Size (x,y,z) 1D=(6...
Max Layered Texture Size (dim) x layers 1D=(1...
Total amount of constant memory: 65536...
Total amount of shared memory per block: 49152...
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Maximum sizes of each dimension of a block: 1024 ...
Maximum sizes of each dimension of a grid: 21474...
Maximum memory pitch: 21474...
Texture alignment: 512 b...
Concurrent copy and kernel execution: Yes w...
Run time limit on kernels: No
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Enabled
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSet...
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version...
>
$ ./bandwidthTest
[CUDA Bandwidth Test] - Starting...
Running on...
Device 0: Tesla K20c
Quick Mode
Host to Device Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 6431.7
Device to Host Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 6396.1
Device to Device Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 143752.5
** HDD space[#c97ef8c4]
>
After the install and configuration of CUDA, the remainin...
>
# df -h
Filesystem Size Used Avail Use% マ...
/dev/mapper/vg_beattesla-lv_root
50G 4.3G 45G 9% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sda1 485M 66M 394M 15% /boot
/dev/mapper/vg_beattesla-lv_home
852G 1.4G 808G 1% /home
* Revision History [#cbed8220]
>
-2013/06/04 This article is initially uploaded.~
-2013/09/26 The tittle of the section is changed from "T...
End:
[[labs.beatcraft.com]] ~
[[CUDA]]~
#contents
* CUDA5/CentOS6.4 [#uc1c5ea8]
>
This article explains how to install CentOS 6.4 and CUDA5...
~
#ref(CUDA_Tesla.jpg,,45%) ~
~
* Hardware Specification [#de8b31c5]
>
The specification of hardware is shown below~
~
- CPU: Core i7 3770(3.4GHz,4core/8thread)
- Memory: 32GB(DDR3-12800 8GBx4)
- HDD: 1TB(SATA,7200rpm)
- GPU: ETSK20-5GER(nvidia Tesla K20c) ~
>
#ref(CUDA_PC.jpg,,45%) ~
~
Since ETSK20-5GER does not have terminals of display outp...
* To Install CentOS 6.4 (64bit) [#z1f9e64b]
>
The settings of installing CentOS 6.4 are shown below. ~
- Language & Keyboard: Japanese
- Package: Standard Desktop Install
- HDD Partition: Using whole disk, the standard configura...
- Network: DHCP
>
To install CentOS, there is no customization (modificatio...
Please follow the instruction that the installer of CnetO...
Both Firewall and SELinux are configured as Disable.~
* Configuration for Post-Installation of CentOS[#db8c96a0]
>
This part describes how to prepare for installing CUDA af...
** To update CentOS[#sf692f14]
>
The Kernel version of CentOS, which has been just install...
>
$ uname -a
Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP...
>
To update Kernel of CentOS, please apply to yum command.~
>
# yum update
>
After updating Kernel is completed, please reboot the OS ...
>
# reboot
>
After rebooting the CnetOS, please check the newer versio...
>
$ uname -a
Linux localhost.localdomain 2.6.32-358.6.2.el6.x86_64 #1...
>
Create a new user. Then, add the new user to sudo account.~
>
# useradd beat
# passwd beat
>
# /usr/sbin/visudo
...<Omitted>
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to...
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
beat ALL=(ALL) ALL
** To add packages and to modify the configuration [#i1de...
>
The addition of packages and modification of configuratio...
However, to make installing process easier, install ntpd ...
~
Install ntpd.~
>
# yum install ntp
>
Add ntp server.~
>
# vi /etc/ntp/step-tickers
# List of servers used for initial synchronization.
ntp.nict.jp
ntp.jst.mfeed.ad.jp
ntp.ring.gr.jp
>
Boot ntpd.~
>
# /etc/init.d/ntpd start
>
ntpd is added to the service.~
>
# chkconfig --level 3 ntpd on
# chkconfig --level 5 ntpd on
>
Install openssh.~
If openssh is already installed, please skip this part of...
>
# yum install openssh
>
PermitRootLogin and PermitEmptyPasswords, which are locat...
>
# vi /etc/ssh/sshd_config
... <Omitted>
# Authentication:
#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
... <Omitted>
# To disable tunneled clear text passwords, change to ...
#PasswordAuthentication yes
PermitEmptyPasswords no
PasswordAuthentication yes
...
>
Boot sshd. ~
>
# /etc/init.d/sshd start
>
Add service to sshd.~
>
# chkconfig --level 5 sshd on
# chkconfig --level 3 sshd on
* To Install the Driver for Tesla K20c[#n811fcbc]
>
This section describes how to install the driver for Tesl...
** Preparation for installing the Tesla K20c driver [#k7d...
>
To install the deriver for Tesla K20c, the Developer Tool...
>
# yum groupinstall 'Development tools'
>
An error will occur if X is booted during the diver for T...
>
# vi /etc/inittab
...<Omitted>
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you ...
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
# reboot
** To download and install Tesla K20c driver[#w3abdcaf]
>
After rebooting, NVIDIA-Linux-x86_64-319.23.run is downlo...
http://www.nvidia.co.jp/object/linux-display-amd64-319.23...
~
Execute NVIDIA-Linux-x86_64-319.23.run, and if you agree ...
>
# chmod +x NVIDIA-Linux-x86_64-319.23.run
# ./NVIDIA-Linux-x86_64-319.23.run
# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 304.54 ...
GCC version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-...
>
Caution:~
The driver is needed to be re-built after the kernel upda...
The re-build process is required since the updated kernel...
For the reference, the version of the new driver and the ...
>
# uname -a
Linux tesla.beatcraft.com 2.6.32-358.18.1.el6.x86_64 #1 ...
# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 319.23 ...
GCC version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-...
>
To read the driver, create a file at /etc/init.d/nvidea, ...
http://docs.nvidia.com/cuda/cuda-getting-started-guide-fo...
>
# vi /etc/init.d/nvidia
#!/bin/bash
/sbin/modprobe nvidia
if [ "$?" -eq 0 ]; then
# Count the number of NVIDIA controllers found.
NVDEVS=`lspci | grep -i NVIDIA`
N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l`
NVGA=`echo "$NVDEVS" | grep "VGA compatible controlle...
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
# cd /etc/rc5.d/
# ln -s S99nvidia ../init.d/nvidia
# cd /etc/rc3.d/
# ln -s S99nvidia ../init.d/nvidia
* To Install CUDA5 and Execute Samples [#gbfa8ff5]
>
This section shows how to install CUDA5 and executes a sa...
** To download CUDA5 [#ge140c64]
>
Download CUDA for CentOS6 64bit version (cuda_5.0.35_linu...
https://developer.nvidia.com/cuda-downloads ~
~
Add a PATH for CUDA5 in .bashrc. This is a precautionary ...
>
$ cd /home/beat
$ vi .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
export PATH=/usr/local/cuda-5.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib64:/usr/...
# source .bashrc
** To install packages [#md50346c]
>
To build the samples, these packages listed below are req...
>
# yum install freeglut-devel.x86_64 libXi-devel.x86_64 m...
>
Execute cuda_5.0.35_linux_64_rhel6.x-1.run. Specify the d...
>
# chmod +x cuda_5.0.35_linux_64_rhel6.x-1.run
# ./cuda_5.0.35_linux_64_rhel6.x-1.run
>
Sample programs are installed at the directories of /usr/...
~
To let a root user build the samples, add ld.so.conf.d/cu...
>
# cat /etc/ld.so.conf.d/cuda.conf
/usr/local/cuda-5.0/lib
/usr/local/cuda-5.0/lib64
# ldconfig
** To build and execute the samples of CUDA5 [#v02860fe]
>
Let a user build and execute NVIDIA_CUDA-5.0_Samples.~
Copy the file NVIDIA_CUDA-5.0_Samples from /root/NVIDIA_C...
Change the owner of the file NVIDIA_CUDA-5.0_Samples to a...
>
# cp -afr /root/NVIDIA_CUDA-5.0_Samples /home/beat/.
# cd /home/beat
# chown -R beat.beat NVIDIA_CUDA-5.0_Samples
$ cd ~/NVIDIA_CUDA-5.0_Samples
$ make
>
After the build process is completed, Change the director...
~
http://docs.nvidia.com/cuda/cuda-getting-started-guide-fo...
~
To look at the outputs shown below, both deviceQuery and ...
>
$ cd ~/NVIDIA_CUDA-5.0_Samples/bin/linux/release/
$ ./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART stati...
Detected 1 CUDA Capable device(s)
Device 0: "Tesla K20c"
CUDA Driver Version / Runtime Version 5.0 /...
CUDA Capability Major/Minor version number: 3.5
Total amount of global memory: 4800 ...
(13) Multiprocessors x (192) CUDA Cores/MP: 2496 ...
GPU Clock rate: 706 M...
Memory Clock rate: 2600 ...
Memory Bus Width: 320-bit
L2 Cache Size: 13107...
Max Texture Dimension Size (x,y,z) 1D=(6...
Max Layered Texture Size (dim) x layers 1D=(1...
Total amount of constant memory: 65536...
Total amount of shared memory per block: 49152...
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Maximum sizes of each dimension of a block: 1024 ...
Maximum sizes of each dimension of a grid: 21474...
Maximum memory pitch: 21474...
Texture alignment: 512 b...
Concurrent copy and kernel execution: Yes w...
Run time limit on kernels: No
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Enabled
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSet...
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version...
>
$ ./bandwidthTest
[CUDA Bandwidth Test] - Starting...
Running on...
Device 0: Tesla K20c
Quick Mode
Host to Device Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 6431.7
Device to Host Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 6396.1
Device to Device Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 143752.5
** HDD space[#c97ef8c4]
>
After the install and configuration of CUDA, the remainin...
>
# df -h
Filesystem Size Used Avail Use% マ...
/dev/mapper/vg_beattesla-lv_root
50G 4.3G 45G 9% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sda1 485M 66M 394M 15% /boot
/dev/mapper/vg_beattesla-lv_home
852G 1.4G 808G 1% /home
* Revision History [#cbed8220]
>
-2013/06/04 This article is initially uploaded.~
-2013/09/26 The tittle of the section is changed from "T...
Page: