Installing OpenFOAM 4.1 on Mac OS Sierra
Hi everyone,
Could anyone point me in the right directions as how to install OpenFOAM 4.1 no Mac OS Sierra. I have tried the way explained on the OpenFOAM website but it doesn't seem to be working for me. Also I don't want to use the Docker environment. I just want to compile it in my Home directory and use the commands from the terminal like I do on my Linux system! Any help would be much appreciated. I have installed MacPorts and all other obvious dependencies. |
Try this..
https://github.com/mrklein/openfoam-...ion-&-Homebrew I installed on my air using this. It basically creates a disk of 8gb which you mount on staring your mac and then use the normal commands for running OF cases. |
Hi all,
@spitchers Could you elaborate on "but it doesn't seem to be working for me"? Foundation thinks Docker is THE way and even proposes to use Docker on distributives, which are not Ubuntu. Since you specified version (4.1), maybe this guide will be more suitable. Though currently 4.x is 4.1 with bug-fixes, so in theory it should be more stable. |
I have tried both links and it is littered with errors. Has either of you installed OpenFOAM 4.0/4.1 on MAC OS SIERRA ? It may be an issue on my end. I will continue to look into it.
|
What errors? Would be more useful if you elaborate. As I said in my previous post, I have installed using the link i posted on macOS Sierra and it worked without problems if my memory serves me right(I installed 4-5 months back.)
EDIT: I installed 4.x though. |
The first error occurs when I try to apply the Patch. I get the following error:
Code:
Shauns-MacBook-Pro:OpenFOAM-4.x Shaun$ git apply OpenFOAM-4.0.patch Code:
Shauns-MacBook-Pro:OpenFOAM-4.x Shaun$ source etc/bashrc Thank you for your help. |
If patch application failed than it does not make any sense to go any further since it is sure to give errors. We need to find out why patch is not working first. Could you run 'history' command in the terminal and paste it here (It prints all the commands you executed in the past some time.)
|
Hi,
@Suffolk Could you explain WHY you are trying to apply patch for the version 4.0 on 4.x source tree (and I really do not know why we need to GUESS it from your command line)? |
Sorry I am new to Mac OS and have little coding experience. I don't understand the errors I am getting so it is hard for me to give you the correct information to help me. Hence why I just copied and pasted everything from the command line.
Here is a snippet from my log Allmake File: Code:
/bin/sh: -c: line 0: syntax error near unexpected token `;' I hope this helps. |
Hi,
Gcc won't help, you can try but you will end up with the same error. As a workaround, you can turn on "quiet rules" by: Code:
export WM_QUIET_RULES=Y A couple of questions. 1. AFAIK there is official BDSM kit (aka Docker image) from Foundation for people on macOS. Did you try it? It seems to be aimed at people with no experience in either macOS or programming. 2. There is bug tracker on Github, why not use it to report problems with installation? |
Thank you for your help. I turned on quiet rules and it got over my previous error. It then compiled for about 1 hour and just stopped.
Some of the commands like blockMesh simpleFoam and others are working fine but not all commands. It's looking very promising though as it may have ran out because of a lack of memory available or something similar. I will try again tonight. Could you please let me know when you have updated the patches. Sent from my iPhone using CFD Online Forum mobile app |
Hi,
Without context it is difficult to diagnose the problem. I have updated patches, so you have to start from scratch: delete partly-built version, download sources, apply patch, build. |
Thank you for all your help Alexeym. I shall try again tonight with a fresh build. I spent most of the weekend installing gmsh and openCASCADE from source files. I don't like the packaged version of gmsh because when I was trying to mesh with a lot of cells , the gui would crash. So I installed it from scratch. All dependencies from mac ports, then built openCASCADE using cmake, then built gmsh the same way. I ran the gmsh command and meshed over night and it worked just fine! I was also able to save the log file. I'm starting to get the hang of it and it's feeling just like using a well-built UNIX OS.
I was very surprised that the GUI's of paraFoam and gmsh seem to run smoother on my MacBook Pro than they do on my workstation. I really have no idea why? So my final step is to install OpenFOAM and I'm all set to go. I will keep you updated. Sent from my iPhone using CFD Online Forum mobile app |
64bit Version
Hi, I successfully installed OpenFOAM a while back. However only the 32bit version. I keep getting an error while trying the 64bit version. I have installed the packages scotch64.rb and metis64.rb, however I still get an error. Is there any flags or altercations I need to add to the patch ? I have Version 4.x installed.
|
Hi,
Could you be more specific? I.e. at least show the error. And are you sure your models do not fit into 32-bit integers? |
Here is a snippet from the log file. Thank you for your help :) My mesh will be 15Million Cells max, however I was told that a 64bit version would be more efficient and the 32bit version would "cap" my RAM usage. Is this correct?
Code:
/Users/shaunpitchers/OpenFOAM/OpenFOAM-4.x/src/parallel/decompose/scotchDecomp |
You confuse a little bit different bits ;)
In terms of OpenFOAM 32 and 64 are the length of label type (WM_LABEL_SIZE parameter). This type is used to address lists and maximum values for 32 and 64 bits are (snippet from stdint.h): Code:
#define INT32_MAX 2147483647 Though it seems certain pieces of build logic were lost during patches cleanup (since in provided error message include paths are from scotch compiled with 32-bit ints). I will take a look and update patches as soon as possible. |
Thank you very much for your reply!
I built the code using 32bit label size for now as its working just fine. I have 16GB of RAM and my last simulation was using about 9GB so I think its okay. I would like to extend my thanks for all your help during this thread. It has helped me a lot and now I have OpenFOAM built at home and at work I am learning at a much faster rate and will hopefully will be starting a PhD in a very similar area next year. You have been a life saver! Best Regards, Shaun |
You are welcome.
In what country they kill people without PhD? ;) I have updated patches, there was slight glitch in configuration logic, so it always selected 32-bit int packages even during build with WM_LABEL_SIZE=64. |
All times are GMT -4. The time now is 12:55. |