menu

有舍才有得

I am back

Avatar

MPI-Povray installation guide

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

赞。
HKU学的就是好。。

看不懂:(
真是惭愧ing

只要看到英文就不是很懂了

评论已关闭