A DP Session
To assist students developing DP programs for classes (as well as
others) a number of utilities are available. We illustrate their
use by way of giving below the steps to compile and run a DP program.
(We assume that the program is named "mydp.c" and that it will be
used to make an executable called "mydp".)
- Make sure you are on a SunOS system. DP currently is not running
on Solaris. To make find out whether you are on a SunOS system and to find
out what other SunOS systems are available for DP, type dp.
- Compile your code: acc -o mydp mydp.c -ldp
- Create a hosts file: dphosts host1 host2 ... hostN
Note that these hosts must be SunOS machines-- type "dp" if you need a reminder. Also,
remember to include the machine you are running on in the list of hosts. For example
one might type: dphosts atrium21 atrium22 atrium23.
- Execute your program: mydp argument1 argument2 ...
You will be prompted for your password-- this is to ensure that you can
create processes on other machines that might require it.
- You can monitor the progress of your distributed computation in several ways. You
can type, dppsee mydp. This will give a "ps-like" display of the process you
are running on the different hosts. Don't be alarmed if there is no output if you
are running a short pingpong program! Those programs can complete quite quickly.
Another tool is dpfsee mydp. This shows a set of zero-length tmp files that
DP processes create. The purpose of these files (and their names) is to give you
some idea of the progress of the computation. In general, there should be two and only two such
files at any time for each process. One of these, "...init1..." merely indicates that
the process started. It will always be there. Another "...init3..." indicates that
initialization is complete, but the process is still running. A third "...complete..."
indicates that the process has completed successfully. Remember though: a distributed
computation consists of many processes-- the successful completion and termination of
one does not imply that the entire computation is over.
When there are only init1s and completes you know the computation is over. Usually.
- If you want to terminate your DP computation (because you think it is "hung" or
because it is taking longer than you wished or it is incorrect in some way) you can
type dpkill mydp. This should not be done except for the purpose of aborting a DP
run.
- Finally, when you are finished with a computation you SHOULD type dpclean mydp. This
removes the various tmp files that were created. Failure to do so will irritate the local
system administrator as well as confuse you next time you make a DP run.
In sum:
dp
acc -o mydp mydp.c -ldp
dphosts host1 host2 ...
mydp arg1 arg2
...password ...
dpfsee mydp
dppsee mydp
dpfsee mydp
...
dpclean mydp
Return to DP For Students
Return to The DP Project
Return to David Arnow's Home Page