CS 574 - HW 2

Due Wednesday, October 4, 2000

Use the MPI package on Medusa to create a tool to display the load average on each of a set of processors. Your program should work like this:

  1. Every process started by MPI (including Process 0) should periodically (every couple of seconds) read its /proc/loadavg file and send its current load average to Process 0.
  2. Process 0 should keep reading all the values as they come in, and maintain a display of all the load averages. The format of the display is pretty open; it can be a column of numbers for the processes, or a table showing them all, or a CGI script that keeps updating a browser display, or an X window application...
  3. Note: your program should not have any fixed number of processes hard-coded into it. It should use MPI_Comm_size (Rick was right about what it's called) to find out how many processes it has to deal with.

Sample code: hello.c and load.c. I've modified hello.c so it handles an arbitrary number of processes now.


Last modified: Wed Sep 27 14:22:06 MDT 2000