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

[OpenFOAM.com] Issues with installing v1712 on MacOS

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By wyldckat
  • 1 Post By olesen
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2018, 15:04
Default Issues with installing v1712 on MacOS
  #1
New Member
 
Megan
Join Date: Jan 2013
Location: Hampton Roads VA
Posts: 13
Rep Power: 13
Spacegirl1923 is on a distinguished road
I have issues with the installation instructions for 1712. Has anyone installed this successfully on a mac running 10.11.6?

I get errors when sourcing in the bashrc and I'm not quite sure how to proceed.

Thanks!
Spacegirl1923 is offline   Reply With Quote

Old   March 7, 2018, 15:26
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
I'll have to be quick:
  1. I moved your post to a new thread, so that it's clearer that you are trying to install on a Mac OS X.
  2. If you could share the error messages, it would make it a bit easier to help/guide you.
  3. The official installation instructions for v1712 are given here: https://www.openfoam.com/download/in...binary-mac.php - There is a section named "Frequently Asked Questions" at the bottom of that page, where there are already several solutions, with luck they explain at least one of the errors you are getting.
__________________
wyldckat is offline   Reply With Quote

Old   March 7, 2018, 15:28
Default
  #3
New Member
 
Megan
Join Date: Jan 2013
Location: Hampton Roads VA
Posts: 13
Rep Power: 13
Spacegirl1923 is on a distinguished road
The official instructions for installing the source, do not seem to work for me on my mac 10.11.6. Are there specific instructions in http://openfoamwiki.net/index.php/Installation/Mac_OS

that I should be following? (it hasn't been updated with newer versions)

Thanks!

Oops never mind double posted!! Sorry!
Spacegirl1923 is offline   Reply With Quote

Old   March 7, 2018, 15:38
Default
  #4
New Member
 
Megan
Join Date: Jan 2013
Location: Hampton Roads VA
Posts: 13
Rep Power: 13
Spacegirl1923 is on a distinguished road
Great thanks!

I am installing from source because my mac is older and dockers will not work with it. So I have been following the instructions found here
https://www.openfoam.com/download/install-source.php and then continuing with the build guide.

the errors I see after attempting to source are:

Daedalus:~ mnicholson$ source ~/OpenFOAM/OpenFOAM-v1712/etc/bashrc
-bash: .: /Users/mnicholson/OpenFOAM: is a directory
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEval: command not found
-bash: /Users/mnicholson/OpenFOAM: is a directory
-bash: /Users/mnicholson/OpenFOAM: is a directory
-bash: /Users/mnicholson/OpenFOAM: is a directory
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: _foamEtc: command not found
-bash: /Users/mnicholson/OpenFOAM: is a directory
-bash: /Users/mnicholson/OpenFOAM: is a directory
-bash: /Users/mnicholson/OpenFOAM: is a directory
-bash: .: /Users/mnicholson/OpenFOAM: is a directory

Also as a note, I would prefer to install in /opt/ but I have been simply following the instructions as is to remove possible errors. I'm not really too sure what

_foamEtc -mode=o prefs.sh
_foamEtc -mode=ug prefs.sh

are doing or why I am getting the warning about the directory (is it trying to create this folder again?)

Thanks!
Spacegirl1923 is offline   Reply With Quote

Old   March 7, 2018, 15:47
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
Quick answer: The original OpenFOAM v1712 source code can only be built on Linux, that's why you're getting those errors.
The reason is very simple: Mac OS X is too different from Linux Distributions, which is why it needs several modifications in order to compilable from source code on Mac OS X.

As I mentioned in the previous post, the official installation instructions for Mac OS X for OpenFOAM v1712 are available here: https://www.openfoam.com/download/in...binary-mac.php


If you reaaaaaaally want to build from source code on Mac OS X, you will have to apply some modifications that are made available at this project: https://github.com/mrklein/openfoam-os-x/ ... er, wait... Alexey doesn't provide patches for OpenFOAM v1712... from that project, you would have to either pick the versions made available by the OpenFOAM Foundation, namely OpenFOAM-dev or OpenFOAM 5.x, instead of using OpenFOAM v1712 from OpenCFD.
__________________

Last edited by wyldckat; March 7, 2018 at 16:07. Reason: edited and then moved the edit to post #7
wyldckat is offline   Reply With Quote

Old   March 7, 2018, 16:04
Default
  #6
New Member
 
Megan
Join Date: Jan 2013
Location: Hampton Roads VA
Posts: 13
Rep Power: 13
Spacegirl1923 is on a distinguished road
Seeing as dockers will not run on my machine (and I really don't like options like this) I guess I will either be using OpenFOAM 5.x or -dev. Thanks! This at least explains why it isn't working...I was also wondering why the requirements didn't list a mac os so now I know!

After looking through the commit for the patches I am almost inspired to apply similar fixes to 1712 (assuming the are not vastly different)...but you know my ample amount of free time will probably nix that idea.

Thanks for the pointer!!
Spacegirl1923 is offline   Reply With Quote

Old   March 7, 2018, 16:06
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
My apologies, I was too quick to read at first and happened to quickly re-read your previous post while checking my emails.

Still, as I mentioned in the post, you could try building from source code OpenFOAM 5.x or dev, by using Alexey's patches at https://github.com/mrklein/openfoam-os-x/ - see the wiki pages for more details: https://github.com/mrklein/openfoam-os-x/wiki

The only other solution I'm aware of for Mac OS X is to use VirtualBox or Parallels to create a virtual machine with a Linux Distribution installed inside, and then build/run OpenFOAM inside that virtual machine.
Spacegirl1923 likes this.
wyldckat is offline   Reply With Quote

Old   April 12, 2018, 17:07
Default
  #8
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Spacegirl1923 View Post
After looking through the commit for the patches I am almost inspired to apply similar fixes to 1712 (assuming the are not vastly different)...but you know my ample amount of free time will probably nix that idea.
No real promises, but in the meantime I've taken a look at what sort of changes are needed. I have the arch, wmake rules, OSspecific/POSIX, dynamicCode, floatScalar and finally the wmkdep problem reasonably well addressed in the current develop branch (develop.openfoam.com). Also updated the Third-party script as well. There is still a bit more missing, but it might be useful to open as a gitlab issue so we can track progress, and decide how much to put into OpenFOAM itself and how much we leave as post-production patch (like the mrklein github).

/mark
wyldckat likes this.
olesen is offline   Reply With Quote

Old   April 12, 2018, 17:44
Default
  #9
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Spacegirl1923 View Post
_foamEtc -mode=o prefs.sh
_foamEtc -mode=ug prefs.sh

are doing or why I am getting the warning about the directory (is it trying to create this folder again?)
Don't know about the errors - I usually only get them if I've sourced the bashrc from a tcsh.

The _foamEtc commands are short wrappers for using the OpenFOAM foamEtcFile script to locate configuration files and then source them. The -mode options follow the usual user/group/other naming that you may be familiar with from the "chmod" command.
Except for OpenFOAM the 'user' means searching under your ~/. OpenFOAM/ directory. The 'group' means searching under $WM_PROJECT_SITE directory. And 'other' means searching under the $WM_PROJECT_DIR/etc/ directory (ie, the OpenFOAM installation).

The prefs.sh file is simply a preferences file that can be used to provide configuration values without editing the bashrc file and either forgetting what you've changed, or forgetting what to do at the next version upgrade.

So in the first call, with -mode=o, a prefs.sh file from the main etc/ directory is searched. This means that a cluster admin can generate this file and be certain that it will be used (eg, defining particular compiler choices, or extra stuff for mpi). The next call, with -mode=ug, will first try to find a prefs file from the hidden directory in your $HOME, or from the shared group directory where one of your coworkers may have been friendly enough to provide tweaks local to your simulation group.

The combination of both should give enough reliability for admins while still leaving plenty of room for the user to make further adjustments. This may make more sense if you consider multi-user installations where OpenFOAM is installed without write permissions for the normal user.

/mark
wyldckat likes this.
olesen 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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
Installing ANSYS Linux 64bit, on MacOS? Ash Kot ANSYS 1 December 17, 2020 22:13
[waves2Foam] A few notes about problems and solutions when installing with OpenFOAM v1712 oceanFoam OpenFOAM Community Contributions 0 June 22, 2018 08:52
[OpenFOAM.com] Installing OpenFoam on macOS High Sierra Mathematikus20 OpenFOAM Installation 1 December 30, 2017 09:04
Issues installing paraVeiw/paraFoam Creul91 OpenFOAM Installation 1 October 4, 2014 13:05


All times are GMT -4. The time now is 21:26.