[Next] [Previous] [Index]
Next: Programming:How to do it Previous: ncattdef Index: Contents

Programming in Parallel


Introduction

The programs in the pips/filters directory use a very simple protocol in a master - slave model. The master program spawns tasks on all available hosts prior to data processing and shuts them down afterwards.

It calls the function pipsJobManager() which loads the data from a file, segments it and sends it to the tasks. The tasks only execute pipsProcPar() which processes the datafragments.

Note:
The main() function is in the module ncprocess.c but the pvm applications are named after the file in the pips/filters directory that contains the functions pipsJobManager() and pipsProcPar() since these are the variable parts of the application.
The pipsJobManager() keeps all tasks busy with unfinished datafragments until all fragments have been processed. When less fragments than tasks are left, unfinished fragments are reprocessed by other tasks, so redundant computation will occur. This technique has the following advantages:

The job competition proofed to be very usefull, as during the authors work with this package, it quite often happened, that a host just was unable to finish a job due to overload (by other processes). Although it took longer in that case, the program still terminated.


Frank Heimes (Dr-Frank.Heimes@epost.de), 31 Jan 1995
Phone: +49 (721) 6091 - 424, FAX: +49 (721) 6091 - 233
http://members.tripod.de/DrFrankHeimes/pips/parIntro.html