next up previous
Next: Compiling and running Up: Lesson 5 -- Previous: The synopsis of

Customising eighth.c for your site

Before you compile the program, you should edit the source and alter some constants which refer to the process space. As you may have noticed from the examples already covered in this tutorial I have 13 machines in my farm. Thus, I can work with a process grid which is 4 x 3. This yields 12 processes in my new Cartesian communicator. One process will be left out.

You must make absolutely sure here that the rejected process is not the master process responsible for the communication! I actually don't take any precautions as to this point within this program, because the somewhat increased complexity would obscure the basic idea behind the topic of this lesson. But the program could be restructured in order to take care of that possibility. I ought to add it to my ``TO DO'' list.

If you have a smaller or a larger number of machines you should change the values of PROCESS_ROWS and PROCESS_COLUMNS so that the Cartesian process grid would fit into the process space available on your farm. If you change PROCESS_ROWS and/or PROCESS_COLUMNS, you should also change DISPLAY_ROWS and DISPLAY_COLUMNS. These parameters define the size of a large display matrix maintained by the master process which will be used to put together and display small matrices from worker processes. Thus we should have

DISPLAY_ROWS = PROCESS_ROWS * ROWS

and

DISPLAY_COLUMNS = PROCESS_COLUMNS * COLUMNS

The parameters ROWS and COLUMNS refer to the small matrices operated on by the workers.



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