|
[Sponsors] |
May 25, 2015, 17:35 |
Mac-patch for OpenFOAM 2.4
|
#1 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi!
Attached you'll find the patch that makes OF 2.4 (I used the git-repository, but the source tarball should work too) compile on a Mac. Instructions at http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x should work. The patch is almost the same as for 2.3. Major difference is that the stack-trace is now delegated to lldb (which does a better job). The old stack-trace is done in addition Bernhard OpenFOAM-2.4.x-Mac.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 |
|
June 4, 2015, 06:03 |
Installation OF 2.4 on Mac OS X
|
#2 |
New Member
Willem
Join Date: Oct 2014
Location: Belgium
Posts: 4
Rep Power: 12 |
Hi!
I'm new to OpenFOAM and working with a terminal. I want to install the latest version of OF (2.4) on my Mac OS X Yosemite version 10.10.3. I followed the instructions you provided on http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x but now applied on the 2.4.x version. I installed all the necessary ports as you can see below Code:
$ port select --summary Name Selected Options ==== ======== ======= db db48 db48 none gcc mp-gcc48 mp-gcc48 mp-gcc49 none llvm mp-llvm-3.5 mp-llvm-3.5 none mpi openmpi-gcc48-fortran openmpi-gcc48-fortran openmpi-mp-fortran none python python27 python26-apple python27 python27-apple none python2 none python26-apple python27 python27-apple none I got the following message: Code:
$ blockMesh -bash: blockMesh: command not found Thanks in advance! |
|
June 22, 2015, 17:15 |
|
#3 |
New Member
Patryk Wójtowicz
Join Date: Jun 2009
Location: Wroclaw
Posts: 8
Rep Power: 17 |
I am running 10.10.4 and also failed to install both 2.3 and 2.4 version. With previous system version (10.10.2 I think) installation of 2.3 went nice and easy this time I get plenty of errors when building.
Anyone succeeded installing OF 2.4 on Yosemite 10.10.4? |
|
June 22, 2015, 18:24 |
|
#4 |
New Member
Patryk Wójtowicz
Join Date: Jun 2009
Location: Wroclaw
Posts: 8
Rep Power: 17 |
Tried again with OF 2.4.0 and instructions (they worked on previous OS X version) from this website. Build failed again...
My ports config: Code:
Name Selected Options ==== ======== ======= db db48 db48 none gcc mp-gcc48 mp-gcc48 mp-gcc49 none llvm mp-llvm-3.5 mp-llvm-3.5 none mpi openmpi-gcc48-fortran openmpi-gcc48-fortran openmpi-mp-fortran none pip none pip27 none python python27 python26-apple python27 python27-apple none python2 none python26-apple python27 python27-apple none Code:
gcc-mp-4.8 -m64 -fsignaling-nans -ftrapping-math -fdiagnostics-color=always -Wall -O2 -fPIC -Ddarwin dirToString.c -o /Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/wmake/platforms/darwinIntel64Gcc48/dirToString gcc-mp-4.8: error: unrecognized command line option '-fdiagnostics-color=always' make: *** [/Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/wmake/platforms/darwinIntel64Gcc48/dirToString] Error 1 no ThirdParty sources found - skipping + wmakePrintBuild -check no git description found + /bin/rm -f 'OpenFOAM/Make/*/global.?' + wmakeLnInclude OpenFOAM + wmakeLnInclude OSspecific/POSIX + Pstream/Allwmake + wmake libso dummy wmakeLnInclude: linking include files to ./lnInclude /bin/sh: /Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/wmake/platforms/darwinIntel64Gcc48/wmkdep: No such file or directory /bin/sh: /Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/wmake/platforms/darwinIntel64Gcc48/wmkdep: No such file or directory /bin/sh: /Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/wmake/platforms/darwinIntel64Gcc48/wmkdep: No such file or directory SOURCE=UIPread.C ; g++-mp-4.8 -m64 -fsignaling-nans -ftrapping-math -fdiagnostics-color=always -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc48DPOpt/UIPread.o SOURCE=UOPwrite.C ; g++-mp-4.8 -m64 -fsignaling-nans -ftrapping-math -fdiagnostics-color=always -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc48DPOpt/UOPwrite.o SOURCE=UPstream.C ; g++-mp-4.8 -m64 -fsignaling-nans -ftrapping-math -fdiagnostics-color=always -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/Users/Patryk/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc48DPOpt/UPstream.o g++-mp-4.8: error: unrecognized command line option '-fdiagnostics-color=always' g++-mp-4.8: error: unrecognized command line option '-fdiagnostics-color=always' g++-mp-4.8: error: unrecognized command line option '-fdiagnostics-color=always' make: *** [Make/darwinIntel64Gcc48DPOpt/UIPread.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [Make/darwinIntel64Gcc48DPOpt/UPstream.o] Error 1 make: *** [Make/darwinIntel64Gcc48DPOpt/UOPwrite.o] Error 1 + case "$WM_MPLIB" in + set +x |
|
August 5, 2015, 19:02 |
OpenFOAM-2.4.x-Mac.patch works for me
|
#5 |
New Member
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11 |
Thanks for the patch. Works for me on 10.10.4 with MacPorts providing dependencies and gcc-4.9 compiler.
Some hints for those having trouble. Install the following via Macports: scotch +gcc49 -mpich +openmpi cgal flex metis +gcc49 ccache bison boost qt4-mac Make sure to create and use properly the case-sensitive journaled sparse image (documented elsewhere). I link the image mountpoint (usually in /Volume) to $HOME. Edit ~/OpenFOAM/OpenFOAM-2.4.0/etc/bashrc as follows: export WM_NCOMPPROCS=N # add this line, N from: "sysctl -n hw.ncpu" export WM_COMPILER=Gcc49 # change compiler you want export WM_MPLIB=SYSTEMOPENMPI # check this, should be OK Then, Code:
cd ~/OpenFOAM/OpenFOAM-2.4.0/ source etc/bashrc ./Allwmake 2>&1 | tee build.log |
|
August 13, 2015, 12:25 |
|
#6 | |
Member
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13 |
Hi
Do you know how to install db 48 separately? I have it on my mac (10.10.4), but when I try to set it to a port, it says Quote:
Thanks for the help. |
||
August 13, 2015, 12:48 |
|
#7 |
New Member
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11 |
I think this is a macports question. You would probably have better luck asking on the macports-users email list.
|
|
August 13, 2015, 23:34 |
openfoam error
|
#8 |
New Member
Juimo Pierre
Join Date: Aug 2012
Posts: 13
Rep Power: 14 |
the error message is obtained by compiling OpenFOAM on Mac YosemiteOpenFOAM-2.4.x-Mac.patch.zip
bashrc.zip -lfiniteVolume -lmeshTools -lOpenFOAM -ldl -lpthread -lm -o /Users/Mowa/OpenFOAM23/OpenFOAM-2.4.x/platforms/darwinIntel64Gcc49DPOpt/bin/solidEquilibriumDisplacementFoam ld: library not found for -lfiniteVolume clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [/Users/Mowa/OpenFOAM23/OpenFOAM-2.4.x/platforms/darwinIntel64Gcc49DPOpt/bin/solidEquilibriumDisplacementFoam] Error 1 make[1]: *** [solidEquilibriumDisplacementFoam] Error 2 make[1]: Target `application' not remade because of errors. make: *** [stressAnalysis] Error 2 make: Target `application' not remade because of errors. Last edited by Roskiki; August 29, 2015 at 03:24. Reason: openfoam error |
|
August 30, 2015, 09:53 |
|
#9 |
New Member
Join Date: Aug 2014
Posts: 1
Rep Power: 0 |
Hi,
I followed the instructions and everything compiled with no errors on OS X 10.10.5 with mp-gcc52. However, when running blockmesh for the cavity tutorial I am getting "Segmentation fault: 11". Any clues? |
|
September 23, 2015, 15:43 |
Installation works without selecting db48
|
#10 | |
New Member
Tim Erhardt
Join Date: Sep 2015
Posts: 1
Rep Power: 0 |
Quote:
first of all thanks for the patch! I had the same issue with selecting db48. But I was able to install OpenFOAM 2.4.x on OX 10.10.5 by simply ignoring that error message . I also used the "hints" from post #5 |
||
June 1, 2016, 15:55 |
|
#11 |
New Member
Jeremy
Join Date: May 2016
Posts: 17
Rep Power: 10 |
Hi. Following your hints and the only step I don't follow is this one.
I don't have a line in my bashrc file with "sysctl -n hw.ncpu". Can I insert the line you provided as is-and where would that be?-or is there any additional work that must be included? |
|
June 1, 2016, 18:49 |
|
#12 | |
New Member
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11 |
Quote:
Code:
export WM_NCOMPPROCS=N |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
y+ and u+ values with low-Re RANS turbulence models: utility + testcase | florian_krause | OpenFOAM | 114 | August 23, 2023 06:37 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 14:48 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |