Due Date: noon, Monday May 25, 1998 (with no late submissions after noon Tuesday, May 26 in order to submit final grades
The objective of this assignment is to code using derived data types and communicators and intercommunicators, and see applications where you might want to use these constructs. There is no experimental report, just coding!
Textbook, chapter 6 and 7.
Create an MPI program that splits the processes in MPI_COMM_WORLD into a communicator consisting of ``server" processes and a communicator of ``client" processes. You can split them any way you like as long as there are an equal number of servers and clients. The server set should have a master server which is the only server that receives requests from the client processes directly. The master server can receive messages from any client, and as it receives these messages it sends the requests along with the rank of the client that sent it (identified from the master server's receive statement) to a second server. This second server, the ``worker" server, should receive messages from the master server, perform its ``service" of adding 2 to the number received, and then send the result directly back to the original client. The worker server should not send any messages back to the master server. It sends directly back the original client.
In this program, no communication should be done through MPI_COMM_WORLD. All communication should be done through the server and client communicators and an intercommunicator which you set up.
For grading purposes, each client should send 10 messages, the first being its rank, the second being its rank+1, third being rank+2,... You can assume that the servers know how many messages they will receive. For extra credit, you can have the servers work in a way that they will take any unknown number of messages and service them.
Note that only 2 of the servers actually are involved in this particular assignment.
Printing instructions: Your program should print the following information:
Compile and run your program.
Hand in the program and a script of one run.
This document was generated using the LaTeX2HTML translator Version 98.1p1 release (March 2nd, 1998)
Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html -split 0 lab6.tex.
The translation was initiated by Lori Pollock on 1998-05-14