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

[OpenFOAM.com] Native OpenFOAM for macOS: OpenFOAM-v2112.app (install instructions and GitHub link)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By gerlero
  • 2 Post By gerlero

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2022, 19:48
Arrow Native OpenFOAM for macOS: OpenFOAM-v2112.app (install instructions and GitHub link)
  #1
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 5
Rep Power: 2
gerlero is on a distinguished road
Background: I started this project a few months back now, and I think it is now mature enough that I feel comfortable posting about it here for more users to know. I am grateful to all those who started using it after finding it on GitHub and through users' posts on other sites—including this site—, which helped reach this point.

I made OpenFOAM-v2112.app in an attempt to solve once and for all the problem of getting OpenFOAM up and running on macOS in a straightforward way. The project offers precompiled OpenFOAM binaries (both Intel and Apple silicon), built from the official source code and with the standard dependencies, and installable in a matter of seconds with a single command. For more details, the GitHub repo is at https://github.com/gerlero/openfoam2112-app.

If you want to try it (and you have Homebrew already installed, which is required), just run this command in the terminal:

Code:
brew install --no-quarantine gerlero/openfoam/openfoam2112
The --no-quarantine option is there to prevent any dialogs from macOS Gatekeeper, as the distributed binaries have not been notarized by Apple (if you don't include it and get a dialog box on launch, you'll probably need to open a Finder window and right-click>Open the app there to get an option to skip the warning). After installing, either launch the newly-installed OpenFOAM-v2112.app, or run the command:

Code:
openfoam2112
to start an OpenFOAM session, running natively on your Mac.

If you're curious on how this all works, the entire automated build process is obviously open-source and available in the project’s repo.

I hope that this project can be of help to more Mac & OpenFOAM users, and ask you to try it out and spread the word about it (and give it a star on GitHub, why not?) if you find it useful. Thanks!
pierrevalis likes this.
gerlero is offline   Reply With Quote

Old   June 30, 2022, 18:02
Default
  #2
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 5
Rep Power: 2
gerlero is on a distinguished road
I've moved this project to https://github.com/gerlero/openfoam-app. OpenFOAM v2206 binaries are now available too.
olesen and HPE like this.
gerlero is offline   Reply With Quote

Old   July 4, 2022, 12:15
Default
  #3
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 47
Rep Power: 3
Miguel Hernandez is on a distinguished road
Compared to running openFoam on docker, are there differences in terms of performance?
Miguel Hernandez is offline   Reply With Quote

Old   July 4, 2022, 12:21
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,503
Rep Power: 35
olesen will become famous soon enougholesen will become famous soon enough
I don't have MacOS etc, but do make sure you are using ARM64 binaries for the docker images.
olesen is offline   Reply With Quote

Old   July 4, 2022, 12:26
Default
  #5
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 47
Rep Power: 3
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by olesen View Post
I don't have MacOS etc, but do make sure you are using ARM64 binaries for the docker images.
Yes, that is what I meant. I use ARM64 binaries for the docker images. I would like to know if there is any difference between this or using the app mentioned in this tread...
Miguel Hernandez is offline   Reply With Quote

Old   July 4, 2022, 18:39
Default
  #6
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 5
Rep Power: 2
gerlero is on a distinguished road
A quick test hints at the native build of OpenFOAM being a little faster:

Here are the runtimes of $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily I see on an M1 MacBook Air...

OpenFOAM-v2112.app
real 0m5.494s
user 0m5.344s
sys 0m0.142s

ARM-based v2112 Docker image from https://github.com/gerlero/openfoam-docker-arm (using Docker Desktop for Mac with default settings)
real 0m9.424s
user 0m6.039s
sys 0m0.346s

This is just a single test, on a single machine, so bear that in mind... all in all, there are various considerations in the native vs. Docker discussion, including integration with the native OS (favors native), guaranteed compatibility with GCC-based Linux builds (favors Docker), virtualization (CPU, RAM, filesystem access, storage) overhead (favors native), ease of use (IMO favors native).
gerlero is offline   Reply With Quote

Old   October 10, 2022, 02:03
Default
  #7
New Member
 
Join Date: Oct 2022
Posts: 2
Rep Power: 0
alamocfd is on a distinguished road
I am using M1 Max and installed from https://github.com/gerlero/openfoam-app, but i cant get cfMesh functions to run, constantly getting this error:

symbol not found in flat namespace (__ZN4Foam10FatalErrorE)
Abort trap: 6


Anyway to fix this?
alamocfd is offline   Reply With Quote

Old   October 10, 2022, 21:30
Default
  #8
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 5
Rep Power: 2
gerlero is on a distinguished road
Could you post the steps to reproduce that error? When you get that message, do the other OpenFOAM binaries (e.g. the solvers) work?

Also, are you using the latest version of the app? cfMesh was broken before OpenFOAM.app v1.8.2 (see bug report at https://github.com/gerlero/openfoam-app/issues/88) with a similar linker error.
gerlero is offline   Reply With Quote

Old   October 11, 2022, 03:25
Default
  #9
New Member
 
Join Date: Oct 2022
Posts: 2
Rep Power: 0
alamocfd is on a distinguished road
I couldn't figure what went wrong, but after reinstalling it's working fine now. Thank you
alamocfd is offline   Reply With Quote

Reply

Tags
apple, mac, mac os, mac os x

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



All times are GMT -4. The time now is 07:27.