A taste of things to come


Up: Sending and Receiving messages Next: Broadcast and Reduction Previous: Six Function MPI

The following examples show a C and Fortran version of the same program.

This program computes PI (with a very simple method) but does not use MPI_Send and MPI_Recv. Instead, it uses collective operations to send data to and from all of the running processes. This gives a different six-function MPI set:

MPI_Init
MPI_Finalize
MPI_Comm_size
MPI_Comm_rank
MPI_Bcast
MPI_Reduce



Up: Sending and Receiving messages Next: Broadcast and Reduction Previous: Six Function MPI