Supercomputing Applications
Lab 07 Report Form - MPI Programming #3
Send a message in a "ring" fashion from
process 0 --> proc 1 --> ... --> proc (n-1) --> proc 0
Your name: __________________________________, Period: _____, Date __________
What does process 0 (rank 0) have to do? Paste in your code showing how process 0 starts this pattern of passing the salary to the other processes.
What is the rank of the last process? Is it n or is it n-1 (n is the total number of processes running).
Paste in your code for the last process in the "ring" of people. What process is this last node passing it's information to?
If a process is rank k, where k is not the the first or last process, what process does k pass its information to?
Paste in your code for the processes that are in between the first and last processes in this "ring".
In your sample running of your program what is the random number generated by process 0?
What are the various salaries you are using for each process (each person in the party)?
process 0 __________, process 1 ___________, process 2 ___________,
process 3 __________, ... (other processes? -->)
What is the average of these salary values that you're using? _____________
In your sample running of the program what is the final value returned to process 0 from the last process in the ring?
What is the average salary that your program calculates? Does this value check with the actual average that you calculated above?
Paste in a copy of the output of this sample running of your program.
How many processes are you using in your sample run? _____ Run a version now with 16 processes. Paste in the output.
CHECK TO SEE IF YOU HAVE LEFT ANY PROCESSES RUNNING: ps -fd This command lists all the processes running. If you see any with your username, use kill value, where value is the process id number. For example, kill 12345 kills your process numbered 12345.
CHECK TO SEE IF YOU HAVE LARGE EXECUTABLES LEFT: ls -l lists your files with the file size. Use rm filename to remove unnecessary large files. (like core or a.out)