CS378 Assignment
3
MPI programming
(Due:
This assignment
requires you to install and run MPI benchmarks to evaluate the
latencies of MPI
operations. Get started early, since installation and running
benchmarks might
be rather involved.
Problem 1: Run the IMB
benchmark package described below to determine the latencies of various
MPI operations:
-
Point
to Point: (with 2 processors)
o
PingPong
o
PingPing
-
Parallel
Transfer (with 4 processors)
o
SendRecv
o
Exchange
-
Collective
(with 4 processors)
o
Bcast
o
Allgather
o
Alltoall
o
Reduce
o
AllReduce
o Barrier
Problem 2: Modern distributed-memory machines are built from multicore processors, so the communication latency between two processes on the same
multicore package can be
substantially less than the communication latency between processes on
different packages. In this problem, you are required to measure the
communication latencies for different message sizes for both scenarios
as follows.
Docs/Files/Login required for
the
assignment:
1.
Readme_first
2.
doc/Readme_IMB.txt
3.
doc/IMB_ug-3.0.pdf
4.
All
sources for the benchmarks.
Steps for installing and
running the
benchmarks:
1) scp IMB_3.0.tar.gz username@lonestar.tacc.utexas.edu:
2) tar –zxvf IMB_3.0.tar.gz
3) cd IMB_3.0
4) Follow instructions in
Readme_First, which directs the user to
read:
a. ./doc/Readme_IMB.txt
which contains the installation
information.
b. ./doc/IMB_ug.pdf which contains
the detailed information about
each benchmark.
The condensed installation
instructions are given in the next
step.
5) Installation:
a. Set the path of the variable
MPI_HOME in ./src/makefile_mpich, the
path being obtained by running “which mpicc” :
i. MPI_HOME=/opt/MPI/intel9/mvapich-gen2/0.9.8/
b. cd src
c. make –f make_mpich
6) Running:
Step 5 generates an executable
IMB-MPI1 in the src directory,
which can be run using the instructions mentioned in IMB_ug.pdf Section
5.1.2
a. Before running, a textfile
containing a list of machines on which
the tests can be run. This needs to be passed in the “-machinefile”
option of
IMB-MPI1. A sample machinefile is given at the end of the doc. It has
“lonestar.tacc.utexas.edu”
repeated 5 times with newlines separating each entry.
b. To run the Barrier benchmark
for instance, Create a jobscript (at
the end of the doc. See lonestar-batch-system.ppt for a description of
how to
create jobscripts)
c. Run the jobscript in the
directory where IMB-MPI1 is present by
using “bsub < jobscript” (See lonestar-batch-system.ppt for an
explanation
of what bsub does)
d. Change parameters to ibrun to
run different benchmarks. See IMB_ug.pdf
for an explanation of various benchmarks, relevant parameters and such.
Sample jobscript for “Barrier
Benchmark”:
#!/bin/csh
#BSUB -n 4
#BSUB -J Barrier
#BSUB -o %J.out
#BSUB -e %J.err
#BSUB -q normal
#BSUB -W 0:15
#BSUB -u vishwasm@cs.utexas.edu
#BSUB -B
#BSUB -N
echo "Master Host = "`hostname`
echo "LSF_SUBMIT_DIR:
$LS_SUBCWD"
echo "PWD_DIR: "`pwd`
ibrun IMB-MPI1 -npmin 4
-machinefile hostfile Barrier
Sample machinefile:
lonestar.tacc.utexas.edu
lonestar.tacc.utexas.edu
lonestar.tacc.utexas.edu
lonestar.tacc.utexas.edu
lonestar.tacc.utexas.edu
Some important Files required
for running:
bsub
ibrun
mpicc
IMB-MPI1 (created
by make_mpich)
machinefile (to
be created)
jobscript (to be
created)