Installing MPICH from Source for Slackware64

Home / Installing MPICH from Source for Slackware64

Installing MPICH from Source for Slackware64

December 5, 2015 | Article | 1 Comment

MPI CH is a high performance and widely portable implementation of the Message Passing Interface (MPI) standard. The original implementation was based on the Chameleon portability system to provide a light-weight implementation layer (hence the name MPICH from MPI over CHameleon).

Message Passing Interface itself is a system designed by a group of researchers from academica and industry to function on a wide variety in parallel computers.The standard defines the syntax and semantics of a core routines useful to a wide range of users writing protable message-passing programs in Fortran77 or the C programming language.

The goals of MPICH are:

  1. to provide an MPI implementation that efficiently supports different computation and communication platforms including commodity clusters (desktop systems, shared-memory systems, multicore architectures), high-speed networks and proprietary high-end computing systems (Blue Gene, Cray)
  2. to enable cutting-edge research in MPI through an easy-to-extend modular framework for other derived implementations

MPICH is distributed as source (with an open-source, freely available license). It has been tested on several platforms, including Linux (on IA32 and x86-64), Mac OS/X (PowerPC and Intel), Solaris (32- and 64-bit), and Windows. Please see the README, CHANGES, and RELEASE_NOTES files in the distribution for more details.

This article will cover about compiling and installing latest MPICH for Linux Slackware64.

Obtain the Materials

The latest version (per February 13th, 2013) is 3.0.2. To build the program sure we need the source. Download it from MPICH site or direct download from here.


Now we will extract, make the program, and later install it. Do the following:

cd mpich-3.0.2
make install

To check whether you have successfully install mpich, invoke this command on your terminal:

mpicc --version

Which you will be prompted with your gcc version. Yes, MPICH use gcc, or another compiler if you set so, to compile a program.


Now let’s make a simple MPI application. Copy this souce code and name it as mpi.c

#include <mpi.h>
#include <stdio.h>

int main(int argc, char** argv) {
   int size, rank;
   MPI_Init(&argc, &argv);
   MPI_Comm_size(MPI_COMM_WORLD, &size);
   MPI_Comm_rank(MPI_COMM_WORLD, &rank);

   printf("Hello world from %d of %d", rank, size);


   return 0;

Compile it using:

mpicc -o my_mpi mpi.c

There is a special way to run MPI program. In general, we do like this:

mpirun <program name> <list of arguments>

Thus, to run our program we invoke:

mpirun my_mpi

Now, what is the result? 😀

, ,

About Author

about author


A man who is obsessed to low level technology.

1 Comment
  1. Starting the MPI, Hello World - Xathrya.ID

    […] a basic MPI Hello World application and also discuss how to run an MPI program. If you have read this article, you will find similarity between this and those article. But in this article we will discuss it […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Share Buttons and Icons powered by Ultimatelysocial