UK National HPC Service

Computer Services for Academic Research Logo
Home | Helpdesk | Machine Status | Search | Apply



The Message Passing Interface, MPI, is a library specification for message-passing in C, Fortran and C++ codes, proposed as a standard by a broad based committee of vendors, implementors and users. There have been 2 such standards of note, the MPI 1.2 standard and the MPI 2 standard. Most vendors, including SGI, have implemented the 1.2 standard with some parts of the MPI 2 standard.

MPI exploits distributed and shared memory systems allowing multiple processes to pass messages between themselves, this allows multiple processors to share the work.

Restrictions on Use

There are no restrictions on use, except that not all parts of the MPI 2 standard have been implemented. To see which parts please look at the release notes available at the SGI publications website.

Set Up Procedure

MPI is part of the mpt (message passing toolkit) suite provided by SGi and can be accessed using modules. When you log in you will have a default mpt module loaded but you may wish to switch to a newer module.

Once MPI calls have been added to your code you will need to link in the MPI library (-lmpi on the command line).

Running the Code

Codes should be run using the command mpirun which takes various other arguments including the number of processors and the executable to be run in parallel. Here is a short example of how to run a 4 processor program called helloworld:

mpirun -np 4 ./helloworld

When running larger jobs these should be run in batch so you should read the notes provided on the specific machines.

Further Information

Further information is available at:

Page maintained by This page last updated: Tuesday, 17-Aug-2004 15:33:18 BST