ex00 f_ex00.f  c_ex00.c 

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).

 

ex01 f_ex01.f  c_ex01.c 

A simple send/receive program in MPI

 

ex02 f_ex02.f  c_ex02.c 

Shows how to use probe and get_count to find the size of an incomming message.

 

ex03 f_ex03.f  c_ex03.c 

This is a simple isend/ireceive program in MPI.

 

ex04 f_ex04.f  c_ex04.c 

This is a simple broadcast program in MPI.

 

ex05 f_ex05.f  c_ex05.c 

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.

 

ex06 f_ex06.f  c_ex06.c 

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.

 

ex07 f_ex07.f  c_ex07.c 

This program shows how to use MPI_Alltoall. Each processor send/rec a different random number to/from other processors.

 

ex08 f_ex08.f  c_ex08.c 

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.

 

ex09 f_ex09.f  c_ex09.c 

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.

 

ex10 f_ex10.f  c_ex10.c 

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.

 

ex11 f_ex11.f  c_ex011.c 

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.

 

ex12 f_ex12.f  c_ex12.c 

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.

 

ex12 f_ex13.f  c_ex13.c 

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.

 

makefile

mpi.tar