Design of such a library requires tradeoffs among convenience, efficiency, and scalability. We prefer to allow he user to make such decisions by providing multiple modes in which the processes created and controlled by the user interact with the X Window server. They are:
The independent mode is easily understood. In the Multi-Server mode, the MPE_Open_graphics call selects some nodes as servers; these make a connection to the graphics display. An MPI communicator that contains only those server nodes is created. Subsequent graphics calls from non-server processes send messages to some server process; graphics calls on a server process both make Xlib calls and check for incoming graphics requests from non-server nodes. Note that for the Multi-Server mode to work, we need the contexts of MPI, since pending server requests must be kept independent from operations such as MPI_Recv( ..., tag = MPI_ANY_TAG, source = MPI_ANY_SOURCE, ... ) .
The Shared-Server mode is like the Multi-Server mode, except that the server nodes only act as graphics servers. In Collective mode, drawing operations and input operations are synchronous and collective. As in other MPI collective operations, all processes in the associated communicator must make the call.