CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Installation on Windows, Mac and other Unsupported Platforms

Patches for OpenFOAM 1.7 on MacOS X

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 27, 2010, 18:52
Default Patches for OpenFOAM 1.7 on MacOS X
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

Attached there are two patches that patch the OpenFOAM and the ThirdParty-directory of the new 1.7-release.

For installation and requirements (case sensitive file system) see for instance http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac (if somebody feels like rewriting/adapting that: go ahead)

Some remarks on the patch:
- only the darwinIntel64-architecture has been tested
- the patch assumes that you use gcc 4.5 from MacPorts. If you don't: replace all instances of the form gcc-mp-4.5 with the compiler of your choice
- tecplotWriter does not compile
- as soon as paraview is compiled the PV3FoamReader will compile. It will load as a plugin into paraview. Nevertheless: it will crash paraview as it needs a different version of the libstdc++.6.dylib than the one paraview uses (paraview fails to compile with the same compiler as OF). Only solution: remove the libPV3FoamReader_SM.dylib and use the OF-Reader built into paraview. Alternative would be to compile OF with the v4.2-compiler that comes with MacOS X

Bernhard
Attached Files
File Type: gz OpenFOAM-1.7-Mac.patch.gz (8.2 KB, 754 views)
File Type: gz ThirdParty-1.7-Mac.patch.gz (2.1 KB, 701 views)
gschaider is offline   Reply With Quote

Old   June 27, 2010, 22:22
Default
  #2
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 185
Rep Power: 8
podallaire is on a distinguished road
You rock!

Thanks
podallaire is offline   Reply With Quote

Old   June 28, 2010, 08:22
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by podallaire View Post
You rock!

Thanks
Actually it was quite easy as I had maintained patches of 1.6.x anyway and there were only two changes required

Bernhard
gschaider is offline   Reply With Quote

Old   June 28, 2010, 08:40
Default
  #4
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 19
niklas will become famous soon enough
Have you guys tried this?

http://www.parallels.com/uk/products/desktop/

I recently switched to this instead of dealing with the mac-issues.

Since I dont do any serious work on my mac, but only write code and run simple tests I find this
to be an incredible piece of software.

You can download a free trial version for 2 weeks.
niklas is offline   Reply With Quote

Old   June 28, 2010, 09:12
Default
  #5
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 185
Rep Power: 8
podallaire is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Actually it was quite easy as I had maintained patches of 1.6.x anyway and there were only two changes required

Bernhard
Cool / I'm currently compiling with gcc-4.3, so far so good !


Quote:
Originally Posted by niklas View Post
Have you guys tried this?

http://www.parallels.com/uk/products/desktop/

I recently switched to this instead of dealing with the mac-issues.

Since I dont do any serious work on my mac, but only write code and run simple tests I find this
to be an incredible piece of software.

You can download a free trial version for 2 weeks.
Yes, I know this software / I use VMware when Windows is needed ... It's good to have a native version of OpenFOAM on the mac, easier to prepare cases before sending to the cluster.

Thanks !

PO
podallaire is offline   Reply With Quote

Old   June 29, 2010, 09:19
Default Working with finkproject compilers
  #6
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Hi,
Just thought I would let everyone know that the patches work as advertised with fink project compilers (gcc45 package).

To do modify the patch file (OpenFOAM-1.7-Mac.patch):
Replace -mp- with -fsf-
Replace 4.3 with 4.5


Chris Butler
chrisb is offline   Reply With Quote

Old   July 4, 2010, 06:55
Default
  #7
Member
 
Leosding
Join Date: Mar 2009
Posts: 51
Rep Power: 8
leosding is on a distinguished road
Bernhard,
thanks a lot.
Wonderful! The OF1.7 mac port is now ok to run on snow leopard 10.6.3 with gcc4.5 installed by macports.
Because of the error of 'time', the foamToTecplot360 has not been compiled.
The Paraview 3.8 for Mac is now availabe for post-processing.

Leo
leosding is offline   Reply With Quote

Old   July 5, 2010, 00:44
Default Problems OpenFOAM 1.7 mac
  #8
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Hi all,

I have run into some problems with OpenFOAM-1.7 on mac os 10.6.4. The tutorial for nonNewtonianIcoFoam appears to fail (due to a solution singularity).

This at first glance appears to be due to blockMesh failing to produce an adequate mesh (see the attached file). The tutorial correctly executed with the debian 1.7 install (and 1.6 source install on CentOS).

Has anyone else had any problems? I have created meshes which do not contain the arc object without any trouble.

Any feedback would be much appreciated.

Cheers,
Chris Butler

P.S. If this post is in the wrong forum my apologies.
chrisb is offline   Reply With Quote

Old   July 5, 2010, 08:47
Default
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by chrisb View Post
Hi all,

I have run into some problems with OpenFOAM-1.7 on mac os 10.6.4. The tutorial for nonNewtonianIcoFoam appears to fail (due to a solution singularity).

This at first glance appears to be due to blockMesh failing to produce an adequate mesh (see the attached file). The tutorial correctly executed with the debian 1.7 install (and 1.6 source install on CentOS).

Has anyone else had any problems? I have created meshes which do not contain the arc object without any trouble.

Any feedback would be much appreciated.

Cheers,
Chris Butler

P.S. If this post is in the wrong forum my apologies.
I can reproduce that. Which compiler are you using (I use gcc-4.5. My 1.6/gcc45-installation is broken, so I can't check. I'm suspecting the compiler because it is my impression that he handles FP-operations somewhat differently). If I do blockMesh with 1.6/gcc45 then checkMesh and the solver have no problem, so the problem seems to be located with blockMesh

Bernhard
gschaider is offline   Reply With Quote

Old   July 5, 2010, 08:59
Default
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gschaider View Post
I can reproduce that. Which compiler are you using (I use gcc-4.5. My 1.6/gcc45-installation is broken, so I can't check. I'm suspecting the compiler because it is my impression that he handles FP-operations somewhat differently). If I do blockMesh with 1.6/gcc45 then checkMesh and the solver have no problem, so the problem seems to be located with blockMesh

Bernhard
The weirdness continues: if I do the blockMesh with with 1.7/gcc45-debug(!) I have no problem. So it seems that something is going wrong during optimization (in gcc45)

BTW: have a look at the mesh in paraview. No wonder checkMesh doesn't like it.
gschaider is offline   Reply With Quote

Old   July 5, 2010, 09:00
Default
  #11
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 185
Rep Power: 8
podallaire is on a distinguished road
I just tested (I have compiled OF-1.7.x with gcc-4.3.4) / no problem here with this tutorial.
podallaire is offline   Reply With Quote

Old   July 5, 2010, 13:51
Default
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gschaider View Post
I can reproduce that. Which compiler are you using (I use gcc-4.5. My 1.6/gcc45-installation is broken, so I can't check. I'm suspecting the compiler because it is my impression that he handles FP-operations somewhat differently). If I do blockMesh with 1.6/gcc45 then checkMesh and the solver have no problem, so the problem seems to be located with blockMesh

Bernhard
Update: I repaired my 1.6/gcc-4.5 installation. Now the following happens:

1.6/gcc-4.5-Opt: broken Mesh
1.6/gcc-4.5-Debug: mesh OK
1.6/gcc-4.3-Opt: mesh OK
1.7/gcc-4.5-Opt: mesh broken

So the problem seems to be gcc-4.5 with optimization. The remaining question: does this only happen on a Mac or elsewhere, too?

Bernhard
gschaider is offline   Reply With Quote

Old   July 5, 2010, 19:51
Default gcc 4.4
  #13
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Hi,
I am building OF-1.7 with gcc-4.4 on both OSX and linux, however, I do not have a linux box with gcc above 4.4.4. So if anyone could test this tutorial on linux with gcc-4.5 it would be appreciated.


CB
chrisb is offline   Reply With Quote

Old   July 5, 2010, 23:16
Default
  #14
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Quote:
Originally Posted by chrisb View Post
Hi,
I am building OF-1.7 with gcc-4.4 on both OSX and linux, however, I do not have a linux box with gcc above 4.4.4. So if anyone could test this tutorial on linux with gcc-4.5 it would be appreciated.


CB
blockMesh (OF-1.7) runs correctly on the (nonNewtonianIcoFoam) tutorial under both OSX and Linux when using gcc-4.4

CB
chrisb is offline   Reply With Quote

Old   July 6, 2010, 03:29
Default
  #15
Member
 
Leosding
Join Date: Mar 2009
Posts: 51
Rep Power: 8
leosding is on a distinguished road
Quote:
Originally Posted by gschaider View Post
I can reproduce that. Which compiler are you using (I use gcc-4.5. My 1.6/gcc45-installation is broken, so I can't check. I'm suspecting the compiler because it is my impression that he handles FP-operations somewhat differently). If I do blockMesh with 1.6/gcc45 then checkMesh and the solver have no problem, so the problem seems to be located with blockMesh

Bernhard
Bernhard,
I run the case of coalChemistryFoam/simplifiedSiwek, at time=0.252 it broken, the log reads:
=======================================
Courant Number mean: 0.1533929535 max: 0.6093346791
deltaT = 0.0005
Time = 0.252

Cloud: coalCloud1
Total number of parcels added = 27
Total mass introduced = 0.0001
Current number of parcels = 27
Current mass in system = 7.634816181e-05
Mass transfer phase change = 2.487806921e-06
Mass transfer devolatilisation = 1.096268892e-05
Mass transfer surface reaction = 1.020134234e-05

Cloud: limestoneCloud1
Total number of parcels added = 18
Total mass introduced = 0.0001
Current number of parcels = 18
Current mass in system = 0.0001

Solving chemistry
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 0.06843280288, Final residual = 5.521803873e-06, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 0.08299776218, Final residual = 6.610758425e-07, No Iterations 4
DILUPBiCG: Solving for O2, Initial residual = 0.02991408207, Final residual = 2.316092842e-07, No Iterations 4
DILUPBiCG: Solving for CH4, Initial residual = 0.02443785456, Final residual = 2.649269485e-07, No Iterations 4
DILUPBiCG: Solving for H2, Initial residual = 0.0315238668, Final residual = 3.822091915e-07, No Iterations 4
DILUPBiCG: Solving for CO2, Initial residual = 0.02938438982, Final residual = 4.003208991e-07, No Iterations 4
DILUPBiCG: Solving for H2O, Initial residual = 0.03523143241, Final residual = 1.795963946e-08, No Iterations 5
DILUPBiCG: Solving for hs, Initial residual = 0.04197246509, Final residual = 5.114508673e-07, No Iterations 4


--> FOAM FATAL ERROR:
attempt to use janafThermo<equationOfState> out of temperature range 0 -> 5000; T = -461.698

From function janafThermo<equationOfState>::checkT(const scalar T) const
in file /Users/dingsudong/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting
===========================================
but on my linux workstation, it's ok.

the configuration as below,
Mac:
Mac OS X 10.6.3, gcc-mp-4.5, OpenFoam 1.7
Linux:
OpenSuse 11.1, gcc-4.3, Openfoam 1.7

would you reproduce it?

Leo
leosding is offline   Reply With Quote

Old   July 6, 2010, 07:48
Default
  #16
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 7
chrisb is on a distinguished road
Quote:
Originally Posted by leosding View Post
Bernhard,
I run the case of coalChemistryFoam/simplifiedSiwek, at time=0.252 it broken, the log reads:
I get a similar error for gcc 4.4.4 for both linux and mac OS (OF-1.7). Unfortunately I don't know enough about the code (or the chemistry) to help you much further, however, it seems like there may be some stability problems with the equations you are solving. I noticed 2-3 time-steps before the temperature dramatically increased tmax = O(2500K). I am completely unfamiliar with the problem at hand, however, this did not seem consistent with the previous time-steps.

Cb
chrisb is offline   Reply With Quote

Old   July 7, 2010, 08:06
Default
  #17
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by leosding View Post
Bernhard,
I run the case of coalChemistryFoam/simplifiedSiwek, at time=0.252 it broken, the log reads:
=======================================
Courant Number mean: 0.1533929535 max: 0.6093346791
deltaT = 0.0005
Time = 0.252



--> FOAM FATAL ERROR:
attempt to use janafThermo<equationOfState> out of temperature range 0 -> 5000; T = -461.698

From function janafThermo<equationOfState>::checkT(const scalar T) const
in file /Users/dingsudong/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting
===========================================
but on my linux workstation, it's ok.
On my linux-workstation (gcc 4.4.0) I get the same error (with a slightly different time and a different temperature. Funny thing is that when I run it in Debug-mode (same sources, same machine, same compiler) it is slightly different again

So it is not a Mac-problem but a problem with the case (and possibly the compiler)

Bernhard
gschaider is offline   Reply With Quote

Old   July 7, 2010, 20:00
Default
  #18
Member
 
Leosding
Join Date: Mar 2009
Posts: 51
Rep Power: 8
leosding is on a distinguished road
Quote:
Originally Posted by leosding View Post
Bernhard,
I run the case of coalChemistryFoam/simplifiedSiwek, at time=0.252 it broken, the log reads:
=======================================
Courant Number mean: 0.1533929535 max: 0.6093346791
deltaT = 0.0005
Time = 0.252

--> FOAM FATAL ERROR:
attempt to use janafThermo<equationOfState> out of temperature range 0 -> 5000; T = -461.698

From function janafThermo<equationOfState>::checkT(const scalar T) const
in file /Users/dingsudong/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting
===========================================
but on my linux workstation, it's ok.

the configuration as below,
Mac:
Mac OS X 10.6.3, gcc-mp-4.5, OpenFoam 1.7
Linux:
OpenSuse 11.1, gcc-4.3, Openfoam 1.7

would you reproduce it?

Leo
Bernhard,
I just check the log file for the calculation on Linux port again, you are right. it's same error as you said that with a slightly different time and a different temperature.

It should be reported to developer as a bug.

regards,
Leo
leosding is offline   Reply With Quote

Old   July 8, 2010, 08:22
Default
  #19
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by leosding View Post
I just check the log file for the calculation on Linux port again, you are right. it's same error as you said that with a slightly different time and a different temperature.

It should be reported to developer as a bug.
You're right. Go ahead: report
gschaider is offline   Reply With Quote

Old   July 8, 2010, 08:41
Default
  #20
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gschaider View Post
You're right. Go ahead: report
Sorry. Just noticed: you already did
gschaider is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default patches not appearing in paraview ozzythewise OpenFOAM Native Meshers: blockMesh 6 January 31, 2011 10:41
internal faces between patches created with snappyHexMesh romant OpenFOAM Mesh Utilities 0 August 17, 2009 08:40
Courant number, patches, etc oort OpenFOAM 1 July 24, 2009 18:05
SnappyHexMesh large number of patches written prapanj OpenFOAM Mesh Utilities 0 July 15, 2009 08:11
radiation patches, viewfactors beams CD-adapco 1 March 12, 2009 08:39


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