NCSA Home
Contact Us | Intranet | Search

ncsa

Message-passing Standards: MPI and PVM

  1. Overview
  2. When to Use Message Passing
  3. MPI
    1. Introduction
    2. Using MPI at NCSA
    3. Getting Started
    4. Point-to-Point Communication
    5. Collective Communications
    6. Debugging and Timing MPI Codes
    7. Documentation
  4. PVM
    1. SGI-Cray Origin 2000
    2. Documentation and Online Resources


1. Overview

Message passing is a programing paradigm where you directly control the flow of operations and data within your parallel program. A message-passing library lets you explicitly tell each processor what to do and provides a mechanism for you to transfer data between processes.

Message-passing libraries are implemented on NCSA HPC systems using two separate standards, PVM (Parallel Virtual Machine) and MPI (Message Passing Interface). PVM, written at Oak Ridge National Lab, is a portable heterogeneous message-passing system. It provides tools for interprocess communication, process spawning, and execution on multiple architectures. The PVM standard is well defined, and PVM has been a standard tool for parallel computing for several years.

MPI has come into the mainstream more recently than PVM, but it is a mature standard that has been available for several years. The public domain implementation was written at Argonne National Lab and is currently available for virtually all major computer architectures. It has been widely supported by system vendors who have developed highly optimized native implementations for systems such as the SGI Origin2000. MPI is intended primarily for data-parallel problems. Therefore, it does not have the flexibility of PVM's dynamic process spawning, but its collective operations (like gather-scatter operations) and asynchronous message passing capabilities (asynchronous sends and receives) are much more sophisticated and configurable than those in PVM.

2. When to Use Message Passing

The decision to use message passing to implement your parallel code should not be taken lightly. Using message passing to implement a code is often substantially more work than using compiler directives. For many codes that involve mostly array operations, the native Fortran or C compiler produces as good if not better performing code than a message-passing implementation. There are several situations in which message passing is the best solution to your parallel programming problem.
  • If you already have a large code written in PVM or MPI, it should compile and run without difficulty on NCSA HPC systems. However, for the SGI Origin 2000, you may have to adjust your code if porting from a 32-bit to a 64-bit architecture.
  • If your code is "embarrassingly parallel" on a coarse level, you may want to consider message passing. For instance, if your code has an inherently serial section that must be run independently multiple times, you may want to consider writing a wrapper to your serial code using a message-passing library.
  • If your code cannot be parallelized by making parallel do loops, it may not parallelize well using the compilers. However, there are codes that fall into this category where the algorithm is parallelizable. In this case, you would have to do a fairly substantial amount of work to create a message-passing version of your code. If you did so, however, your code may perform better than if you simply used the compiler and compiler directives.
  • If you require your code to be highly portable acrosss parallel supercomputing architectures, you should consider MPI and High Performance Fortran (HPF) [see the NCSA HPF page for information about HPF] for your code development. Both are very portable and widely available ways to implement data-parallel codes.

You should restrict all message passing jobs on NCSA HPC machines to one host (SGI systems) or one subcomplex (HP-Convex) only.