What is it?
In case you already heard about mpicc or similar, let us start on a sane basis by avoiding a common confusion; MPI is NOT:
- a compiler
- a library
- a framework
- a programming language
MPI, which stands for Message-Passing Interface, is a standard that defines (as its name suggests) an interface for message-passing libraries. Concretely, it is a 850-page document that you can find on the website of the MPI forum; the organisation in charge of developing the MPI standard.
Why did we need MPI?
Back in the 1980s, if you were to develop an application that uses message-passing, typically for distributed-memory architectures, you had to design your message-passing solution from scratch, including a message-passing interface. The result was a plethora of implementations relying on different message-passing interfaces: Caltech Cosmic Cube, Intel Hypercube, Intel Paragon interfaces to name a few. Consequences:
- As a developer: the code you developed would not be portable to another library without having to rewrite it entirely. In addition, porting your code to another library implied to learn how to use the new message-passing library considered.
- As a hardware vendor: making your hardware attractive by optimising its performance for message-passing libraries was challenging since there were numerous of possible libraries to support. Moreoever, none of them was guaranteed to last, and newer ones could emerge at any time.
So, companies and universities decided to team up and make the MPI Forum; an organisation that would be in charge of defining a standard message-passing interface. With such a standard:
- As a developer: the code you write is instantly portable to any library since they all rely on the same interface. Also, learning curve: none; you can focus on the interface and don't have to learn any library specifics.
- As a hardware vendor: no matter the message-passing library used behind the scene, the interface exposed is the same. They can thus highly optimise their support for that single interface and instantly efficiently support all libraries.
In 1992, the first version of the standard was released, almost 30 years later, it is still here and heavily used in more or less all HPC codes.