next up previous
Next: Start-up Facilities and Up: Prototype Systems Previous: Prototype Systems

Mapping Identifiers

Processes in an MPI application are identified by referencing a tuple pair such as {process group, rank} or {communicator, rank}. PVM also has this capability when using the group library, in the form of {group name, instance}.

In the simplest case, where all the processes in an MPI application group have access to PVM, a single pair of calls can be used to register a process group with the current PVM group server. The functions are available in both C and Fortran bindings:

info = pvmpi_register(char *group, MPI_Comm comm, int *options);

info = pvmpi_leave(char *group);

call pvmpifregister( group, comm, options )

call pvmpifleave ( group )

Both functions are collective: all processes in the MPI communicator have to call them together.

The pvmpi_leave command is used to clean up MPI data structures and to leave the PVM system in an orderly way if required.

Processes can register in multiple groups, although currently separate applications cannot register into a single group with this call. The register call takes each member of the context and makes it join a named PVM group so that its instance number within that group matches its MPI rank. Since any two MPI applications may be executing on different systems using different implementations of MPI (or even different instances of the same version), the communicator usually has no meaning outside of any application callable library. The PVM group server, however, can be used to resolve identity when the groups names are unique.

Once the application has registered, an external process can now access any registered process by using that processes group name and instance via the library calls pvm_gettid and pvm_getinst. When the groups have been fully formed without any errors occurring, they are frozen and all their details are cached locally so that there are very few system over-heads for accessing them using the group library.

Figure 3 shows the previous example applications using the register group call, and figure 4 shows the new groups communicating using conventional PVM calls.

   figure71
Figure: Two separate MPI applications register their process groups by using pvmpi_register().

   figure76
Figure: The zeroth rank ``Air Model'' process sending a PVM message to the first rank ``Ocean Model'' process with pvm_send(pvm_gettid(``Ocean_Model'',1), tag)

Client-server interactions often require waiting for applications partners to start. To handle this situation, an additional blocking call has been provided that waits until a group has completely registered before returning its size and caching its addresses locally:

groupsize = pvmpi_waitfor (char* group);

call pvmpifwaitfor ( group )

This routine not only removes the need for a user to poll the group server, but also helps prevent races caused by the dynamic nature of PVM groups [#GROUPS1##1#]. If two applications are started separately, they may not have fixed sizes, and so they may not know when it was safe to start communicating with each other without additional handshaking. This routine eliminates the need for such additional handshaking.



next up previous
Next: Start-up Facilities and Up: Prototype Systems Previous: Prototype Systems



Jack Dongarra
Fri Apr 12 11:15:36 EDT 1996