|
[Sponsors] |
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 4, 2013, 08:59 |
|
#101 | |
New Member
Join Date: Jul 2009
Location: Wrentham, MA
Posts: 9
Rep Power: 17 |
Quote:
|
||
January 30, 2014, 23:16 |
Trouble Installing OpenFOAM on Mavericks
|
#102 |
New Member
Join Date: Jan 2014
Posts: 1
Rep Power: 0 |
Hi,
I'm using Mavericks on my machine and I have been having trouble installing OpenFOAM. I followed the steps on http://openfoamwiki.net/index.php/In...OpenFOAM_2.2.2 up until step 4 of Section 4.2. My OF directory looks different from what it should look like: Sues-MacBook-Pro:OpenFOAM suechen$ ls -al total 177344 drwxr-xr-x 6 suechen staff 578 31 Jan 14:07 . drwxrwxrwt@ 4 root admin 136 31 Jan 13:53 .. -rw-r--r--@ 1 suechen staff 6148 31 Jan 14:07 .DS_Store d-wx-wx-wt 2 suechen staff 68 31 Jan 13:53 .Trashes drwx------ 2 suechen staff 476 31 Jan 14:07 .fseventsd drwxr-xr-x@ 9 suechen staff 544 3 Oct 20:28 OpenFOAM-2.2.2 -rw-r--r--@ 1 suechen staff 32536146 28 Jan 15:24 OpenFOAM-2.2.2.tgz -rw-r--r--@ 1 suechen staff 41620 28 Jan 16:58 OpenFOAM-2.2.x_Mac-20130309.patch lrwxr-xr-x 1 suechen staff 24 31 Jan 14:07 OpenFOAM-v2.2.2 -> /Volumes/OpenFOAM-v2.2.2 -rw-r--r--@ 1 suechen staff 691 31 Jan 14:06 SurfaceCGALFix.patch drwxr-x---@ 6 suechen staff 714 4 Oct 20:57 ThirdParty-2.2.2 -rw-r--r--@ 1 suechen staff 58193818 28 Jan 15:26 ThirdParty-2.2.2.tgz -rw-r--r--@ 1 suechen staff 2686 31 Jan 13:58 ThirdParty-2.2_Mac-20130309.patch When I attempted to do step 5 (moving the patches into the right folders), I get the following error: Sues-MacBook-Pro:OpenFOAM suechen$ mv OpenFOAM-2.2.x_Mac-20130309 OpenFOAM-2.2.2 mv: rename OpenFOAM-2.2.x_Mac-20130309 to OpenFOAM-2.2.2/OpenFOAM-2.2.x_Mac-20130309: No such file or directory Could anyone advise me on what I've done wrong or what I could possibly do to go ahead with my installation? Thanks heaps! |
|
January 31, 2014, 03:53 |
|
#103 | |
Senior Member
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13 |
Quote:
Try, inside the directory you posted Code:
unlink OpenFOAM-v2.2.2 Code:
mv OpenFOAM-2.2.x_Mac-20130309.patch OpenFOAM-2.2.2 PPS: Corrected the mistake on the Wiki. |
||
February 8, 2014, 22:54 |
|
#104 |
Senior Member
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13 |
This to gschaider:
It seems they changed the executables names in the openmpi portfile on Macports. If you can, when you can, can you check it and, if needed, update patches (in particular when the MPI variable is set to use the local openmpi installed version)? https://trac.macports.org/log/trunk/...mpi?rev=116861 |
|
February 13, 2014, 19:56 |
|
#105 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The update struck me in the middle of some other work. I have the modified patches almost ready and will publish them on the weekend
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
February 13, 2014, 20:46 |
|
#106 |
Senior Member
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13 |
||
February 19, 2014, 11:27 |
|
#107 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
At first: this is the last set of patches for 2.2 as this week 2.3 came out and experience has shown that 2.2.x won't change after that. The two patches (OpenFOAM and ThirdParty) with dates in the name are the complete patches. For those who already have the latest patches applied there are 4 patches (one for ThirdParty, three for the distro) that can be applied separately (one patch will be in the next reply as the MessageBoard only allows a maximum of 5 attachements). Don't try to apply the full patch if you already have a patch installed as this will probably break (in the etc/*-files) With these patches the new organization of MPI-installations in MacPorts is supported. By looking at /opt/local/bin/mpicc it will be determined which MPI-version (either a flavour of OpenMPI and MPICH) you are using. This will be used as the default (you can override this choice with the variable WM_CHOSEN_MAC_MPI). Beware that MPICH wants a flavour that fits the used compiler. for WM_COMPILER you can choose (have to choose, otherwise the Apple-compiler will be used) GccXX (with XX being 48, 47 etc), ClangXX (XX is 35, 34, etc) or DragoneggXX (XX same as Clang. Dragonegg is a Gcc-frontend with LLVM-backend). The fitting compiler and MPI-implementation has to be installed via MacPorts (as described in http://openfoamwiki.net/index.php/In...OpenFOAM_2.2.2) I used OpenMPI and Gcc46 and tested compilation with Clang34 and Dragonegg34 and MPICH. Attachment 28760 Attachment 28761 Attachment 28762 Attachment 28763 Attachment 28764
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
February 19, 2014, 11:31 |
|
#108 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
OpenFOAM-2.2.x-Mac_2014-02-17.patch ThirdParty-2.2.x-Mac_2014-02-17.patch
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
February 19, 2014, 11:33 |
|
#109 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
And here the 3+1 "afterpatches":
newMacPortsMPIThirdParty.patch SurfaceCGALFix.patch newMacPortsMpi.patch fixCodeBase.patch
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
February 19, 2014, 13:52 |
|
#110 |
New Member
Michael
Join Date: Dec 2011
Location: Geneva
Posts: 28
Rep Power: 15 |
Dear Bernhard,
thank you very much for preparing the patches every time. It helps a lot. Cheers, Michael |
|
February 20, 2014, 15:52 |
Error while applying patch
|
#111 |
New Member
Boka
Join Date: Nov 2013
Posts: 1
Rep Power: 0 |
While applying the OpenFOAM-2.2.x-Mac_2014-02-17.patch file I got the following error:
boxing2:OpenFOAM-2.2.2 TheLostCity$ patch -p1 <OpenFOAM-2.2.x-Mac_2014-02-17.patch patching file applications/solvers/combustion/fireFoam/Make/options patching file applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/Make/options patching file applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options patching file applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options can't find file to patch at input line 57 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/applications/solvers/lagrangian/DPMFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/Make/options |--- a/applications/solvers/lagrangian/DPMFoam/Make/options |+++ b/applications/solvers/lagrangian/DPMFoam/Make/options -------------------------- File to patch: Can anyone help me? Sorry I am a newbie to Openfoam. Thanks |
|
February 20, 2014, 17:56 |
|
#112 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Tell patch to skip that file and everything should be fine
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
February 25, 2014, 04:30 |
Homebrew & Mavericks
|
#113 |
New Member
Adrien
Join Date: Feb 2013
Location: Switzerland
Posts: 2
Rep Power: 0 |
Hi,
In case anyone is interested, I could compile OpenFOAM 2.2.2 on Mac OS 10.9 using Homebrew instead of Macports and gcc 4.8. I basically followed the instructions on http://openfoamwiki.net/index.php/In...OpenFOAM_2.2.2, with some modifications which I am outlining here. I'm not an expert, so some steps can certainly be improved (or skipped). Install gcc48, openmpi, boost, cgal, ccache, flex and bison with e.g. Code:
brew install boost Code:
export FC= Code:
sudo mv /usr/bin/flex /usr/bin/flex_xcode Code:
brew link flex Code:
export WM_COMPILER=Gcc48 ... export WM_CC='gcc-4.8' export WM_CXX='g++-4.8' Code:
echo "Seems you're not using MacPorts. This is currently not supported/tested. Find this line in 'etc/config/settings.sh', modify it accordingly and send patches to Bernhard" # export WM_COMPILER= # export WM_MPLIB=OPENMPI Code:
Gcc48) gcc_version=gcc-4.8.2 gmp_version=gmp-5.0.4 mpfr_version=mpfr-3.1.0 mpc_version=mpc-0.9 ;; Add a symbolic link for a flex header file so that OpenFOAM finds it. Code:
ln -s /usr/local/Cellar/flex/2.5.37/include/FlexLexer.h $WM_PROJECT_DIR/src/OpenFOAM/FlexLexer.h Code:
ln -s darwinIntel64 darwinIntel64Gcc ln -s darminIntel64Gcc48 darwinIntel64Gcc Code:
src/fvOptions applications/utilities/miscellaneous/foamDebugSwitches, applications/utilities/postProcessing/dataConversion/foamToEnsight applications/utilities/mesh/generation/snappyHexMesh applications/utilities/mesh/manipulation/renumberMesh Code:
-lincompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \ Cheers, Adrien Last edited by Mithrandirrr; February 25, 2014 at 09:18. |
|
February 28, 2014, 23:12 |
mpicc: command not found
|
#114 |
New Member
Brian Weeks
Join Date: Feb 2014
Location: NYC
Posts: 4
Rep Power: 12 |
Thanks for the patches- I'm shell-preliterate so please excuse what may be a simple question:
I've been following the OpenFOAM installation instructions for 2.2.2 found here. I'm good up 'till step #9 where I get the error Code:
-bash mpicc: command not found newMacPortsMPIThirdParty.patch & newMacPortsMpi.patch patches you posted may deal with this problem. The question from me then is: where (in what folder) do I apply these patches? Also, in searching for a solution I came across this discussion which seems to deal with some similar problems (I had a similar problem as described in #5 and installed openmpi-default). It was suggested (#10) that a few other symlinks could be created, which I did to no effect. For spits'n'giggles I attempted to create a symlink between mpicc and mpicc-openmpi-mp... which wasn't allowed. Anyways... if you can point me in the right direction, it would be much appreciated. Thanks! |
|
March 1, 2014, 08:24 |
|
#115 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The symlink mpicc that points to the "used" MPI-implementation is administrated through "port select mpi" (you'll have to sudo). Check "port help select" for usage. I was under the impression that MacPorts does this automatically for the first mpi you install but I might be wrong. And I have no way of checking without deinstalling/reinstalling half of the MacPorts-stuff on my notebook. You'll have to experiment. Anyway: only set those symlinks with "port select". Everything else will lead to problems during later upgrades
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 2, 2014, 19:57 |
|
#116 |
New Member
Brian Weeks
Join Date: Feb 2014
Location: NYC
Posts: 4
Rep Power: 12 |
Thanks for that.
The only choice available was for 'openmpi-mp-fortran' ...fortran(!?) dug around the web some more and found that users had been given the following message when they installed openmpi-default: Code:
+--- OpenMPI Usage note ---- | The mpi[cc|cxx|f77|f90] weappers are installed as | mpi[cc|cxx|f77|f90]-mp. To make openmpi-default the default (i.e. the | version you get when you run 'mpicc/mpicxx'), please run: | | sudo port select --set mpi openmpi-mp-fortran +------------------------- Sweet. Thanks again for generating the patches and maintaining this thread. |
|
March 3, 2014, 00:25 |
|
#117 |
Senior Member
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13 |
Updated the patches links on the wiki.
|
|
March 3, 2014, 00:26 |
|
#118 |
Senior Member
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13 |
PS: I created a page on my blog where I'll try to mirror all the patches and useful things for OF on Mac OSX (http://tidusuper91.altervista.org/bl...m-per-mac-osx/)
|
|
March 8, 2014, 07:24 |
Patch Problems
|
#119 |
New Member
Brian Weeks
Join Date: Feb 2014
Location: NYC
Posts: 4
Rep Power: 12 |
Hello Again-
I was running into too many problems compiling, so I scrapped the whole thing and started over fresh. I'm installing the Latest OpenFOAM patch from #108 and I get the following errors. Code:
patching file src/OpenFOAM/db/dynamicLibrary/codedBase/codedBase.C Hunk #1 FAILED at 228. Hunk #2 FAILED at 246. Hunk #3 FAILED at 266. Hunk #4 FAILED at 279. 4 out of 4 hunks FAILED -- saving rejects to file src/OpenFOAM/db/dynamicLibrary/codedBase/codedBase.C.rej Thanks again. |
|
March 9, 2014, 19:29 |
|
#120 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting Started with OpenFOAM | wyldckat | OpenFOAM | 26 | June 21, 2024 07:54 |
OpenFOAM course for beginners | Jibran | OpenFOAM Announcements from Other Sources | 2 | November 4, 2019 09:51 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker | rt08 | OpenFOAM Installation | 1 | February 28, 2016 20:00 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |