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

[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 11, 2014, 07:45
Default swak4foam error
  #121
New Member
 
Juimo Pierre
Join Date: Aug 2012
Posts: 13
Rep Power: 14
Roskiki is on a distinguished road
thank you very much

Last edited by Roskiki; December 13, 2014 at 01:01.
Roskiki is offline   Reply With Quote

Old   December 11, 2014, 09:21
Default
  #122
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Roskiki View Post
swak4foam error

please help!!!
http://openfoamwiki.net/index.php/Ho..._Message_Board
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 13, 2015, 16:59
Default Using the wiki instructions to install 2.2.3
  #123
New Member
 
Guest
Join Date: Jan 2015
Posts: 8
Rep Power: 11
luckyhat is on a distinguished road
Could someone please confirm which steps of the wiki page for Installing 2.2.2 would be applicable, if I was to install 2.3.1 using this patch?

https://openfoamwiki.net/index.php/I...OpenFOAM_2.2.2

Are there any steps I should ignore or do differently?

Also, is it still possible to install 2.2.2 at this point (I am thinking this might be an easier option, as it would mean I could just follow the instructions step by step)

Thanks for your help, I have spent the past few days trying to understand how this all fits together and am a bit confused
luckyhat is offline   Reply With Quote

Old   January 13, 2015, 21:36
Default
  #124
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by luckyhat View Post
Could someone please confirm which steps of the wiki page for Installing 2.2.2 would be applicable, if I was to install 2.3.1 using this patch?

https://openfoamwiki.net/index.php/I...OpenFOAM_2.2.2

Are there any steps I should ignore or do differently?

Also, is it still possible to install 2.2.2 at this point (I am thinking this might be an easier option, as it would mean I could just follow the instructions step by step)

Thanks for your help, I have spent the past few days trying to understand how this all fits together and am a bit confused
I'm so sorry I could not upload the guide for the 2.3 version. I'm very busy with exam session. I would likely do it in few months.

Anyway the procedure about 2.2. is practically the same, except for the fact that now the patch it's just one to apply, and not two.

Last time I compiled 2.3, some editing on some Makefiles were required, they're however described in previous posts.

Just try to do it yourself, if you get errors try to search before around here, and if you can't succeed try to ask.

luckyhat likes this.
rdbisme is offline   Reply With Quote

Old   January 16, 2015, 14:39
Default
  #125
New Member
 
Guest
Join Date: Jan 2015
Posts: 8
Rep Power: 11
luckyhat is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,



Cause I don't know what you'd done already, I'll describe whole procedure from the beginning (more or less how I do these things):

1. Create disk image with case sensitive file system. There is a guide in wiki with pictures but I prefer CLI interface:

Code:
$ cd
$ hdiutil create -size 4.4g -type SPARSEBUNDLE -fs HFSX -volname OpenFOAM -fsargs -s OpenFOAM.sparsebundle
This command will create disk image with a name OpenFOAM.sparsebundle in you home folder. Wiki suggests creation of sparseimage type disk image but sparse bundle disk images ... here is a quote from a discussion with my colleague:



2. Create mount point for disk image and attach disk image (again it was suggested by my colleague, to have single disk image for all OF versions):

Code:
$ mkdir -p $HOME/OpenFOAM
$ hdiutil attach -mountpoint $HOME/OpenFOAM OpenFOAM.sparsebundle
3. Now you clone sources into the disk image (command for OF 2.3.x):

Code:
$ cd $HOME/OpenFOAM
$ git clone git://github.com/OpenFOAM/OpenFOAM-2.3.x.git
At this point you have sources on case sensitive FS, so now it's time to get patch, apply patch to the sources and run compilation:

Code:
$ cd OpenFOAM-2.3.x
$ curl -L http://sourceforge.net/p/openfoam-extend/svn/HEAD/tree/trunk/Breeder_2.3/distroPatches/MacPatch/OpenFOAM-2.3.x-Mac.patch?format=raw > OpenFOAM-2.3.x-Mac.patch
$ patch -p1 < OpenFOAM-2.3.x-Mac.patch
After these manipulations you need to edit etc/bashrc (I don't know what version of gcc you're using, I don't know if you installed all necessary software dependencies using Macports, so at this points it's all up to you).

After you just

Code:
$ source etc/bashrc
$ ./Allwmake > log.Allwmake 2>&1
and wait.
Hey guys,

I have used the method proposed by alexeym above, and I was wondering if someone would be able to check my log file (attached) to see if everything is working properly? I am new to using terminal and OpenFOAM so would appreciate any help / advice.

Thanks
Attached Files
File Type: zip log2.zip (16.7 KB, 3 views)
luckyhat is offline   Reply With Quote

Old   January 16, 2015, 16:05
Default
  #126
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Well, there were 3 principal errors. All of them are caused by missing flags in Make/options files of the corresponding solvers.

Errors are in driftFluxFoam, interFoam, interDyMFoam, porousInterFoam, and LTSInterFoam. If you can live without these solvers there's no reason to worry. Otherwise you have two choices: correct Make/options yourself, wait for new patches (though the error with driftFluxFoam was there from the initial 2.3.0 release, it seems, the error is still there).
alexeym is offline   Reply With Quote

Old   January 16, 2015, 18:53
Default
  #127
New Member
 
Guest
Join Date: Jan 2015
Posts: 8
Rep Power: 11
luckyhat is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

Well, there were 3 principal errors. All of them are caused by missing flags in Make/options files of the corresponding solvers.

Errors are in driftFluxFoam, interFoam, interDyMFoam, porousInterFoam, and LTSInterFoam. If you can live without these solvers there's no reason to worry. Otherwise you have two choices: correct Make/options yourself, wait for new patches (though the error with driftFluxFoam was there from the initial 2.3.0 release, it seems, the error is still there).
Thanks Alexeym for your help, I really appreciate that you took the time to review my log file. I don't need any of those solvers at this time so I guess I can go ahead with the tutorials now!

For any other newbies on this thread looking for a simple method to install OpenFOAM on Yosemite, I would recommend alexeym's method as being very quick and easy.
luckyhat is offline   Reply With Quote

Old   January 17, 2015, 14:04
Default
  #128
New Member
 
Guest
Join Date: Jan 2015
Posts: 8
Rep Power: 11
luckyhat is on a distinguished road
I have started going through the tutorial and have hit one more issue - I don't seem to have Paraview installed. When I type the command paraFoam

I get this:
FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV4Readers
./Allwclean
./Allwmake

I tried following these instructions but the last command gives the error:
ERROR: ParaView not found in /Users/luckyhat/OpenFOAM/ThirdParty-2.3.x/platforms/darwinIntel64Gcc46/ParaView-4.1.0

I tried creating those folders and copying ParaView-4.1.0 into the directory but then I get the error: ./Allwmake : PV_PLUGIN_PATH not valid - it is unset

Any ideas on the best / easiest way to install ParaView?

Thanks
luckyhat is offline   Reply With Quote

Old   January 17, 2015, 14:24
Default
  #129
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

You should install binary version of paraview in /Applications. Download it from http://www.paraview.org/paraview-dow...rwin-64bit.dmg. And use built-in reader module using 'paraFoam -builtin'.
alexeym is offline   Reply With Quote

Old   January 17, 2015, 14:41
Default
  #130
New Member
 
Guest
Join Date: Jan 2015
Posts: 8
Rep Power: 11
luckyhat is on a distinguished road
When I run paraFoam -builtin I get:

created temporary 'PV4Readers.foam'
/Users/brendanfox/OpenFOAM/OpenFOAM-2.3.x/bin/paraFoam: line 265: paraview: command not found


I tried restarting terminal and running the command again, now I get:

paraFoam -builtin
-bash: paraFoam: command not found


Any ideas?
luckyhat is offline   Reply With Quote

Old   January 17, 2015, 14:56
Default
  #131
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Quote:
Originally Posted by luckyhat View Post
created temporary 'PV4Readers.foam'
/Users/brendanfox/OpenFOAM/OpenFOAM-2.3.x/bin/paraFoam: line 265: paraview: command not found
Well, you've installed paraview.app but this operation did not put paraview in $PATH. The easiest way to solve this problem is to create symlink to paraview in $WM_PROJECT_DIR/bin. I.e. you do something like

Code:
$ cd $WM_PROJECT_DIR/bin
$ ln -s /Applications/paraview.app/Contents/MacOS/paraview
Though sometimes this operation break python console in paraview.

Quote:
I tried restarting terminal and running the command again, now I get:

paraFoam -builtin
-bash: paraFoam: command not found


Any ideas?
You've closed Terminal, you've destroyed environment, so you have to recreate it after you've opened new terminal session.

Last edited by alexeym; January 18, 2015 at 11:44. Reason: typos
alexeym is offline   Reply With Quote

Old   January 18, 2015, 04:56
Default
  #132
New Member
 
Guest
Join Date: Jan 2015
Posts: 8
Rep Power: 11
luckyhat is on a distinguished road
Quote:
Originally Posted by alexeym View Post
You've closed Terminal, you've destroyed environment, so you have to recreate it after you've opened new terminal session.
Sorry to ask a really dumb question, but could you please clarify what steps are required in order to "recreate" the environment? Is this required every time I reboot or close terminal?

Thanks
luckyhat is offline   Reply With Quote

Old   January 18, 2015, 08:40
Default
  #133
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

In the guide on openfoamwiki.net (I guess you've used it to compile OF) it is called:

Code:
9. Source the bashrc file:
#Current Folder: ~/OpenFOAM/OpenFOAM-2.2.2
. etc/bashrc
You have to do this operation every time you open new terminal session. There's also chapter about Paraview in the guide.
alexeym is offline   Reply With Quote

Old   January 18, 2015, 09:30
Default
  #134
New Member
 
Guest
Join Date: Jan 2015
Posts: 8
Rep Power: 11
luckyhat is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Well, you've installed paraview.app but this operation did not put paraview in $PATH. The easiest way to solve this problem is to create symlink to paraview in $WM_PROJECT_DIR/bin. I.e. you don something like

Code:
$ cd $WM_PROJECT_DIR/bin
$ ln -s /Appli/Applications/paraview.app/Contents/MacOS/paraview
Though sometimes this operation break python console in paraview.
The error I am getting is:
ln: ./paraview: File exists
luckyhat is offline   Reply With Quote

Old   January 18, 2015, 11:47
Default
  #135
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well, the output contradicts to itself, let's learn a little bit more about your installation. What is the output of the following commands:

1.
Code:
$ which paraview
2.
Code:
$ type paraview
alexeym is offline   Reply With Quote

Old   January 18, 2015, 13:04
Default
  #136
New Member
 
Guest
Join Date: Jan 2015
Posts: 8
Rep Power: 11
luckyhat is on a distinguished road
Yeah, I think there are still some problems with my environment. Right now I am reading up on OpenFOAM shell environment (http://www.cfd-online.com/Forums/blo...vironment.html) to try and better understand what is going on.

The first command (which paraview) gave no output

The second command (type paraview) gave the following output:
-bash: type: paraview: not found

Thanks for your help
luckyhat is offline   Reply With Quote

Old   January 22, 2015, 13:53
Default
  #137
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
I am using Macports on Mountain Lion and have followed all the requisite steps (using case-sensitive sparse image, applied patch, edited etc/bashrc, etc.). However, I am getting errors. I will attach the log up to the first instance of "Error 1". Any suggestions?
Attached Files
File Type: zip build_log_part.txt.zip (15.1 KB, 1 views)
jjstickel is offline   Reply With Quote

Old   January 30, 2015, 11:36
Default
  #138
New Member
 
Andre Mas
Join Date: Jan 2015
Location: Montreal, Canada
Posts: 18
Rep Power: 11
ajmas is on a distinguished road
Has anyone created a github fork of the OpenFOAM 2.3.x project and applied the patch to it? If not, does anyone oppose the idea?

I am just wondering whether this would help reduce issues around the patching?
ajmas is offline   Reply With Quote

Old   February 3, 2015, 11:18
Default
  #139
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
Quote:
Originally Posted by ajmas View Post
Has anyone created a github fork of the OpenFOAM 2.3.x project and applied the patch to it? If not, does anyone oppose the idea?

I am just wondering whether this would help reduce issues around the patching?
This would be great to do! As much as possible, please provide sources that are applicable to multiple OS X versions and third-party software system (Macports vs. Homebrew vs. manual).
jjstickel is offline   Reply With Quote

Old   February 3, 2015, 12:11
Default
  #140
New Member
 
Andre Mas
Join Date: Jan 2015
Location: Montreal, Canada
Posts: 18
Rep Power: 11
ajmas is on a distinguished road
Quote:
Originally Posted by jjstickel View Post
This would be great to do! As much as possible, please provide sources that are applicable to multiple OS X versions and third-party software system (Macports vs. Homebrew vs. manual).
I have started looking at this, but I am running into issues with the my base clone already listing modified files, so I can't even start patching. Has anyone run into this issue and resolved this. I have tried playing around with my git settings, but no luck yet.

When I do get things working, I will certainly take into account your suggestion, but also try to make any solution support a cross-platform use case.

Edit: user error. I seem to have missed the part which indicated I needed to use a case-sensitive file system. Creating a case-sensitive HFS+ disk image made a difference. I wonder whether the main devs would be interested in trying to resolve the issues requiring a case-sensitive FS?

Last edited by ajmas; February 3, 2015 at 15:35.
ajmas 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
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 08:30
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 14:48
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
createPatch Segmentation Fault (CORE DUMPED) sam.ho OpenFOAM Pre-Processing 2 April 21, 2014 03:01
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 09:19


All times are GMT -4. The time now is 14:31.