Install

Install essential packages

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7
sudo apt-get install g++-4.7
sudo apt-get install zlib1g-dev bison mercurial scons libprotobuf-dev python-dev swig protobuf-compiler

Change gcc & g++ version to 4.7

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 30
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 30
sudo update-alternatives --config gcc
sudo update-alternatives --config g++

Install CUDA toolkit 3.2

wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/cudatoolkit_3.2.16_linux_64_ubuntu10.04.run
chmod +x ./cudatoolkit_3.2.16_linux_64_ubuntu10.04.run
sudo ./cudatoolkit_3.2.16_linux_64_ubuntu10.04.run
export CUDAHOME=/usr/local/cuda
export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=/usr/local/cuda/lib64

must use cuda-3.2 bin only, and change path to cuda-3.2 directory

edit .hgrc

vim .hgrc

.hgrc content

[extensions] mq=

[ui] username = "your username" ←fill in your own username

Clone gem5 and gem5-patches

mkdir gem5-gpu
cd gem5-gpu
hg qclone http://repo.gem5.org/gem5 -p http://gem5-gpu.cs.wisc.edu/repo/gem5-patches
cd gem5/
hg update -r 11060
hg qpush -a
cd ..

Clone GPGPU-Sim and GPGPU-Sim patches

hg qclone http://gem5-gpu.cs.wisc.edu/repo/gpgpu-sim -p http://gem5-gpu.cs.wisc.edu/repo/gpgpu-sim-patches
cd gpgpu-sim
hg qpush -a
cd ..

Clone gem5-gpu glue code

hg clone http://gem5-gpu.cs.wisc.edu/repo/gem5-gpu
cd ..

Build

cd gem5
scons build/X86_VI_hammer_GPU/gem5.opt --default=X86 EXTRAS=../gem5-gpu/src:../gpgpu-sim/ PROTOCOL=VI_hammer GPGPU_SIM=True

Obtain CUDA SDK

wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/sdk/gpucomputingsdk_3.2.16_linux.run
chmod +x ./gpucomputingsdk_3.2.16_linux.run
sudo ./gpucomputingsdk_3.2.16_linux.run
export NVIDIA_CUDA_SDK_LOCATION=/home/<username>/NVIDIA_GPU_Computing_SDK/C

Compile

cd /home/<username>/NVIDIA_GPU_Computing_SDK/C/common
make

results matching ""

    No results matching ""