Parallel debugging homework.
Reading: Debugging presentation slides,
manpages for upshot, clog2alog.
Now a ch_p4mpd device version of mpich is available on car cluster
(not on stimpy and others). It supports more features, including a simple
parallel debugger--mpigdb.
Currently it's not well configured, you need to do the following to
for the homework:
1 create .mpd.conf file in you home dir, add one line:
password=56rtG9
you can choose whatever password you want, does not matter for this homework
2 make sure nobody else can read .mpd.conf:
chmod g-r .mpd.conf
the permission would look like "-rw-------", the program will complain if you do not do this.
3 start mpd on each machine you want to use:
/usr/lib/mpich-mpd/bin/mpd &
for example, if your machine file contains porsche and honda, be sure
to run the daemon on both of them.
4 compile your code using mpicc.mpich-mpd, and use -g to add debugging info:
mpicc.mpich-mpd -g yourprogram.c
5 run mpigdb just like mpirun:
/usr/lib/mpich-mpd/bin/mpigdb -np 2 -machinefile car a.out
For unknown reason, mpirun does not work, but since we
just need mpigdb for this homework, does not matter...
Here's the homework:
1 use mpigdb to run trap.c (our first homework) step by step, and print the rank of the process after they are initialized.
Hint: 1 If the debugging process hangs (no mpigdb prompt) because the current process is waiting for action by another process, ctl-C (Control-C) will bring up a menu that allows you to switch processes.
2 script command can help you to log your shell activity
2 measure the time used on sending and receiving for trap.c.
Hint: use upshot, clog2alog etc
Any question, mailto: zhi@cis.udel.edu