CS 374 (HPC): Installing MPE with OpenMPI

The MPI Parallel Environment (MPE) is a library of various utilities created at Argonne National Labs to facilitate MPI computing. Among other useful things, it includes a shared-display parallel library for displaying graphics on X-11 windowing systems, including Unix, Linux, MacOS X, etc.

If you install Argonne's implementation of MPI (a href="http://www.mcs.anl.gov/mpi">MPICH), then MPE is installed along with it.

However, if you have instead installed OpenMPI (which is a bit simpler to use), then MPE must be installed separately. This page describes how to do so.

  1. Download the MPE tarball from Argonne's site. Save it somewhere convenient, such as your desktop.
  2. Extract the MPE folder/directory from the tarball. Try double-clicking the tarball; if that doesn't work, open up a terminal, cd to the place where you downloaded the tarball, and use the tar command to extract it manually. For example, if the tarball is named mpe2.tar.gz, then enter:
        tar xvf mpe2.tar.gz
    On my system, that created a folder named mpe2-1.3.0; you may get a newer version.
  3. If you have not already done so, open a terminal and navigate to the place where you downloaded the tarball. Use the cd command to change directory to the MPE folder you just extracted, for example:
         cd mpe2-1.3.0
  4. Next, we have to build the MPE library using the traditional configure-make-make install
    1. First is the configure step, which is probably the hardest, as it requires certain switches or flags to be set in order to work correctly. On my system, I used the following command:
            ./configure CC=gcc MPI_CC=mpicc --disable-f77 --prefix=/usr
      There are several important details here:
      • Set the CC flag to the C compiler you specified when you installed OpenMPI. (I used gcc here.) If the folder containing this compiler is not in your path, then you will need to specify its full path-name. (If you want to use C++ instead of C, you're probably better off using Argonne's MPICH implementation of MPI instead of OpenMPI, as a lot of the code in MPE is non-ANSI C that a C++ compiler won't compile.)
      • Set the MPI_CC flag to the compiler you use to compile an MPI program. (I used mpicc here.) If the folder containing this compiler is not in your path, then you will need to specify its full path-name.
      • MPE by default tries to configure itself to include support for Fortran. When I installed OpenMPI, I did not include Fortran support, so unless I set the the --disable-f77 switch here, my ./configure command would fail. (If you included Fortran support when you installed OpenMPI, this should not be an issue for you and you should omit this switch, but you will probably need to set F77 and MPI_F77 flags, in a manner similar to the CC and MPI_CC flags.)
      • Set the --prefix switch to the directory containing the include and lib folders that your MPI compiler uses. This is usually the path to the folder containing the bin folder that contains your MPI compiler. In my case, the MPI compiler mpicc was installed in /usr/bin, so I specified /usr as the value for the --prefix switch.

        If you installed OpenMPI from a package manager, then you will need to figure out where the package manager installed it and specify the full path to that folder.

    2. That was the hard part. If you've gotten the ./configure command to complete successfully, the second step should be easy. Just enter:
      and wait while the make program builds the MPE library for you.
    3. Assuming that make completes successfully, the third step is almost as easy; enter:
            sudo make install
      and then enter your password to install the MPE library on your system. (You must be an administrator if you are installing to a system directory like /usr or /usr/local.)

      This command will install the MPE library in the folder specified by your --prefix switch. The MPE header files will be placed in the include directory inside that folder (e.g., /usr/include), and the MPE library files will be placed in the lib directory inside that folder (e.g., /usr/lib).

That's it! If all went successfully, then MPE should be installed on your system and you should now be able to use the MPE library's utilities inside your MPI programs.

If you want to test it out, here is a simple testMPE.c program and a Makefile you can use to build it.

Once you have built it, you should be able to run it with commands like:

   mpirun -np 1 ./testMPE
   mpirun -np 8 ./testMPE

Note that to use MPE's graphics library, an X11 server must be running on your computer when you run your program, or a Could not open display runtime error will result.

For more information about MPE, see The MPE User Guide or Argonne's MPE pages.

Calvin > CS > 374 > MPI Resources > Installing MPE
This page maintained by Joel Adams.