gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
1568 Posts in 518 Topics by 754 Members - Latest Member: irekzawadzki December 03, 2021, 08:39:44 AM
*
gfx* Home | Help | Search | Login | Register | gfx
gfx
Absoft User Forum  |  Archive  |  Additional Software & Libraries Archive  |  Building Open MPI 1.6 on OS X
gfx
gfxgfx
 

Author Topic: Building Open MPI 1.6 on OS X  (Read 8028 times)

forumadmin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 321
Building Open MPI 1.6 on OS X
« on: May 28, 2010, 11:28:04 AM »
This post provides instructions on building Open MPI 1.6 on OS X 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 PACKAGE

The Open MPI 1.6 package is available at this site http://www.open-mpi.org. At the time this post was last updated, the current stable release for Open MPI was 1.6.5. It was released on June 26, 2013. The instructions below use the source code package named openmpi-1.6.5.tar.gz.

CREATING THE OPEN MPI SOURCE TREE

Extract the Open MPI source with the following command:

   tar -xzvf openmpi-1.6.5.tar.gz

This will create a directory named openmpi-1.6.5 in the current working directory.

MAKING A TARGET BUILD DIRECTORY

It 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 separate build directories have been created in the directory containing  the Open MPI source directory using these commands:

     mkdir ompi-32build
     mkdir ompi-64build

ESTABLISHING THE COMPILATION ENVIRONMENT

Before 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 /Applications/Absoft11.5/bin/absvars.sh

C shell users should use this command:

    source /Applications/Absoft11.5/bin/absvars.csh

NOTE: The instructions below were developed and tested using  the C/C++ compiler included with Apple's Xcode development toolkit. You may have to make adjustments if you are attempting to use a different C/C++ compiler.


CONFIGURING, BUILDING AND INSTALLING 32 BIT OPEN MPI

Use 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.5/configure --prefix=/opt/openmpi-32 F77=$ABSOFT/bin/af77 \
           FFLAGS="-m32 -lU77" FC=$ABSOFT/bin/af90 FCFLAGS="-m32 -lU77" \
           CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32

   make

   sudo make install


CONFIGURING, BUILDING AND INSTALLING 64 BIT OPEN MPI

Use following commands configure, build  and install 64 bit Open MPI with Absoft Pro Fortran 11.5 and later. These commands configure Open MPI to install into /opt/openmpi-64. If you want to install to a different location, replace  /opt/openmpi-64 in the --prefix= argument to the configure command.

   cd  ompi-64build

   ../openmpi-1.6.5/configure --prefix=/opt/openmpi-64 F77=$ABSOFT/bin/af77 \
           FFLAGS="-m64 -lU77" FC=$ABSOFT/bin/af90 FCFLAGS="-m64 -lU77" \
           CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64 \
           --with-wrapper-fflags=-m64 --with-wrapper-fcflags=-m64

   make

   sudo make install

USING OPEN MPI

In order insure that correct Open MPI commands are invoked, the installed Open MPI bin directory should be added to your PATH variable. This is particularly important on OS X as Apple includes a version of OpenMPI which is built without Fortran support. If you do not put the newly installed Open MPI into your path, invoking mpif77 will produce a message which states "Unfortunately, this installation of Open MPI was not compiled with Fortran 77 support. As such, the mpif77 compiler is non-functional."

For bash and sh users:

       export PATH=/opt/openmpi-32/bin:$PATH

or

       export PATH=/opt/openmpi-64/bin:$PATH

For csh and tcsh users:

       setenv PATH /opt/openmpi-32/bin:$PATH

or

      setenv PATH /opt/openmpi-64/bin:$PATH


FURTHER INFORMATION

Further information on building Open MPI can be found in the file named README located in the openmpi-1.6.5 source directory.
« Last Edit: March 03, 2015, 01:52:28 PM by forumadmin »

Absoft User Forum  |  Archive  |  Additional Software & Libraries Archive  |  Building Open MPI 1.6 on OS X
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!