CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   How to compile OF with another Mpi (https://www.cfd-online.com/Forums/openfoam-installation/68049-how-compile-another-mpi.html)

ivan_cozza September 4, 2009 05:17

How to compile OF with another Mpi
 
Hi Foamers,
I would like to compile OF with an OpenMPI version different from the one included in the Third Party, as I use other home-made parallel codes that work with a system installation of OpenMPI libraries. The standard OF installation overwrites the $MPI_HOME and $MPI_ARCH_PATH variables, so the system installation is switched off.
Is there any simple workaround to tell OF to use my system installation? Actually I'm obliged to create a separate openfoam user on my system, but I would prefer to use OF and my other codes from a single user.
I use OpenFOAM-1.6.x under a SLAMD64 Linux distro.
Thanks, Ivan

bigphil September 29, 2009 12:43

I think $MPI_HOME and $MPI_ARCH_PATH variables are set in '$WM_PROJECT_DIR/etc/settings.sh' about two-thirds of the way down:

case "$WM_MPLIB" in
OPENMPI)
#mpi_version=openmpi-1.3.3
mpi_version=openmpi-1.2.6
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS

# Tell OpenMPI where to find its install directory
export OPAL_PREFIX=$MPI_ARCH_PATH

_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib

export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
unset mpi_version
;;


You could probably change these to where your system OpenMPI is installed, just a suggestion not sure if it will work.

Philip


All times are GMT -4. The time now is 07:31.