This is a simple hello world program. Each processor prints out it's rank and the size of the current MPI run (Total number of processors). |
A simple send/receive program in MPI |
Shows how to use probe and get_count to find the size of an incomming message. |
This is a simple isend/ireceive program in MPI. |
This is a simple broadcast program in MPI. |
This program shows how to use MPI_Scatter and MPI_Gather. Each processor gets different data from the root processor by way of mpi_scatter. The data is summed and then sent back to the root processor using MPI_Gather. The root processor then prints the global sum. |
This program shows how to use MPI_Scatter and MPI_Reduce. Each processor gets different data from the root processor by way of mpi_scatter. The data is summed and then sent back to the root processor using MPI_Reduce. The root processor then prints the global sum. |
This program shows how to use MPI_Alltoall. Each processor send/rec a different random number to/from other processors. |
This program shows how to use MPI_Gatherv. Each processor sends a different amount of data to the root processor. We use MPI_Gather first to tell the root how much data is going to be sent. |
This program shows how to use MPI_Alltoallv. Each processor send/rec a different and random amount of data to/from other processors. We use MPI_Alltoall to tell how much data is going to be sent. |
This program is designed to show how to set up a new communicator. We set up a communicator that includes all but one of the processors, The last processor is not part of the new communcator, TIMS_COMM_WORLD. We use the routine MPI_Group_rank to find the rank within the new connunicator. For the last processor the rank is MPI_UNDEFINED because it is not part of the communicator. For this processor we call get_input The processors in TIMS_COMM_WORLD pass a token between themselves in the subroutine pass_token. The remaining processor gets input, i, from the terminal and passes it to processor 1 of MPI_COMM_WORLD. If i > 100 the program stops. |
Shows how to use MPI_Type_vector to send noncontiguous blocks of data and MPI_Get_count and MPI_Get_elements to see the number of elements sent. |
Shows a short cut method to create a collection of communicators. All processors with the "same color" will be in the same communicator. In this case the color is either 0 or 1 for even or odd processors. Index gives rank in new communicator. |
This program shows how to use mpi_scatterv. Each processor gets a different amount of data from the root processor. We use mpi_Gather first to tell the root how much data is going to be sent. |