« 前一篇:闺中女友(ZT)
后一篇:Sinzy依赖症? »

MPI-Povray installation guide @ 12/12/2006

programming
What I am busy on these days? It is all about the project of Cluster computing. I think there will be some guys need to do the similar things that I've done these days. Most probably the future CS students in HKU. Hope this installation guide can make sense to those guys who want to run POV-Ray on a MPI Cluster.

What is POV-Ray? See: http://www.povray.org/
What is MPI? See: http://www-unix.mcs.anl.gov/mpi/

This is an installation guide about install MPI-POVRay on a linux cluster on ostrich.cs.hku.hk without ROOT privilege.  If you have ROOT privilege, you may just follow the guide on the homepage of these softwares to make your life easier.

1.    Install MPICH
Download mpich.tar.gz from http://www-unix.mcs.anl.gov/mpi/mpich1/download.html
Put it to the cluster machine
Unzip the package, configure the directory you want mpi to install, and make install.
tar -zxvf mpich.tar.gz
cd mpich-1.2.7p1/
./configure -prefix=~/opt/mpi -rsh=ssh
make
make install


Create a file ~/machines with a list of host names, one host per line (list the machines assigned to our group):
jaguar13
jaguar14
jaguar15
jaguar16


Setup Shell environment, add the following in the file ~/.bash_profile:
export MPIHOME=~/opt/mpi
export PATH=$PATH:$MPIHOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MPIHOME/lib

Logout and re-login to make this effective.

2.    Set up SSH trusted authentication
Set up ssh trusted authentication so that MPICH won’t prompt for password when dispatching tasks to other hosts. Enter an empty pass-phrase when generate the key.
ssh-keygen -t rsa
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
chmod 600 authorized_keys

Try cpi.c to see if MPICH can run normally:
cd ~/temp/mpich-1.2.7/examples/basic
mpicc -o cpi cpi.c
mpirun -np 4 -machinefile ~/machines ./cpi


3.    Install POV-Ray 31g (Only version 3.1g has a mpi patch)
Dowload povlinux.tgz from ftp://ftp.povray.org/pub/povray/Old-Versions/Official-3.1g/Linux
tar zxvf povlinux.tgz
cd povray31


Edit the file INSTALL: (This modification is needed because the current user has no ROOT privilege, hence has no privilege to write to the default directories. The installation is directed to $HOME/usr/local)
mv povray.1 ~/usr/local/man/man1
if [ -x x-povray ]
then mv x-povray ~/usr/local/bin
fi
if [ -x s-povray ]
then mv s-povray ~/usr/local/bin
fi
if [ -x povray ]
then mv povray ~/usr/local/bin
fi
cd ..
mv povray31 ~/usr/local/lib
mv /usr/local/lib/povray31 /usr/local/


Setup Shell environment, add the following in the file ~/.bash_profile:
export POVPATH=~/usr/local/povray31
export POVINI=~/usr/local/povray31/povray.ini
export POVINC=~/usr/local/povray31/include

Edit povray.ini to change the Library_Path of POV-Ray:(pivray.ini is the default .ini file when POV-Ray works. Library_Path defines the path for POV-Ray to find its include files)
Library_Path=$HOME/usr/local/povray31                      ;; (+Ldir)
Library_Path=$HOME/usr/local/povray31/include

Try the povray.
cd ~/usr/local/bin/
./x-povray +I(your .pov file)
Reference: http://ns2.tkwu.net/showthread.php?threadid=2135

4.    Set up MPI-POV patch
In order to make the POVRay run in several machines parallelly, we have to get a corresponding patch for it.
First install the libpng which is needed by mpi-pov.
Get povuni_s.tgz from ftp://ftp.povray.org/pub/povray/Old-Versions/Official-3.1g/Linux

Edit makefile to change the installation also because the current user has no ROOT privilege:
cp povuni_s.tgz ~/usr/local/
cd ~/usr/local/povray31
tar zxvf povuni_s.tgz
cd ~/usr/local/povray31/source/libpng/scripts
cp makefile.lnx ../makefile

Then make it, and copy the libpng.so* to the directory:
make test
cp libpng.so* ~/usr/local/lib

Download the patch from http://www.verrall.demon.co.uk/mpip...ay-1.0.patch.gz
cp mpi-povray-1.0.patch.gz ~/usr/local/povray31
cd ~/usr/local/povray31
gunzip mpi-povray-1.0.patch.gz
cat mpi-povray-1.0.patch | patch -p1
cd ~/usr/local/povray31/source/mpi-unix


Edit the Makefile to change the install directory. (I am not quite sure about whether this change is needed. I will try another time when I am freed from the endless deadlines these days)
POVLIBDIR = ~/usr/local/lib/povray31
POVPATH = ~/opt/mpi/povray31


Reference: http://ns2.tkwu.net/showthread.php?threadid=2135

发布于 12/12/2006 16:52:31 | 评论:3
pc @ 12/12/2006 17:47:57
赞。
HKU学的就是好。。
w @ 12/12/2006 21:30:17
看不懂:(
真是惭愧ing
Dee @ 12/13/2006 14:13:34
只要看到英文就不是很懂了

看帖要回帖...

Loading...

我不去想是否能够成功
既然选择了远方
便只顾风雨兼程

我不去想能否赢得爱情
既然钟情于玫瑰
就勇敢地吐露真诚

我不去想身后会不会袭来寒风冷雨
既然目标是地平线
留给世界的只能是背影

我不去想未来是平坦还是泥泞
只要热爱生命
一切,都在意料中

----汪国真《热爱生命》
categories
archives
links
statistics
  • 网志数:221
  • 评论数:1313