Computer Systems Design (COMP6281 ) Lab Tutorial
Note: |
1 About the Beowulf lab at Concordia.
http://www.cs.concordia.ca/Beowulf/
http://www.scyld.com/support/docs/beowulf.html
You need a remote connection software that support SSH(Secure Shell) protocol to access the system.
Connecting from a Unix/Linux machine in the CS lab: | Type "ssh -X guthlaf" to login with user name and password of your CS account, as long as you have registered this course. |
Connecting from a Windows2000 machine in the CS lab: | You
can use either "Telnet
(Tera Term)" or "SSH Secure Shell
Client", both are available on the desktop
of each Windows2000 machine.
Telnet: SSH
Secure Shell Client: |
Connecting from a Unix/Linux machine connected to the Internet at home: |
This
is similiar to connecting to it from a Unix/Linux machine in the lab,
except that the host name should be guthlaf.cs.concordia.ca,
namely you need to type: |
Connecting from a Windows95/98/2000/XP machine connected to the Internet at home: | (1) Download
and install a SSH program software onto your machine. (2) Follow the same instruction as above: connecting from Windows2000 machine in the lab, except that the host name should be guthlaf.cs.concordia.ca |
CS home directory |
Your CS home directory is available under: /cshome/... |
SSH software download: |
(1)
Putty (2)
Tera Term Telnet (3)
SSH Secure Shell Client |
Resources: |
MPICH
home page: |
Quick instructions on compilation and execution: |
Compilation: Execution: |
MPI sample: |
////////////////////////////////////////////////// #include <stdio.h> rc = MPI_Init(&argc,
&argv); [li_wang@guthlaf
mpi]$ mpicc -o hello hello.c |
Resources: |
PVM
home page: |
Quick instructions on compilation and execution: |
(1)
Compilation: (2)
Copy your executable files to the directory: (3)
Start
PVM (4)
Configure the runtime environment: An alternative way of
PVM configuration is to predefine your configuration in a host file, for
example: |
PVM manual |
PVM(1PVM) PVM Version 3.4 PVM(1PVM) NAME SYNOPSIS DESCRIPTION When started pvm determines
if PVM is already running and if not automatically executes pvmd3 on this
host, passing pvmd3 the command line options and host file. Thus PVM need
not be running to start the console. Once started the console prints the
prompt: The following console
commands are available: pvm reads $HOME/.pvmrc
before reading commands from the tty, so it can be used to customize the
console environment, for example: EXAMPLES pvm
hostfile |
PVM examples: |
(1)Download
the zipped examples file. Extract the files
and copy them to the directory ~/pvm3/examples/ |
Q1 |
For the MPI, I always meet problem during linking the library although
I already specified the path for the library in the makefile. In the end,
I copied my .cc file into the same directory where the library files are,
and bypass the problem. The attachment is my makefile for the MPI program
stored in the current directory; and the library file is libgd.a and is
stored in the gimage directory. TARGET = Convolute $(TARGET): $(OBJS) Convolute.o: Convolute.cc true: // |
Q2 | More serious problem is about the PVM. I do not
know what I need to set the PVM_ROOT and PVM_ARCH ? I tried some pathes,
but it does not work. So I even can not compile my sample files using "aimk".
It will be very nice of you to give me some instructions on how to set the
environment for the PVM. Answer: You don't need to set the PVM_ROOT and PVM_ARCH. I guess you probably got some hints from some students from last semester. I have noticed that the configuration of the lab had been changed. To solve the problem, you can either use "unsetenv" to remove the environment variables, or set the variable as follows: setenv PVM_ROOT /usr/share/pvm3 setenv PVM_ARCH BEOSCYLD |
Q3 | Is it possible to connect to the cluster(lab)
from home develop and run my program? How do we connect? (ssh?) Answer:
Yes. Read the instruction above and download the software. I was told that there's a web page about MPI and I don't remember exactly where this page is. It's something about "Concordia XXwulf" in which I don't remember what XX is. Answer: http://www.cs.concordia.ca/Beowulf/ |
Q4 |
Could you please tell me how I can run the sequancial code that the professor
gave out for assignment 1? |
Q5 | I found that when I run my program on multiple
hosts ( using add .2, add .3 etc ), my program always be throwed out because
of "Segmentation fault (core dumped)". Answer: This seems a memory violation problem. Check your program to see whether there is any memory violation statements, such as. array boundary |
Q6 | When I run my program on just one host, I found
that the main program occupies most of the cpu time, the child process only
gets very little time to run. So the main process is very busy in a loop
to continue to check if it gets the feedback from the children, but the
children have little time to run, so the parent process wastes a lot of
time in the loop. Answer: If you use non-blocking receive in a loop and that loop does nothing except for receiving, definitely it won't be broken up to allow other process to get in. If this is the case, please use blocking recieve instead of non-blocking recieve loop , or let the process sleep for some time in order to release the resource for other processes. However, it's only for multi-process on one host, not for parallel. |
Q7 |
I use pvm_mcast() to send
a terminal signal to all children inside main process, but it looks that
the children do not receive it. |
Q8 |
I am trying to write a program using PVM, I compiled the demo program
hello along with hello_other and I was able to run it. The problem is
that I don't see any outputs from the printf() function. I tried fflush(stdout),
fprintf(stdout, ...) but nothing is working as it is supposed to. |
Q9 | When I develop my pvm program, I tried the pvm_joingroup(),
but it does not work. I am not sure if it is because of my program or this
function does not work on the beowulf cluster? Answer: You may look at the "gexample.c" which shows a typical use of pvm_joingroup(). To compile it, a separate library libgpvm3.a must be linked with your programs that make use of any of the group functions. To make it easy, you can use "aimk" to compile your program. You need to follow the compiling and linking statements of gexample.c in the file "Makefile.aimk" and modify it for your own program. |
Q10 | Is there a synchronous pvm_send() function? (I
searched by google, but did not find it.) Answer: No, as I know the current PVM only support asynchronous message sending ( pvm_send and pvm_psend ). However, PVM support blocking recieve(pvm_recv and pvm_precv) and non-blocking recieve(pvm_nrecv). If you run on a multi-node PVM, you should not have this problem as I understand. |
Q11 |
I tried to use the Convolute, and get the attached pictures. It seems
that there is no mask. It just changed the color. Is this correct? If
not , what's wrong? If it is correct, why there is no masks? |
Q12 |
I have already compiled and run the program by using g++. However, I
found that mpicc cannot compile the original Convolute.cc. There are lots
of errors. It seems that mpicc does not support c++ because many errors
are about cout and ifstream. Also, the linker cannot find the function gdImageCreateFromGif and gdImageGif? |
Q13 | I want to send a masked image, which is a type
of "class Image". Can I send this by using MPI_SEND, or is there
another function to perform this? Answer: There are many ways to overcome this problem, e.g. object serialization or extracting the data from your object. |
Q14 |
Is there a limit of the buffer size in MPI_SEND? |
Q15 |
"pl_24486: p4-error: interrupt SIGSEGV: 11 Do you know what does
it mean? |
Q16 | How can i access my programs stored in my directory
when i log in to Guthlaf from Linux? Answer: Your CS home directory is available under: /cshome/... e.g. Your Unix home directory: /cshome/grad/your_account or /cshome/ugrad/your_account Your NT home directory: /cshome/nthome/your_account |
Q17 |
have problems running the code and seeing output..though the program
compiles well. Does it have to do with the environment (directory) ? and
could u please tell me where to place my executable file.. |
Q18 |
I think I have problem at message passing. Master sends data to slave,
but seems not receive data from slave correctly. How can I debug it? I
read some about debug. But still do not really understand how it works.
Can u tell me a simple way to debug message passing. |
Q19 | It seems that I cannot add more than 9 processors
in PVM now. What's wrong with it? Answer: The following are the hardware Information of the cluster 11 IBM X330 model
8674 31x dual CPU node. CPU: 2 x Pentium III 1.26 GHz 10 Compute Nodes: CPU: 2 x Pentium III 1.26 GHz That's to say, you are allowed to add nodes from
.0 to .9 such that you may have a
PVM with maximum of 11 nodes (22 CPUs). |
Q20 | How we hand in our assignment? Upload the code
to somewhere or put it in disk? Answer: Upload your complete assignment and hand in a hard copy(paper). You don't need to submit a floppy. |
Q21 |
I was able to start and stop pvm on guthlaf a few minutes ago. Now, when
I try to start pvm it shows error msg: |