Assessment 3 on PVM / MPI and beyond

Theory

10 points

For each only give a brief answer.

  1. Compare and contrast PVM groups and MPI collective operations (4)
  2. Which MPI function is most like pvm_psend() and why? (2)
  3. Which PVM function is equivalent to MPI_Comm_rank? (1)
  4. How would you port a PVM application that sends messages that are each made of different data types concatenated into an MPI application? Would it be faster? (Give two methods). (3)

Programming Problems

Each programming example must be mailed to me, in a single tar file containing the source code, a valid makefile, and a dump of any generate output.

In PVM output can be captured in the PVM console by starting the application by spawn with the -> argument added.

i.e. pvm> spawn -> -5 prog

Where 5 is the number of tasks, and prog is the program name. If its a SPMD code that spawns its own tasks, then you only need -1 to start a single master.

Or a better method is to use the pvm_catchout() in any master program.

Problem 1

Implement this using MPI in C. Use only send and receive operations. (6)

Re-implement this using just two collective operations. (Hint, think about the type of operation that is being performed by the ring on the data). (4)

Problem 2

Only implement this in C. (10)

Problem 3

Its possible to calculate PI by:

See the pi.c example code on my CS594 page for an example of an implementation.

The actual problem:

The above implementation(10) is not fault tolerant.

Re-implement it so that a slave task can be killed, and the master can then restart it and still get the final answer as required. (This code should only require changes to the master/first process).

Use pvm_notify(PvmTaskExit,...) to detect failures. (10)

Marking

All answers should be emailed to me at fagg@cs.utk.edu by Tuesday the 9nd of Feburary, 1999. I will cover the answers to this assessment on the 10rd of Feburary.

The numbers in brackets (2) denote the number of marks per question, the maximum score is 50.