Critical Software

News|Products|Services|Partners|Documents|Download|Contacts|What is MPI?
What is MPI?
The aim of this FAQ is to give a general overview of MPI (and WMPI) for people who are unfamiliar with the subject and to show how it can be used by application developers and software vendors to improve the performance of their software.

What is MPI?
What is WMPI?
What is WMPI II?
How do I use it?
Are there any alternatives?
What kinds of applications use it?
What performance improvements can I see?
Can I use it for desktop cycle stealing?
Who are your customers?
What do I need to do to try it?
Who do I talk to about incorporating WMPI II into my commercial application?
How do I find out more?




What is MPI?
The MPI (Message Passing Interface) standard defines a software library used to turn serial applications into parallel ones that can run on distributed memory systems. Typically these systems are clusters of servers or networks of workstations. The standard was created by the MPI Forum (www.mpi-forum.org) in 1994 and is now the de facto standard for parallel programming.

What is WMPI?
WMPI was the first implementation of MPI for Windows clusters and is the most widely used today with thousands of copies installed worldwide. WMPI adheres to version 1.2 of the MPI standard and has the following key features:

  • High performance implementation specifically designed for Windows architecture
  • Also runs on Linux and mixed Windows and Linux clusters (x86, x64 and IA64)
  • Robust, reliable and proven in industry
  • Backed by professional technical support
  • Easy to install and configure
  • Fully thread safe, OpenMP ready
  • Scalable to thousands of processes
  • Supports all popular high speed interconnects such as Infiniband, Myrinet and 10 Gbps Ethernet
  • Integrates with common cluster resource management and analysis tools
  • Works with a range of C, C++ and FORTRAN compilers and debuggers


What is WMPI II?
WMPI II incorporates the extensions to the original MPI standard which were made by the MPI Forum a few years after the MPI 1.2 standard was issued. WMPI II has the same extensive features as WMPI but also includes the MPI-2 extensions which provide groups of functions for:
  • Dynamic Process Creation - allowing for new processes to be started up "on-the-fly" once a job is running.
  • One Sided Communications - this allows one process to access the memory address of another without having to set up a two way communication path between them.
  • Parallel I/O - allows multi-process access to/from a parallel file system


How do I use it?
The MPI library is used to distribute processes to nodes in a cluster and provide a way for the processes to communicate with each other. MPI function calls (e.g. MPI_Init, MPI_Send, MPI_Recv)are inserted into normal C, C++ or Fortran code at points in the code where compute intensive algorithms occur, e.g. when solving a non-linear wave equation.

A simple example follows:

/******************************************************************************
Hello World example:

In this example the rank 0 of MPI_COMM_WORLD waits for messages from the
other ranks. When a message is received it is displayed (sent to stdout).

Copyright 2005 (c) Critical Software SA
. http://www.criticalsoftware.com
. http://www.criticalsoftware.com/hpc
. wmpi@criticalsoftware.com

*****************************************************************************/

#include
#include

#define MESSAGELENGTH 128 /* The length of the messages that */
/* we are going to transmit */
#define TAG 100 /* The tag to use for the transmissions */


int main(int argc, char** argv)
{
int nCommSize;
int nCommRank;
int nCounter;
char pchMessage[MESSAGELENGTH];
char pchNodeName[MPI_MAX_PROCESSOR_NAME];
int nNodeNameSize;

/* Initialize WMPI II: */
MPI_Init(&argc, &argv);

/* Determine what the world looks like and our own position in it: */
MPI_Comm_size(MPI_COMM_WORLD, &nCommSize);
MPI_Comm_rank(MPI_COMM_WORLD, &nCommRank);
printf ("I am rank %d of %d in MPI_COMM_WORLD\n", nCommRank, nCommSize);

/* If I am rank 0 I'll receive messages from the other ranks in */
/* MPI_COMM_WORLD and send them to stdout: */
if (nCommRank == 0) {
for (nCounter = 1; nCounter < nCommSize; nCounter++) {
/* Receive a message from a process: */
MPI_Recv(pchMessage,
MESSAGELENGTH,
MPI_CHAR,
MPI_ANY_SOURCE,
TAG,
MPI_COMM_WORLD,
MPI_STATUS_IGNORE);

/* Display the received message: */
printf ("I received the following message: %s\n", pchMessage);
}
} else /* I am NOT rank 0 */ {

/* Get my node name */
MPI_Get_processor_name(pchNodeName, &nNodeNameSize);

/* Compose my message: */
sprintf(pchMessage,
"Hello world from rank %d at %s",
nCommRank,
pchNodeName);
/* Send it: */
MPI_Send(pchMessage, MESSAGELENGTH, MPI_CHAR, 0, TAG, MPI_COMM_WORLD);
}

/* Flush the output so it's shown when using mpiexec */
fflush (stdout);

/* Pause rank 0 so that the output can be verified: */
if (nCommRank == 0) {
printf("\nPress ENTER to exit...\n");
fflush (stdout);
getchar();
}

/* Finalize WMPI II: */
MPI_Finalize();
return 0;
}

See the online documentation available from our download site for further examples.

Are there any alternatives?
MPI is now the de-facto standard for writing parallel applications; superseding older methodologies such as PVM (Parallel Virtual Machine) because the message-passing paradigm is portable and scalable. Critical Software also produces a fault tolerant message passing framework called WMX. This uses the master-slave paradigm to ensure that jobs can continue running even if a node fails. WMX is used by Aspeed (www.aspeed.com) as a basis for their Accelerant product which provides an easy-to-use set of tools for parallelising code without the need for complex code rewrites. This can be a good alternative for companies who want the performance benefits that clusters provide, but don't have the necessary programming skills to use MPI.


What kinds of applications use it?
A wide range of applications can benefit from being run in parallel but the majority of our customers are in the fields of FEA (Finite Element Analysis) and CFD (Computational Fluid Dynamics). These types of application are highly compute intensive and require large amounts of computing power each time a simulation scenario is tested. Examples of where these applications are used include the simulation of car crashes for safety testing by vehicle manufactures and simulating underground oil reservoir flows as they are pumped by oil rigs.

What performance improvements can I see?
This depends on many factors such as how you write your code and what kind of hardware you run on. It is possible to achieve near-linear speedup if conditions are right. That means that every time you double the number of processors working on a job, you double the speed at which the problem can be solved. The graph below shows WMPI II being run against the NAS benchmark on 2, 4, 8 and 16 processors:



The following graph shows WMPI II performance compared with MPICH:



Can I use it for desktop cycle stealing?
Yes you can. Several customers use WMPI II to run over a network of Windows workstations (running XP or server editions). So if you are running a compute intensive application and have some spare workstations nearby, you can harness their processing power by running the application in parallel on those workstations using WMPI II (see "How do I use it?" FAQ for more details). WMPI II can also be used with scheduling and load balancing tools such as LSF (from Platform Computing) which helps to run MPI jobs in these non-dedicated cluster environments.

Who are your customers?
We have an international customer base covering commercial and academic applications. The majority of our customers are ISVs (Independent Software Venders) who incorporate WMPI or WMPI II into the parallel versions of their software applications. Customers include: MSC.Software, ANSYS, Landmark Graphics, Aspeed, Honeywell Space Systems, Northrop Grumman, MIT, British Aerospace, Mission Research Corporation, Deutsche Telekom, Swedish Research Defence Agency, TNO, Numeca, Chevron-Texaco, VTT, Given Imaging, Ministry of Defence (UK), University of Florida, ACIS Laboratory, San Diego Supercomputing Center, University of Toronto, University of Quebec, RWTH Aachen, University of Hamburg, Karlsruhe, Korea Institute of Industrial Technology, Tsinghua University/Beijing, Tokuyama College of Technology, Univ Ibaraki, M.I.T., University South Florida, Penn State, Monash, Universita di Salerno, Cassino, Universidade Minas Gerais…

What do I need to do to try it?
You can download a free trial version of WMPI or WMPI II directly from this website. The software is fully functional and comes with a license key that will activate the software for 40 days for 4 CPUs.

Who do I talk to about incorporating WMPI II into my commercial application?
You can contact one of our sales representatives on wmpi-sales@criticalsoftware.com for details on license agreements. We offer a range of options from single site licenses and reseller agreements through to full embedded OEM agreements.

How do I find out more?
You can contact us at info@criticalsoftware.com and we will be happy to answer any further questions you have. You can find further information on MPI programming on this site:
www-unix.mcs.anl.gov/mpi/