PGI Guide to LAM-MPI

This guide is intended to help build LAM-MPI version 7.1.4 using PGI compilers.

Version Information

This guide is intended ot help build LAM-MPI version 7.1.4 using the PGI 2011 Release. This information is for both x64 processors running 64-bit Linux or x86 processors running 32-bit Linux.

Library Notes

LAM-MPI is a freely available implementation of MPI. Information about LAM-MPI can be found at the LAM-MPI home page

Obtaining the Source Code

LAM-MPI is freely available for download from the LAM-MPI download page.


There are no known dependencies.

Configuration and Set-up Information

After you have downloaded and unpacked the LAM-MPI packages, the typical build process is followed. After setting up the environment and determining the final installation directory, you run configure followed by make and finally make install. Please modify this example as needed. Be sure to change the prefix path. We assume the PGI compilers are installed in the default /opt/pgi directory.

tar -xvjf lam-7.1.4.tar.bz2
cd lam-7.1.4
export  CC=pgcc
export  CXX=pgCC  
export  F77=pgfortran
export  FC=pgf77
./configure --prefix=/opt/pgi/linux86/2011/mpi/lam         ! for 32-bit 
./configure --prefix=/opt/pgi/linux86-64/2011/mpi/lam      ! for 64-bit

Building LAM-MPI

To build and install, simply run 'make' and 'make install'.

make install

After you have successfully installed the LAM-MPI library you will need to create a 'machine' file with the list of your cluster's host names. See the LAM-MPI User's Guide

Running LAM-MPI

To test your LAM-MPI installation, the LAM-MPI package contains several example test programs. First make sure that the LAM-MPI install bin directory is in your PATH environment variable. The LAM-MPI test suite can be used to test the installation. It is available at

export PATH=/opt/pgi/linux86/2011/mpi/lam/bin:opt/pgi/linux86/2011/bin:$PATH        ! for 32-bit
export PATH=/opt/pgi/linux86-64/2011/mpi/lam/bin:opt/pgi/linux86-64/2011/bin:$PATH  ! for 64-bit

tar -xvjf lamtests-7.1.4.tar.bz2
cd lamtests-7.1.4

The configure for the lamtests may fail with a message similar to this:

checking how to get verbose linking output from mpif77... -v 

checking for Fortran libraries of mpif77...  -L/opt/pgi/linux86-64/2011/mpi/lam/lib -llammpio 
   -llamf77mpi -lmpi -llam -lutil -ldl' -L/opt/pgi/linux86-64/11.0/lib -L/usr/lib64 
   -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3 -ldl -lpgmp -lpgbind -lnuma -lpthread -lpgftnrtl -lnspgc 
   -lpgc -lrt -lm
checking for dummy main to link with Fortran libraries... unknown

configure: error: linking to Fortran libraries from C fails

If you look closely, you will notice that there is an extra ' in the link line at -ldl'. This needs to be removed for the configure to succeed. Copy the entire link line and edit out that extra ' and set the FLIBS environment variable as follows:

export FLIBS="-L/opt/pgi/linux86-64/2011/mpi/lam/lib -llammpio -llamf77mpi -lmpi -llam -lutil -ldl 
   -L/opt/pgi/linux86-64/11.0/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3 -ldl -lpgmp 
   -lpgbind -lnuma -lpthread -lpgftnrtl -lnspgc -lpgc -lrt -lm"



Before running the tests, you will need to boot into the lamboot environment.

lamboot -v -ssi boot rsh hostfile

Verifying Correctness

The test cases can be run once lamboot is running:

make -k check

Using PGDBG with LAM-MPI

The PGI graphical MPI-parallel debugger, PGDBG, has not been modified to work with LAM-MPI.

Known Issues and Limitations


Click me