Douglas Guptill wrote: > 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.
Thanks. I did end up building for all the compilers under separate trees. It looks like the --exec-prefix option is only of use if your compiling 32-bit and 64-bit versions using the same compiler. $PREFIX/share/openmpi contains files that specify switches for the compilers, and these won't be the same for different compilers, so each compiler (gcc, pgi, intel, etc.), will need it's own $PREFIX/share/openmpi directory. -- Prentice