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

[OpenFOAM.org] Installation notes: OpenFOAM 2.3.x (git repo) on OSX 10.9

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By opedrofunk
  • 1 Post By wyldckat
  • 1 Post By opedrofunk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2015, 04:32
Default Installation notes: OpenFOAM 2.3.x (git repo) on OSX 10.9
  #1
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Here are notes on installing OpenFOAM 2.3.x on OSX 10.9 with macports for dependencies.

So far, no errors have been noted. foamyHexMesh and snappyHexMesh work as normal (some have noted that this is not the case when compiling with gcc48, but I have not seen those issues). No libscotch erros have been noted (a problem sometimes encountered with the "homebrew" install method).

Here are the steps taken for successful compile:

1) Install Dependencies:

Code:
sudo port install gcc48 
sudo port select --set gcc mp-gcc48 
sudo port install openmpi-gcc48
sudo port select --set mpi openmpi-gcc48-fortran
sudo port install boost +openmpi
sudo port install cgal
sudo port install ccache
sudo port install flex
sudo port install scotch -mpich +gcc48 +openmpi
sudo port install metis +gcc48

# for completeness
sudo port select --set llvm mp-llvm-3.5
sudo port select --set python python27 
sudo port select --set db db48
Note, before installing and upon running, port select looks like this:

Code:
$ port select --summary
Name    Selected               Options
====    ========               =======
db      db48                   db48 none
gcc     mp-gcc48               mp-gcc48 none
llvm    mp-llvm-3.5            mp-llvm-3.5 none
mpi     openmpi-gcc48-fortran  openmpi-gcc48-fortran none
python  python27               python25-apple python26-apple python27 python27-apple none


2) Create a volume and mount it:

Code:
$ hdiutil create -size 8.3g -type SPARSEBUNDLE -fs HFSX -volname OpenFOAM -fsargs -s OpenFOAM.sparsebundle
$ mkdir -p OpenFOAM
$ hdiutil attach -mountpoint $HOME/OpenFOAM OpenFOAM.sparsebundle
$ cd OpenFOAM
$ git clone https://github.com/OpenFOAM/OpenFOAM-2.3.x
$ cd OpenFOAM-2.3.x

3) Get the patch here:
http://sourceforge.net/p/openfoam-ex....3.x-Mac.patch

Or from here:
https://bitbucket.org/peterjvonk/mac...am-2.3.x-patch

Download it and place it in the OpenFOAM-2.3.x directory.

4) Apply the patch:

Code:
$ patch -p1<OpenFOAM-2.3.x-Mac.patch
5) Append these these lines to the /path/to/OpenFOAM-2.3.x/etc/bashrc

Code:
$ echo "WM_CC=mpicc" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
$ echo "WM_CXX=mpicxx" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
Note: using the mpi wrappers (mpicc, mpicxx) revolves errors locating mpi header files, i.e. "mpi.h" - no sideffects were observed in the logs.

6) Install

Code:
$ source etc/bashrc && WM_NCOMPPROCS=$(sysctl -n hw.ncpu)
$ ./Allwmake > log.Allwmake 2>&1
Note, you may notice this message:
Code:
"Proper OpenMPI not installed. Either do 'port install openmpi-mp' or 'port install openmpi-default'"
Ignore it. Using mpicc and mpicxx wrappers will take care of includes and linking.

It might also complain about the ulimit, ignore this as well. Don't run as sudo - the ulimit is fine as is.

7) Update your bash profile to load the OpenFOAM bashrc file by adding:

Code:
# # openfoam
if [ -f $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc ]; then
  . $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc
fi
to your ~/.bash_profile

Thats it. All steps were taken from bash history file after compilation and testing.

Hope this helps!
Peter
wyldckat and kryztov like this.

Last edited by opedrofunk; February 17, 2015 at 15:25.
opedrofunk is offline   Reply With Quote

Old   February 14, 2015, 13:00
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Peter,

Many thanks for providing these instructions!
I personally don't own a Mac, but I usually come around asking those who do to also write such instructions on the wiki

Right now, I've created the page for this particular version OpenFOAM 2.3.x: http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x - and added the main links for it. If you feel like it, feel free to also write your instructions on this wiki page! Although do keep in mind the license that the wiki uses by default:
Quote:
Content is available under GNU Free Documentation License 1.3 unless otherwise noted.
Best regards,
Bruno
opedrofunk likes this.
__________________
wyldckat is offline   Reply With Quote

Old   February 16, 2015, 14:59
Default
  #3
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
All,
Instructions and build notes may also be found on the wiki, here:

http://openfoamwiki.net/index.php/In...tion_and_Notes

Hope this will be of use!
Peter
wyldckat likes this.
opedrofunk is offline   Reply With Quote

Old   February 17, 2015, 13:59
Default
  #4
New Member
 
Cheewarak R.
Join Date: Feb 2015
Posts: 1
Rep Power: 0
xZer0 is on a distinguished road
Hi opedrofunk,

Quote:
Originally Posted by opedrofunk View Post
All,
Instructions and build notes may also be found on the wiki, here:

http://openfoamwiki.net/index.php/In...tion_and_Notes

Hope this will be of use!
Peter

Follow your wiki page, I've tried to get patch file from your propose URL (Topic 2.3) as bellow link:
Quote:
2.3 Get the patch
http://sourceforge.net/p/openfoam-ex....3.x-Mac.patch

Download the above and place it in the OpenFOAM-2.3.x directory.
That page is no longer to download (page error 404!).
Do you have another link to get it?


Thank you,
x
xZer0 is offline   Reply With Quote

Old   February 17, 2015, 15:19
Default
  #5
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Here's a copy of the patch I used:

https://bitbucket.org/peterjvonk/mac...am-2.3.x-patch

The wiki will be subsequently updated.

Cheers,
Peter
opedrofunk is offline   Reply With Quote

Old   March 18, 2015, 07:04
Default
  #6
New Member
 
David Graham
Join Date: Oct 2014
Posts: 1
Rep Power: 0
dgraham is on a distinguished road
Hello Peter,

Quote:
Originally Posted by opedrofunk View Post
2) Create a volume and mount it:

Code:
$ hdiutil create -size 8.3g -type SPARSEBUNDLE -fs HFSX -volname OpenFOAM -fsargs -s OpenFOAM.sparsebundle
$ mkdir -p OpenFOAM
$ hdiutil attach -mountpoint $HOME/OpenFOAM OpenFOAM.sparsebundle
$ cd OpenFOAM
$ git clone https://github.com/OpenFOAM/OpenFOAM-2.3.x
$ cd OpenFOAM-2.3.x
Peter
Thanks for this. Everything worked fine except that when I mounted the volume it was not writeable so I had to add the -readwrite flag to hdiutil attach as follows:

Code:
hdiutil attach -readwrite -mountpoint $HOME/OpenFOAM OpenFOAM.sparsebundle
All fine after that.

Thanks again.
Dave
dgraham is offline   Reply With Quote

Old   May 1, 2015, 19:05
Default
  #7
New Member
 
duan
Join Date: Apr 2014
Posts: 6
Rep Power: 12
duan is on a distinguished road
I followed the notes to install of 2.3.x on OS X 10.10.

Most solvers work fine, i.e icoFoam, However the interFoam not. In folder platforms/ darwinIntel64GccDPOpt/bin/ the interFoam do not exist.

Then I execute ./Allwclean and ./Allwmake to rebuild the interFoam in the solvers/multiphase/interFoam folder. It shows 26 warnings but no error.

Finally when I run the dam break tutorial case with interFoam, I get the error:
Quote:
#0 Foam::error:rintStack(Foam::Ostream&) in "libOpenFOAM.dylib"
#1 0x0 in "/Users/qingfengduan/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64GccDPOpt/bin/interFoam"
Segmentation fault: 11
Any ideas for this error?

And any notes to install the Thirdparty-2.3.x will be appreciated.
duan is offline   Reply With Quote

Old   July 1, 2015, 14:51
Default This Process Ruined Python in Terminal
  #8
New Member
 
Join Date: Jun 2015
Posts: 3
Rep Power: 11
jundong is on a distinguished road
This ones doesn't work on Yosemite or Mavericks. After following that step by step, it ruined my python totally.
jundong 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
[OpenFOAM.org] OpenFoam installation V6 on opensuse leap 15 sjohn2 OpenFOAM Installation 20 February 21, 2020 20:08
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 04:19
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


All times are GMT -4. The time now is 16:10.