|
[Sponsors] |
January 1, 2012, 16:35 |
OF 1.9 (aka OF 2.1) on Mac OS X
|
#1 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi!
For those who haven't just applied the 2.0-patch to the shiny new OpenFOAM 2.1.x here comes a set of patches to get it to run. This time you have the choice: a) use the gcc 4.2 that comes with Apple XCode (advantage is: you'll only have to install one compiler) b) use gcc 4.6 from MacPorts (advantage: supposedly faster) Basically do the same as if you would install OF from sources on a Linux-Machine (so I'll be sketchy): 1. Download OF 2.1 (preferably via git) and Thirdparty-2.1 and unpack them on a case-sensitive filesystem (see elsewhere what this means) 2. Go to the ThirdParty-Directory and apply the first patch patch -p1 <ThirdParty-2.1.0-Mac.patch 3. Go to the OpenFOAM-Directory and apply the base-patch patch -p1 <OpenFOAM-2.1.x-Mac.patch then make the script that helps with the tracedumps executable (if the patch-utilitiy didn't do it) chmod a+x bin/addr2line4Mac.py 4. Now decide which compiler you're going to use (although you can also apply both patches if you want to) a) gcc 4.2: apply the appropriate patch: patch -p1 <OpenFOAM-2.1.x-gcc42.patch (this patch fixes some places where gcc4.2 can't cope with advanced constructs) b) gcc 4.6: apply patch -p1 <OpenFOAM-2.1.x-Mac-gcc46.patch and make sure that the WM_COMPILER environment variable is set to Gcc46 (preferably in site/2.1.x/prefs.sh) c) other compiler: copy wmake/rules/darwinIntel.. that the patches create. Basically only the compiler name has to be changed in the c ant the c++-file if you use gcc 5. Now source etc/bashrc, grab some coffee and compile As usual I didn't bother to get the PV3Reader (aka paraFoam) to compile. Use an up-to-date paraview from Kitware with the built in reader for OF Bernhard PS: comments on the procedure are welcome. If somebody feels like writing a step-by-step instruction on the Wiki this would be even more welcome |
|
Tags |
compilation error |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extend Project 1.6-ext Binary Release for Mac OS X | hjasak | OpenFOAM Announcements from Other Sources | 26 | November 5, 2013 16:50 |
Openfoam mac: Compiling custom libraries | atareen64 | OpenFOAM | 3 | April 14, 2011 11:01 |
OpenFOAM-1.6 on Mac OS X 10.6.1 | elvisjohndowson | OpenFOAM | 6 | October 21, 2009 15:45 |
Mac Simple Install Request or Processing Assistance Help | sjohnson | OpenFOAM Installation | 4 | December 12, 2008 07:46 |
MAC + SOLA for free surface | T | Main CFD Forum | 1 | April 11, 2001 13:43 |