This ReadMe describes the method for setting up PBS Pro and Open MPI on multiple machines to build a cluster. The example shows a head and one node machine. Multiple nodes can be setup in a similar way. The OS used on the virtual machines in Ubuntu 16.04. Initially, OpenNebula was used on Ubuntu on physical machines for virtualization. PBS has recently made PBS Pro Open Source and thus this tutorial will guide on using the two OpenSource tools and geting them to work together.
#Project by Prachita and Tanmayee
PBSPro Homepage https://github.com/pbspro/pbspro
Step 1:
#git clone https://github.com/PBSPro/pbspro.git
Step 2:
#cd pbspro
Step 3:
#yum install -y gcc make rpm-build libtool hwloc-devel \
libX11-devel libXt-devel libedit-devel libical-devel \
ncurses-devel perl postgresql-devel python-devel tcl-devel \
tk-devel swig expat-devel openssl-devel libXext libXft \
autoconf automake
Step 4:
#yum install -y expat libedit postgresql-server python \
sendmail sudo tcl tk libical
Step 5: Non root user
#tar -xpvf pbspro-14.0.1.tar.gz
cd pbspro-14.0.1
Step 6:
#./autogen.sh
Step 7:
#./configure --prefix=/opt/pbs
Step 8:
Setup sudoers
usermod -aG wheel username
Step 9:
#sudo make install
Step 10:
#sudo /opt/pbs/libexec/pbs_postinstall
#sudo chmod 4755 /opt/pbs/sbin/pbs_iff /opt/pbs/sbin/pbs_rcp
#sudo /etc/init.d/pbs start
#. /etc/profile.d/pbs.sh
OpenMPI Homepage
https://www.open-mpi.org/software/ompi/v2.0/
Step 1:
SSH passwordlessly
Server machine
#mkdir ~/.ssh
#ssh-keygen -t rsa -b 4096 -C "prachita.mane@example.com"
Enter all three
#cd ~/.ssh
#cp id_rsa.pub authorized_keys
#scp ~/.ssh/id_rsa ~/.ssh/id_rsa.pub root@10.47.0.220:
Node:
#mkdir ~/.ssh
#cp id_rsa id_rsa.pub ~/.ssh
#cd ~/.ssh
#cp id_rsa.pub authorized_keys
Check passwordless ssh
ssh root@10.47.0.220
Step 2: NFS
On server
#yum install nfs-utils nfs-utils-lib -y
#systemctl start rpcbind nfs-server
#systemctl enable rpcbind nfs-server
#mkdir /nfs
#vi /etc/exports
Edit file and write:
/nfs 10.0.1.3(rw,sync,no_root_squash,no_subtree_check)
Save and exit
#/nfs 10.0.1.3(rw,sync,no_root_squash,no_subtree_check)
#systemctl restart nfs
Client Machine
#yum install nfs-utils nfs-utils-lib -y
#mkdir -p /nfs
#showmount -e 10.47.0.219
#rpcinfo -p 10.47.0.219
#mount 10.47.0.219:/nfs /nfs
#df -h
#cd /nfs
#touch tryfile.txt
#vi /etc/fstab
10.47.0.219:/nfs /nfs nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0
#mount -a
Step 3:
Install tar file
#cd nfs
#wget https://www.open-mpi.org/software/ompi/v2.0/downloads/openmpi-2.1.0.tar.bz2
Step 4:
Unzip file
#tar xvjf openmpi-2.0.2.tar.bz2
Step 5:
Get cpp
#install rpm gcc-c++
Step 6:
#cd openmpi-2.0.2
#./configure --prefix=/nfs/openmpi-2.1.0
Step 7:
#make
Step 8:
#make install
Step 9:
On both machines
#vi ~/.bashrc
Add the following:
export PATH=/nfs/openmpi-2.0.2/bin:$PATH
export LD_LIBRARY_PATH="/nfs/openmpi-2.0.2/lib:$LD_LIBRARY_PATH"
Step 10: #source ~/.bashrc
Step 11:
Server
#mkdir /nfs/projects
#cd /nfs/projects
#vi hosts
10.47.0.219
10.47.0.220
#mpirun -hostfile hosts -n 4 echo "hello world"
Post a Comment