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 Tree11Likes

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: 14
Rep Power: 4
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!
hjasak, bigphil and pierrevalis like this.
gerlero is offline   Reply With Quote

Old   June 30, 2022, 18:02
Default
  #2
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 14
Rep Power: 4
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: 56
Rep Power: 5
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,655
Rep Power: 39
olesen has a spectacular aura aboutolesen has a spectacular aura about
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: 56
Rep Power: 5
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: 14
Rep Power: 4
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: 14
Rep Power: 4
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

Old   November 30, 2022, 14:44
Default Error MPI
  #10
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Hi, I've installed the app OpenFOAM v2112 (arm) provided in the GitHub page... Every time I use mpirun, at the end of the calculation, I have this message:

Code:
A system call failed during shared memory initialization that should
not have.  It is likely that your MPI job will now either abort or
experience performance degradation.

  Local host:  Mac-Studio.wind3.hub
  System call: unlink(2) /var/folders/tm/s0frtvjs3qbbb0q5m8d12s8w0000gn/T//ompi.Mac-Studio.501/pid.2398/1/vader_segment.Mac-Studio.501.bc4e0001.12
  Error:       No such file or directory (errno 2)
--------------------------------------------------------------------------
[Mac-Studio.wind3.hub:02398] 2 more processes have sent help message help-opal-shmem-mmap.txt / sys call fail
[Mac-Studio.wind3.hub:02398] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
Any idea?
Miguel Hernandez is offline   Reply With Quote

Old   November 30, 2022, 18:50
Default
  #11
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 14
Rep Power: 4
gerlero is on a distinguished road
Looks like $TMPDIR truncation as discussed in this open GitHub issue on the Open MPI project. A fix/workaround mentioned there is this.

In any case, does OpenFOAM work anyway regardless of this message?

I'm pretty sure I have seen this message before in my logs, but I haven't observed any negative effects. It would be ideal for this to be fixed in Open MPI itself, but I'm also willing to also consider a fix or workaround (either the one I mentioned, or something better) if it makes sense and doesn't break anything else.
gerlero is offline   Reply With Quote

Old   December 3, 2022, 13:14
Default
  #12
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by gerlero View Post
Looks like $TMPDIR truncation as discussed in this open GitHub issue on the Open MPI project. A fix/workaround mentioned there is this.

In any case, does OpenFOAM work anyway regardless of this message?

I'm pretty sure I have seen this message before in my logs, but I haven't observed any negative effects. It would be ideal for this to be fixed in Open MPI itself, but I'm also willing to also consider a fix or workaround (either the one I mentioned, or something better) if it makes sense and doesn't break anything else.
Yes, openFOAM works anyway. However, I don't know if it works at slow performance
Miguel Hernandez is offline   Reply With Quote

Old   December 6, 2022, 18:00
Default
  #13
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 14
Rep Power: 4
gerlero is on a distinguished road
Quote:
Originally Posted by Miguel Hernandez View Post
Yes, openFOAM works anyway. However, I don't know if it works at slow performance
Do you happen to have a case where this message shows up consistently or often? If you are able to try the workaround I linked before, that could give a clearer answer as to whether there's any actual performance degradation due to this.

My previous comment on having seen this message before notwithstanding (I have seen this message before), I recently tried to reproduce this a few times on my machine but couldn't get the message to appear.
gerlero is offline   Reply With Quote

Old   December 9, 2022, 08:06
Default
  #14
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by gerlero View Post
Do you happen to have a case where this message shows up consistently or often? If you are able to try the workaround I linked before, that could give a clearer answer as to whether there's any actual performance degradation due to this.

My previous comment on having seen this message before notwithstanding (I have seen this message before), I recently tried to reproduce this a few times on my machine but couldn't get the message to appear.
It doesn't happen every time... just some times...
Miguel Hernandez is offline   Reply With Quote

Old   January 8, 2023, 17:47
Default
  #15
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Gelero, do you have any news about the new openFoam version, v2212? Have you planned a new version of the app to natively run this release?

Thanks for your work.
Miguel Hernandez is offline   Reply With Quote

Old   January 8, 2023, 20:34
Thumbs up
  #16
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 14
Rep Power: 4
gerlero is on a distinguished road
Quote:
Originally Posted by Miguel Hernandez View Post
Gelero, do you have any news about the new openFoam version, v2212? Have you planned a new version of the app to natively run this release?

Thanks for your work.
Yes! It's not just planned; the current versions already include OpenFOAM v2212.
gerlero is offline   Reply With Quote

Old   January 9, 2023, 05:05
Default
  #17
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Great, thank you for your work!
gerlero likes this.
Miguel Hernandez is offline   Reply With Quote

Old   April 24, 2023, 16:49
Default
  #18
New Member
 
Akthem Rehab
Join Date: Apr 2023
Posts: 6
Rep Power: 2
Akthem is on a distinguished road
Quote:
Originally Posted by alamocfd View Post
I couldn't figure what went wrong, but after reinstalling it's working fine now. Thank you
I installed openFOAM v2206 following https://github.com/gerlero/homebrew-openfoam on my mac m2. I did preliminary tests successfully. I am trying to install cfmesh v1.1.2 and the ./allwmake command is returning a lot of warnings and errors.

Further, I tried to install cfmesh for CFD-OF workbench in freecad, and I get a lot of errors too.

I thought you might help since you are a step ahead and have cfmesh on your m1 max. Could you please guide me through the steps you followed to install/make cfmesh on your mac?
Akthem is offline   Reply With Quote

Old   April 25, 2023, 07:51
Default EOF Library
  #19
New Member
 
Akthem Rehab
Join Date: Apr 2023
Posts: 6
Rep Power: 2
Akthem is on a distinguished road
Hi Gelero, I was wondering if you had a go with EOF-Library. I am trying to install it on the mac after successfully installing elmerFEM and brewing openFOAM.

This github issue has more details: https://github.com/jvencels/EOF-Library/issues/11

Please let me know if you had a previous go with this or if you have a solution to make it work on the mac silicon.

Thank you for the amazing openFOAM work.

Last edited by Akthem; April 25, 2023 at 07:52. Reason: typo
Akthem is offline   Reply With Quote

Old   April 26, 2023, 10:24
Default
  #20
New Member
 
Gabriel Gerlero
Join Date: Jan 2022
Posts: 14
Rep Power: 4
gerlero is on a distinguished road
No, not really. I took a look at the error you're seeing though (on the GitHub issue you link); could it be that you need to activate/source OpenFOAM before running the command? (https://github.com/gerlero/openfoam-app#-use)
Akthem likes this.

Last edited by gerlero; April 26, 2023 at 13:21. Reason: typo
gerlero 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 05:00.