레이블이 ubuntu인 게시물을 표시합니다. 모든 게시물 표시
레이블이 ubuntu인 게시물을 표시합니다. 모든 게시물 표시

2014년 4월 26일 토요일

gcc 4.7, g++ 4.7 install on 12.04 LTS

1. Update apt repositories

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update

2. Check

$ sudo apt-cache search "g\+\+"

3. Install

$ sudo apt-get install gcc-4.7 g++-4.7

4. Set as a default gcc

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
$ sudo update-alternatives --config gcc
then Select gcc-4.7

5. Confirm

dokyun@redbomb-server:~$ g++ --version
g++ (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dokyun@redbomb-server:~$



2013년 5월 18일 토요일

opencl sample makefile


Here is the skeleton of my Makefiles for opencl
It almost same as normal unix application Makefile
Add just opencl libs and opencl include directory
It is based on AMD Streaming SDK



Here is the result... I used helloworld sample of opencl programming guide

















 

2013년 5월 3일 금요일

Install opencl with AMD streaming SDK


Installed env:

OS : unbuntu 10.04 , 64bits
Graphic Card : AMD Radeaon HD 4870
AMD Straming SDK 2.6

- AMD driver download

http://support.amd.com/us/gpudownload/linux/legacy/Pages/legacy-radeon_linux.aspx
http://support.amd.com/us/gpudownload/linux/previous/Pages/radeon_linux.aspx

- stream SDK download
http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/

1. Check your Graphic card supports opencl or not
You can check here
http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/system-requirements-driver-compatibility/

if the graphic card is not supported , download lower version and check

AMD-APP-SDK-<version>-RC-lnx64\docsAMD_APP_SDK_Getting_Started_Guide_<version>.pdf

2. install driver and opencl SDK
 unzip SDK package then run Install-AMD-APP.sh with root log-in

3. go to <install_dir>/AMD-APP-SDK-v2.x-RC3-lnx64/samples/opencl then make

 if you do not install openGL you get build error with below message

/opt/AMDAPP/include/GL/glew.h:1138:20: error: GL/glu.h: No such file or directory

in this case install openGL

$ sudo apt-get install freeglut3-dev

then make again, build will be succeeded







2012년 10월 31일 수요일

ubuntu svn server install ( over apache )


I installed svn server under ubuntu LTS 10.04 64 bits

SVN Server Setup

1. install essentail packages
#  sudo apt-get install subversion libapache2-svn apache2

2. create repository
 # svnadmin create /home3/swmgr/tmpsvn/sample

3. configure conf file
open  /home3/swmgr/tmpsvn/sample/conf/svnserve.conf
then uncommnet belows
 auth-access = write ==> set permission
 password-db = passwd ==> indicate passward file

open /home3/swmgr/tmpsvn/sample/conf/passwd
then add user and passward

[users]
user = passwd
dokyun = hellscream

4. start svn server
 svnserve -d -r /home3/swmgr/tmpsvn/sample

5. check
# svn checkout svn://192.168.0.4 ./svn
 or
# svn checkout svn://localhost ./svn

if  ,,, /db/txn-current-lock': Permission denied  error happens when svn access
check the directory permission.
$ chmod -R 775 /home3/swmgr/tmpsvn/sample


SVN over Apache


1. set directory owner
 # sudo chown -R www-data /home3/swmgr/tmpsvn/sample/

2. configure
 open /etc/apache2/mods-enabled/dav_svn.conf
 then add

<Location /svn>
  DAV svn
  SVNPath /home3/swmgr/tmpsvn/sample
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
</Location>

3. add user
# sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd dokyun
 or
# sudo htpasswd -cm /etc/apache2/dav_svn.passwd dokyun

4. restart apache
 sudo /etc/init.d/apache2 restart
5. check