Installation/Mac OS/OpenFOAM 2.1.x
From OpenFOAMWiki
This is a transcript and subsequent improvements on the guide made by Michael Plagge. The original PDF: Compiling Manual OpenFOAm Mac OS X.pdf
Basic requirements
This manual assumes that the reader is familiar with Mac OS X, the installation of applications as well as with basic commands in the Terminal.app. This manual covers the installation of OpenFOAM on Mac OS X 10.6.8, also called Snow Leopard. What do you need?
- Apple Mac OS X 10.6.8
- Apple Developer Tools 3.2.6 (delivered on the DVDs you’ve got with your mac, or you can download this here: developer.apple.com)
- MacPorts software, you can download this here: www.macports.org
For downloading the Apple Developer Tools you might have to become a member of the Apple developer site, it is for free yet.
How do I know if the above metioned software is already installed?
- Open the Terminal.app you find in your /Applications/Utilities folder:
- Type gcc -v, the output should look like this:
- Check for the MPI installation as well by typing mpirun -V, please note that the option is different (-V instead of -v):
- After installing the MacPort software, see www.macports.org/install.php for installation guide, we check the installation with sudo port selfupdate, you have to confirm the sudo with your password:
- Now we are installing the GCC 4.6 by entering:
sudo port install gcc46
on the command line. After the operation is done you could check the version and it should look like this: