CUDA

cuda8.0 install for Ubuntu 16.04

cientifc Visualization with CUDA and OpenGL

PCIe lanes

how to compile

nvcc xxxx.cu -o xxxx -arch=sm_

HOST : CPU ←→ DEVICE : GPU

<sample program> → simpleGL.cu

To OpenGL

 

threadIdx : the kernel is given a unique thread ID

blockIdx

blockDim

_global_ : invoked from within host (CPU) code, cannot be called from device (GPU) code must return void

_device_ : called from other GPU functions, cannot be called from host (CPU) code

_host_ : can only be executed by CPU, called from host

<<<grid, block >>> : the number of CUDA threads for each call

3 kinds of memory

thread local memory : Registers, Local Memory

block shared memory : Thread Block

Global memory : Grid

texture memory

<Function>

Manage GPU memory

cudaMalloc

cudaMemcpy : cudaMemcpyHostToHostcudaMemcpyHostToDevicecudaMemcpyDeviceToHost

cudaFree

cudaMemset

 

CUDA  = Parallel Processing

CUDA OpenGL interoperability

CUDA Programming for point cloud viewer

Typical Sample : Particle

particle

 

 

 

 

 

 

Machine Specification:

NVIDIA GeForce GTS 450 (2.1 : Compute Capability)

Windows 7 Professional →CentOS 6.4?

Intel(R) Core(TM) i7 CPU   870 @ 2.93GHz

RAM: 16.0GB

64bits

Motherboard : P7H55-M/USB3 ← ASUS

→ Quadro 4000 (current)

Install

スクリーンショット(2013-01-21 21.44.32)

CentOS 5.8◯ Windows 7 ◯ MacBookAir ◯ (* OS: Mountain Lion,×:Snow Leopard)

FEDORA  16 △ 18◯

yum groupinstall “Development Tools”

for fedora 16

wget  http://developer.download.nvidia.com/compute/cuda/5_0/rel-update-1/installers/cuda_5.0.35_linux_64_fedora16-1.run

CUDA Downloads Site

NVIDIA CUDA Getting Started Guide for Microsoft Windows referenced

 

Folder

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\bin\win64\Release

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0

Bin\  : the compiler executables and runtime libraries
Include\ :the header files needed to compile CUDA programs
Lib\ :the library files needed to link CUDA programs
Doc\ :the CUDA C Programming GuideCUDA C Best Practices Guide, documentation for the CUDA libraries, and other CUDA Toolkit-related documentation

*ProgramData is a hidden folder

Visible for hidden folder on Windows 7

 

つまり、-l<パッケージ名> なら「lib<パッケージ名>-devel」というパッケージを用意すればよいことになる。

具体的には 「ld: cannot find -lXext」なら「libXext-devel」

どのパッケージかわからなければ

yum search lib<パッケージ名>

で表示されたパッケージを全てインストールしてしまえばよい。

 

PATH

Macbook Air

スクリーンショット 2013-04-24 16.54.19