These laboratory instructions are intended for use with Computer Science 40, Parallel Computation, Spring Semester, 1999, 10:30 - 11:50 TTh, Dennis Hall 214, Ray Ontko and Joy Williams Lind, Department of Computer Science, Earlham College.
This laboratory exercise will assist you in configuring a login account on noether so that you can run your own PVM programs using your own pvm console, and help you run your first program using that set-up. Please follow carefully each step listed below.
I have created the following accounts: aburuos bartlbe cam jeremiah jimg jimr joyw lofchco marouf millerbe rayo sackeri sandeaf will
The password for your account is initially set to your last name (lower case) followed by "01".
$ passwd Changing password for rayo Old password: Enter the new password (minimum of 5, maximum of 8 characters) Please use a combination of upper and lower case letters and numbers. New password: Re-enter new password: Password changed.
ls -al total 12 drwxr-sr-x 3 rayo rayo 1024 Feb 9 17:30 . drwxrwsr-x 17 root staff 1024 Feb 10 06:52 .. -rw-r--r-- 1 rayo rayo 266 Feb 9 15:33 .alias -rw------- 1 rayo rayo 3575 Feb 10 21:52 .bash_history -rw-r--r-- 1 rayo rayo 129 Feb 9 17:25 .bash_profile -rw-r--r-- 1 rayo rayo 55 Feb 9 15:33 .bashrc -rw-r--r-- 1 rayo rayo 375 Feb 9 15:33 .cshrc
$ more .bash_profile # ~/.bash_profile: executed by bash(1) for login shells. umask 002 set -o vi export PVM_ROOT=/usr/lib/pvm3 export PVM_ARCH=LINUX
$ more .rhosts noether rayo
$ mkdir pvm3 $ cd pvm3
$ pwd /home/rayo/pvm3 $ tar -xzf /usr/doc/pvm/examples.tar.gz $ ls examples LINUX gexample.c inherit2.c mhf_server.c starter.c Makefile.aimk gexample.f inherit3.c mhf_tickle.c task0.c Makefile.mak gmbi.c inherita.c ptest.c task1.c OS2 hello.c inheritb.c rme.c task_end.c PGON hello_other.c lmbi.c slave1.c taskf.c Readme hitc.f master1.c slave1.f timing.c SP2MPI hitc_slave.f master1.f spmd.c timing_slave.c bwtest.c inherit1.c mbox.c spmd.f
$ cd examples $ pwd /home/rayo/pvm3/examples $ aimk hello hello_other making in LINUX/ for LINUX cc -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTS TRUCT -DHASERRORVARS -g -I../../include -o hello ../../examples/hello.c -L../.. /lib/LINUX -lpvm3 mv hello ../../bin/LINUX cc -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTS TRUCT -DHASERRORVARS -g -I../../include -o hello_other ../../examples/hello_othe r.c -L../../lib/LINUX -lpvm3 mv hello_other ../../bin/LINUX $ pvm pvm> spawn -> hello [4] 1 successful t40002 pvm> [4:t40002] i'm t40002 [4:t40002] from t40003: hello, world from noether [4:t40002] EOF [4:t40003] EOF [4] finished pvm> halt Terminated
$ cd .. $ pwd /home/rayo/pvm3 $ mkdir work $ cd work
$ pwd /home/rayo/pvm3/work $ cp ../examples/Makefile.aimk . $ cp ../examples/hello.c . $ cp ../examples/hello_other.c .
$ mv hello.c rfo_hello.c $ mv hello_other.c rfo_hello_other.c
cc = pvm_spawn("rfo_hello_other", (char**)0, 0, "", 1, &tid);
I also modified the error message line a little:
printf("can't start rfo_hello_other\n");
You may also want to modify your renamed hello_other.c to change the message it sends:
strcpy(buf, "rfo_hello, world from ");
$ diff Makefile.aimk ../examples/Makefile.aimk | more 23c23 < SDIR = $(PVMDIR)/work --- > SDIR = $(PVMDIR)/examples 68c68 < CPROGS = rfo_hello$(EXESFX) rfo_hello_other$(EXESFX) \ --- > CPROGS = hello$(EXESFX) hello_other$(EXESFX) \ 77c77 < HOSTCPROGS = rfo_helloh gexampleh master1h timingh gmbih --- > HOSTCPROGS = helloh gexampleh master1h timingh gmbih 91c91 < default: rfo_hello$(EXESFX) rfo_hello_other$(EXESFX) --- > default: hello$(EXESFX) hello_other$(EXESFX) 108,109c108,109 < rfo_hello$(EXESFX): $(SDIR)/rfo_hello.c $(XDIR) < $(CC) $(CFLAGS) -o $@ $(SDIR)/rfo_hello.c $(LFLAGS) $(LIBS) --- > hello$(EXESFX): $(SDIR)/hello.c $(XDIR) > $(CC) $(CFLAGS) -o $@ $(SDIR)/hello.c $(LFLAGS) $(LIBS) 112,113c112,113 < helloh: $(SDIR)/rfo_hello.c $(XDIR) < $(CC) $(CFLAGS) -o $@ $(SDIR)/rfo_hello.c $(LFLAGS) $(HLIBS) --- > helloh: $(SDIR)/hello.c $(XDIR) > $(CC) $(CFLAGS) -o $@ $(SDIR)/hello.c $(LFLAGS) $(HLIBS) 116,117c116,117 < rfo_hello_other$(EXESFX): $(SDIR)/rfo_hello_other.c $(XDIR) < $(CC) $(CFLAGS) -o $@ $(SDIR)/rfo_hello_other.c $(LFLAGS) $(LIBS) --- > hello_other$(EXESFX): $(SDIR)/hello_other.c $(XDIR) > $(CC) $(CFLAGS) -o $@ $(SDIR)/hello_other.c $(LFLAGS) $(LIBS)
$ pwd /home/rayo/pvm3/work $ ls Makefile.aimk rfo_hello.c rfo_hello_other.c $ aimk rfo_hello rfo_hello_other making in LINUX/ for LINUX cc -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTS TRUCT -DHASERRORVARS -g -I../../include -o rfo_hello ../../work/rfo_hello.c -L. ./../lib/LINUX -lpvm3 mv rfo_hello ../../bin/LINUX cc -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTS TRUCT -DHASERRORVARS -g -I../../include -o rfo_hello_other ../../work/rfo_hello_ other.c -L../../lib/LINUX -lpvm3 mv rfo_hello_other ../../bin/LINUX
$ pvm pvm> spawn -> rfo_hello [4] 1 successful t40002 pvm> [4:t40002] i'm t40002 [4:t40002] from t40003: rfo_hello, world from noether [4:t40002] EOF [4:t40003] EOF [4] finished pvm> halt Terminated
Copyright © 1999,
Ray Ontko
(rayo@ontko.com).
If you're curious about why I copyright, see
Peter Suber's
Why
Copyright Web Documents?.