OpenFOAM on Ubuntu 16.04
If you want to use the OpenFOAM 3 on Ubuntu 16.04 Xenial Xerus, there is no binary package in the OpenFOAM repository at the time of writing.
The source build takes many hours to complete, so you might prefer to workaround the issue as I did:
- Install the dependencies:
sudo apt-get install libopenmpi1.10 csh libscotch-5.1 binutils-dev libscotch-dev libptscotch-5.1
- Assuming you have a 64-bit architecture, download the binary package for Ubuntu 15.10 Wily Werewolf:
wget -O openfoam30_1-1_amd64.deb https://sourceforge.net/projects/foam/files/foam/ubuntu/dists/wily/main/binary-amd64/openfoam30_1-1_amd64.deb/download
- This package depends upon
libopenmpi1.6
which no longer exists in Ubuntu 16.04, so we must coax OpenFOAM into using the new version. Install the downloaded binary withsudo dpkg --ignore-depends=libopenmpi1.6 -i openfoam30_1-1_amd64.deb
- Finally, ensure that
libmpi
is in the expected place:sudo ln -s /usr/lib/libmpi.so /usr/lib/libmpi.so.1