Monday, July 27, 2015

Install gpuocelot on ubuntu 12.04

Here is the installation doc I wrote down by searching around.

P1
Configure different version of gcc/g++, since gcc 4.7 and up are not supported! for cuda-4.2.
Thus, we need to install 4.6 or 4.7.

sudo apt-get install gcc-4.6 g++-4.6 -y
sudo apt-get install gcc-4.7 g++-4.7 -y
sudo apt-get install gcc-4.8 g++-4.8 -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9 gcc-4.9 -y

to choose different gcc verison, check this link
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 25 && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20 && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 15 && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 25 && \
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20 && \
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 15 && \
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10

sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 70 && \
sudo update-alternatives --set cc /usr/bin/gcc

sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 70 && \
sudo update-alternatives --set c++ /usr/bin/g++

sudo update-alternatives --config gcc
sudo update-alternatives --config g++

After installation, the libocelot.so can be found either in /usr/local/lib/ or under ".release_build" directory

P2
.release_build/ocelot/ptxgrammar.hpp:351:14:error:'PTXLexer' is not a member of 'parser'

To fix the error,
go ahead, open the '.release_build/ocelot/ptxgrammar.hpp' file and just comment line

P3
ocelot/ocelot/executive/implementation/LLVMModuleManager.cpp:333:42: error: typedef 'GlobalMap' locally defined but not used [-Werror=unused-local-typedefs]
ir::Module::GlobalMap::const_iterator> GlobalMap;

To fix the error, simply comment out the definition!


Useful links:
https://groups.google.com/forum/#!topic/gpuocelot/yOewsnYajRA https://code.google.com/p/gpuocelot/issues/detail?id=99
http://bt.nitk.ac.in/r/GPU-Ocelot-Manual-Ankur.pdf


No comments:

Post a Comment