Next | Prev | Up | Top | Contents | Index

Group Management Functions

As far as groups are concerned, the main difference between PVM and MPI is that PVM groups can be dynamic, whereas MPI groups are static. In PVM, a task can belong to multiple groups and can join and leave a group an arbitrary number of times, so that groups can change dynamically at any time during a computation. Additionally, arbitrary groups can be formed by tasks.

In contrast, in MPI a group cannot be built from scratch, but only from other groups that have been defined previously. MPI has two predefined groups: MPI_GROUP_EMPTY (a group with no members), and the group associated with the initial communicator MPI_COMM_WORLD (consisting of all processes), which forms the base group upon which all other groups are defined.

If the PVM program uses dynamic groups, modify it to use only static groups before it can be ported to an MPI program. Note that most applications do not need dynamic groups.

Once the PVM program to be ported deals only with static groups, replace all instances of pvm_joingroup() with MPI_Comm_group() or one of its variants. Replace all occurrences of pvm_lvgroup() with MPI_Group_free().


Next | Prev | Up | Top | Contents | Index