ring_mpi


ring_mpi, a C++ code which estimates the time it takes to send a vector of N double precision values through each process in a ring.

Process 0 sends N double precision values to process 1, which passes them to process 2, and so on, until process P-1 sends them back to process 0. The time for this transmission is recorded. The experiment is repeated several times, and for several different array sizes N.

The latest versions of MPI no longer support the special C++ MPI bindings, so the examples given here have reverted to using the C MPI bindings.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

ring_mpi is available in a C version and a C++ version and a Fortran90 version.

Related Data and Programs:

ring_mpi_test

mpi_test, a C++ code which uses the message passing interface (MPI) for parallel computations in a distributed memory environment.

Reference:

  1. Peter Pacheco,
    Parallel Programming with MPI,
    Morgan Kaufman, 1996,
    ISBN: 1558603395,
    LC: QA76.642.P3.

Source Code:


Last revised on 07 April 2020.