next up previous
Next: The listing of Up: The LAM companion to Previous: Summary

Lesson 5 -- Cartesian grids

This is going to be a long lesson. It covers much of the material presented in Chapter 4, ``Intermediate MPI'', of ``Using MPI...''. The example program of Chapter 4 is in Fortran 77. Our example program is a little different, written in C, but it illustrates the same point.

We shall explore in this lesson the issue of process topologies and, in particular, the Cartesian topology. The Cartesian topology of process space is something you may wish to use for data parallel problems, for example solving partial differential equations on rectangular grids.

The data parallel approach usually is unsuitable for heterogeneous farms with widely differing CPU performance and load, because of the need to wait at the barrier for the slowest process whenever in-step operations are carried out. We have already encountered such a situation in section 4.6.3. For such systems the ``bank queue'' model or something similarly flexible seems to be the best approach. But if you happen to have an Alpha farm, or an SP2, or just a bunch of unused Jedis on a fast switch collecting dust somewhere in your garden shed, and if you happen to have the whole farm to yourself so that all machines are equally loaded, you may seriously consider using such a system for a data parallel problem. And being able to organise the processes into a Cartesian grid and shift the data between adjacent nodes may then come handy.

This is exactly what we are going to illustrate in this lesson.

The program, we'll be working with is called eighth.c and you will find it in our ftp anonymous area on cisr.anu.edu.au, directory /pub/papers/meglicki/mpi/intermediate, file eighth.c. Remember to transfer the file preamble.c, section 4.1, from the same directory too.

If you are curious what happened to sixth.c, and seventh.c, they can be also found in the same directory. They show eighth.c in the process of development.

For your convenience the listing of the program is provided in the next section.





next up previous
Next: The listing of Up: The LAM companion to Previous: Summary



Zdzislaw Meglicki
Tue Feb 28 15:07:51 EST 1995