This post provides instructions on building Open MPI 1.6 on 32 bit Linux with Absoft Pro Fortran 11.5 and later.
The Open MPI Project is an open source MPI-2 implementation that is developed and maintained by a consortium of academic, research, and industry partners.
DOWNLOADING THE REQUIRED PACKAGEThe Open MPI 1.6 package is available at this site
http://www.open-mpi.org. At the time this post was written, the current stable release for Open MPI was 1.6.4. It was released on February 21, 2013. The instructions below use the source code package named openmpi-1.6.4.tar.gz.
CREATING THE OPEN MPI SOURCE TREEExtract the Open MPI source wtih the following command:
tar -xzvf openmpi-1.6.4.tar.gz
This will create a directory named openmpi-1.6.4 in the current working directory.
MAKING A TARGET BUILD DIRECTORYIt is possible to configure and build Open MPI directly inside the source directory. However, creating a separate build directory makes reconfiguring or maintaining more than one build (for example 32 and 64 bit builds) easier. The instructions below assume that a separate build directory has been created in the directory containing the Open MPI source directory using this command:
mkdir ompi-32build
ESTABLISHING THE COMPILATION ENVIRONMENTBefore configuring the Open MPI software, you need to establish the Absoft compiler's environment variables by sourcing the absvars.sh script from the Absoft bin directory. For example, this command establishes the environment for Absoft Pro Fortran 11.5 under the BASH shell:
source /opt/absoft11.5/bin/absvars.sh
C shell users should use this command:
source /opt/absoft11.5/bin/absvars.csh
CONFIGURING, BUILDING AND INSTALLING 32 BIT OPEN MPIUse following commands configure, build and install 32 bit Open MPI with Absoft Pro Fortran 11.5 and later. These commands configure Open MPI to install into /opt/openmpi-32. If you want to install to a different location, replace /opt/openmpi-32 in the --prefix= argument to the configure command.
cd ompi-32build
../openmpi-1.6.4/configure --prefix=/opt/openmpi-32 F77=$ABSOFT/bin/af77 \
FFLAGS=-lU77 FC=$ABSOFT/bin/af90 FCFLAGS=-lU77
make
make install
USING OPEN MPIIn order insure that correct Open MPI commands are invoked, the installed Open MPI bin directory should be added to your PATH variable.
For bash and sh users:
export PATH=/opt/openmpi-32/bin:$PATH
For csh and tcsh users:
setenv PATH /opt/openmpi-32/bin:$PATH
FURTHER INFORMATIONFurther information on building Open MPI can be found in the file named README located in the openmpi-1.6.4 source directory.