Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Supporting OpenMPI compiled for multiple compilers
From: Douglas Guptill (douglas.guptill_at_[hidden])
Date: 2009-02-10 14:54:45


Hello Prentice:

On Tue, Feb 10, 2009 at 12:04:47PM -0500, Prentice Bisbal wrote:
> I need to support multiple compilers: Portland, Intel and GCC, so I've
> been compiling OpenMPI with each compiler, to avoid the Fortran symbol
> naming problems. When compiling, I'd use the --prefix and -exec-prefix
> switches like so:
>
> GCC:
> ../configure CC=gcc CXX=g++ F77=gfortran FC=gfortran
> --prefix=/usr/local/openmpi-1.2.8
> --exec-prefix=/usr/local/openmpi-1.2.8/gcc-4.1.2/x86

...<snip>...

> Does each compiler need a completely separate tree under --prefix?

That is how I do it. I haven't needed "--exec-prefix". Here is part
of my openmpi-confiure:

OPENMPI_BASE=/usr/local/openmpi-1.2.8

# Create a name for the build directory
#
BUILD_DIR=${OPENMPI_BASE}/build_${COMPILER}-${OPTIONS}
echo "building in ${BUILD_DIR}"

# create the build directory
#
[[ -d ${BUILD_DIR} ]] || mkdir ${BUILD_DIR}
[[ -d ${BUILD_DIR} ]] || {
    echo "Failed to create ${BUILD_DIR}. exit."
    exit 0
}

# make the configure command
#
COM="../configure --prefix=${BUILD_DIR} "

Hope that helps,
Douglas.