|
|
AMDC is a parallel programming paradigm based on active messages. In the Computer Science and Applied Mathematics Department at IIT, AMDC is available on the cluster of SGI workstations known as the deltas cluster: the implementation is done on top of PVM, though the user does not have to know PVM programming to be able to use AMDC. This page contains information about the MDC setup for users of the Deltas Cluster. Changes to your environmentHere are the steps you have to follow to be ready to run AMDC applications on the deltas (for csh users). Most of these changes are due to the fact that the implementation runs on top of PVM.
setenv PVM_ROOT /a/apps/pvm3
setenv PVM_ARCH SGI5
set path=($path $PVM_ROOT/lib/SGI5)
news
delta0
If you plan to be able to start PVM from more than one host, then add the name of each of them in the .rhosts file, one per line.
chmod go-rwx .rhosts
cd
mkdir amdc-work
delta0 ep=$HOME/amdc-work wd=$HOME/amdc-work
delta1 ep=$HOME/amdc-work wd=$HOME/amdc-work
delta2 ep=$HOME/amdc-work wd=$HOME/amdc-work
Creating an AMDC executableThe process of creating an AMDC executable is as simple as creating any executable starting from a C file. The only exception is that the object file must be linked with the AMDC library.
cc myfile.c -I/a/apps/AMDC/src
-L/a/apps/AMDC/lib/pvm_sgi -lamdc \
-L/a/apps/pvm3/lib/SGI5 -lpvm3 -o myfile
make myfile
Run the AMDC executable
pvmd3 myhostfile &
An example
cd ~/amdc-work
make t1
pvmd3 myhostfile &
t1
PVM help
man -M /a/apps/pvm3/man pvm_intro
Some PVM documentation is available in /a/apps/pvm3/doc/ Frequently Asked QuestionsQ: I use the makefile to compile a test (like primes.c) but I keep getting errors like the one below. Why:
Error: primes.c, line 45: Type int of rhs
of assignment expression is
incompatible with type struct of lhs
LN = amdc_getNameOfLoc(L);
------^
A: Most likely you have old amdc header files in your directory. The only files that you must have in your working directory are your amdc program (with the .c extension), the makefile and the pvm hostfile (called myhostfile in the section that describes how to setup your environment). Q: How do I know how many nodes (workstations are available to my computation)? A: The nodes used in computation will be those listed in the pvm hostfile ( called myhostfile in the section that describes how to setup your environment), unless you decide to run your application with fewer nodes. When you type
pvmd3 myhostfile &
the pvm daemon will be started on all nodes that are listed in myhostfile. Let's say there are 4 nodes listed in myhostfile. You can run the executable t1 using all nodes
t1 -n4
or only three of the nodes
t1 -n3
To see what computers are available type pvm on the machine where you run pvmd3; then type conf to see a list of active computers. Q: I use pvmd3 to start the pvm daemons but I never get to have more than one host running, why? A: When pvm starts it creates two files in the /tmp directory, pvmd.my_user_id and pvml.my_user_id. The former is a lock indicating pvm is running, thus preventing the user to start another daemon on the same machine. When pvm exits gracefully it removes the pvmd.my_user_id file. If for some reason the daemon dies without removing the file, then pvm won't start on that machine. To fix the problem you have to login on the machine(s) where pvm does not start and manually remove the file. |
|