CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] Mac-patch for OpenFOAM 2.4

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 3 Post By gschaider
  • 2 Post By jjstickel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2015, 17:35
Default Mac-patch for OpenFOAM 2.4
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
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
gschaider is offline   Reply With Quote

Old   June 4, 2015, 06:03
Default Installation OF 2.4 on Mac OS X
  #2
New Member
 
Willem
Join Date: Oct 2014
Location: Belgium
Posts: 4
Rep Power: 12
CFX_CFD is on a distinguished road
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
After going through all the instructions, I tried to run the blockMesh command in the terminal while being in the OpenFOAM/OpenFOAM-2.4.x/tutorials/incompressible/icoFoam/cavity directory but I was unsuccessful.

I got the following message:
Code:
$ blockMesh
-bash: blockMesh: command not found
I checked the other threads for tips, reinstalled all the necessary ports, tried to install other versions as well but I was not able to install OF on my computer. Could you please help me figuring out what went wrong in the installation of OF?
Thanks in advance!
CFX_CFD is offline   Reply With Quote

Old   June 22, 2015, 17:15
Default
  #3
New Member
 
Patryk Wójtowicz
Join Date: Jun 2009
Location: Wroclaw
Posts: 8
Rep Power: 17
patrick is on a distinguished road
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?
patrick is offline   Reply With Quote

Old   June 22, 2015, 18:24
Default
  #4
New Member
 
Patryk Wójtowicz
Join Date: Jun 2009
Location: Wroclaw
Posts: 8
Rep Power: 17
patrick is on a distinguished road
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
Log already begins with errors:
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
Attached Files
File Type: zip OF_2_4_0.log.zip (39.3 KB, 3 views)
patrick is offline   Reply With Quote

Old   August 5, 2015, 19:02
Default OpenFOAM-2.4.x-Mac.patch works for me
  #5
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
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
RMacReamoinn and kubabanana75 like this.
jjstickel is offline   Reply With Quote

Old   August 13, 2015, 12:25
Default
  #6
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
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:
Selecting 'db48' for 'db' failed: The configuration file '/opt/local/etc/select/db/base' could not be opened.
It's like when it was installed, it never installed properly. Do you know how I can install it again?

Thanks for the help.
ali.m.1 is offline   Reply With Quote

Old   August 13, 2015, 12:48
Default
  #7
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
Quote:
Originally Posted by ali.m.1 View Post
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
It's like when it was installed, it never installed properly. Do you know how I can install it again?

Thanks for the help.
I think this is a macports question. You would probably have better luck asking on the macports-users email list.
jjstickel is offline   Reply With Quote

Old   August 13, 2015, 23:34
Default openfoam error
  #8
New Member
 
Juimo Pierre
Join Date: Aug 2012
Posts: 13
Rep Power: 14
Roskiki is on a distinguished road
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
Roskiki is offline   Reply With Quote

Old   August 30, 2015, 09:53
Default
  #9
New Member
 
Join Date: Aug 2014
Posts: 1
Rep Power: 0
bvangelis is on a distinguished road
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?
bvangelis is offline   Reply With Quote

Old   September 23, 2015, 15:43
Thumbs up Installation works without selecting db48
  #10
New Member
 
Tim Erhardt
Join Date: Sep 2015
Posts: 1
Rep Power: 0
kubabanana75 is on a distinguished road
Quote:
Originally Posted by ali.m.1 View Post
Selecting 'db48' for 'db' failed: The configuration file '/opt/local/etc/select/db/base' could not be opened.
Hi everyone,

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
kubabanana75 is offline   Reply With Quote

Old   June 1, 2016, 15:55
Default
  #11
New Member
 
Jeremy
Join Date: May 2016
Posts: 17
Rep Power: 10
j_moulton is on a distinguished road
Hi. Following your hints and the only step I don't follow is this one.
Quote:
Originally Posted by jjstickel View Post
export WM_NCOMPPROCS=N # add this line, N from: "sysctl -n hw.ncpu"
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?
j_moulton is offline   Reply With Quote

Old   June 1, 2016, 18:49
Default
  #12
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
Quote:
Originally Posted by j_moulton View Post
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?
You add the line

Code:
export WM_NCOMPPROCS=N
Where 'N' is the number of cpus on your computer. You can determine that by running "sysctl -n hw.ncpu" in a terminal. I added it to the top section where it says "USER EDITABLE PART", but it can go anywhere.
jjstickel is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 18:58.