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

Version 15 on Mac OS X

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2008, 07:56
Default Hi! I managed to compile 1.
  #1
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
Hi!

I managed to compile 1.5 on my iBook and I thought I might share my experience with the other Mac-Heads out there. Two words of caution:

- I only have a PowerPC-iBook with 10.4 available (so the milage for the Intel/10.5-guys out there might vary)
- the description is very short. Some info about previous versions (found on the Wiki and here) might be applicable (especially the disk-image etc)

So be ready to wear your asbestos-pants (like a certain Canadian usually says). Previous experience with compiling OF helps

I assume you have a Lower/Upper-case filesystem available.
The two patch-files OpenFOAM-1.5-Mac-v1.patch.gz and ThirdParty1.5-Mac-v1.patch are to be applied with "patch -p0 <patchfile" in the appropriate directories (figure it out from the filename)

After that compilation should work as described in the Release-notes

Some notes:
- On my system I use the ancient vendor supplied gcc 4.0.1 (don't know what the version is for 10.5)
- I don't know the correct output of 'uname -p' on Intel-Macs. Could somebody please supply me with that so that I can update the scripts
- I distinguish two architectures darwinPpc and darwinIntel. This might be a slight overkill and of course some of the #ifdefs are untested on Intels
- My only testing so far was running interFoam on the damBreak-case and building household appliances for eskimos (you'll know the tutorial case when you see it) with snappyHexMesh. All of them successfully
- due to the linker options some applications might compile AT RUNTIME about missing symbols. Usually from the finiteVolume-library. Add -lfiniteVolume in the Make/options-file of that application and recompile it.
- I didn't bother to build the supplied version of paraView yet. So you'll have to go via the foamToVTK/downloadedParaviewBinary-route
- The OpenMPI from ThirdParty is used (no need to get the one from ports)
- For one of the (PAR)Metis-libraries the .dylib has to be copied to the corresponding .so (can't remember which one) Otherwise one of the linker scripts in ThirdParty won't find it
- The only application that does not yet compile for me is the cht-solver (I blame the old compiler)

Feedback that helps to improve the patch is most welcome

Bernhard
__________________
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   July 18, 2008, 08:10
Default I forgot: some versions of pat
  #2
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
I forgot: some versions of patch don't automatically create the wmake/rules/darwinPpc-directory. Do so by hand before applying the patch. The Intel-guys will have to copy everything from darwinPpc to darwinIntel (that is the punishment you have to accept for having a faster machine than me)

Bernhard
__________________
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   July 18, 2008, 08:19
Default Bernhard : thank you ! I wi
  #3
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Bernhard : thank you !

I will try to compile it on my Intel Mac today and will post my findings.

Best regards,

Pierre-Olivier
podallaire is offline   Reply With Quote

Old   July 18, 2008, 14:00
Default hi bernard......i am having pr
  #4
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 17
mgz1985 is on a distinguished road
hi bernard......i am having problems installing 1.4.1 on mac....i downlaoded the image files and everything was ok until i came to sourcing it when i realized there was no bashrc file in the bin or anywhere....this avoided me from sourcing the file......where can i get the bashrc file.....is it possible to copy it from a linux version openfoam....can u really help me fix this problem
mgz1985 is offline   Reply With Quote

Old   July 18, 2008, 18:30
Default mayank, all the info that y
  #5
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
mayank,

all the info that you need to compile 1.4.1 on Mac OS X can be found at :

http://openfoamwiki.net/index.php/Ho...e_OpenFOAM_Mac
http://www.cfd-online.com/OpenFOAM_D...tml?1216150424

Bernhard,

for your info -> uname -p is "i386" on a Core Duo Machine (32-bit intel). I'm compiling the beast ... I have this strange error :

cp: wmakeFiles/libccmio: No such file or directory

The wmake directory does not seem to be in ThirdParty - any idea ? I will post some minor modifications that I made in order to compile on Leopard as soon as it's done.

Regards,

PO
podallaire is offline   Reply With Quote

Old   July 19, 2008, 02:01
Default hi pierre-olivier i tried ever
  #6
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 17
mgz1985 is on a distinguished road
hi pierre-olivier i tried everything on theses 2 forums. Everything works fine except the sourcing. As i am new to unix, i am using disk images. My mounting and creation of sparse images is fine but after that when i am setting up the environment i get this error of no such file or directory.

I have spent entire 2 days on the internet trying to debug this but to no avail. i shall be trying it again tonite and then shall post the entire console here...
mgz1985 is offline   Reply With Quote

Old   July 19, 2008, 03:35
Default thanx all it is working now...
  #7
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 17
mgz1985 is on a distinguished road
thanx all it is working now........especially Mr. Wild for his notes on the ETH website........and Pierre-olivier for his response....i hope i can learn to use it..
mgz1985 is offline   Reply With Quote

Old   July 19, 2008, 13:39
Default apps/paraview/??rc what doe
  #8
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 17
mgz1985 is on a distinguished road
apps/paraview/??rc

what does this mean in the wikipedia forum for paraview....i m unable to understand this command........I have installed paraview 3 as a disk image...
mgz1985 is offline   Reply With Quote

Old   July 20, 2008, 04:16
Default Hi Pierre-Olivier, how did yo
  #9
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
Hi Pierre-Olivier,
how did you download XCodeTools from Apple website? I cannot find it...
However, I've used fink to install gcc 4.2.2. I'll try to compile OpenFOAM using it.

Francesco
fra76 is offline   Reply With Quote

Old   July 20, 2008, 04:36
Default Hi again PO, my precise err
  #10
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 17
mgz1985 is on a distinguished road
Hi again PO,

my precise error is this

mayank-guptas-macbookpenFOAM-1.4.1 mayankgupta$ paraFoam ~/openfoam/mayank/run/icoFoam cavity
/Users/mayankgupta/OpenFOAM/OpenFOAM-1.4.1/bin/paraFoam: line 75: paraview: command not found

I have tried setting the path in my bashrc to DYLD.... from $1:$DYLD...

but when I do that i cant save the edited file.

Can u please tell me what is wrong? OpenFOAM seems to be running ok but paraFoam command is generating the error.
mgz1985 is offline   Reply With Quote

Old   July 20, 2008, 04:42
Default sorry for not giving you my re
  #11
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 17
mgz1985 is on a distinguished road
sorry for not giving you my results for 1.5

I tried it too but it does not work too. it is not compiling on my system as i cant unzip my gtgz files and when i download the patches their format changes from patch to unk..(i am very new to UNIX and openFoam so please be patient)

referring to my above note. I have created the softlinks for paraview and openfoam disk images in my openfoam directory. how and where do i put Takuya's patch for paraview (they are also downloaded as unk format. is it in the disk image of paraview or where i downloaded. probably the error could be here....

thanks.
mgz1985 is offline   Reply With Quote

Old   July 20, 2008, 08:52
Default Francesco, XCode can be dow
  #12
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Francesco,

XCode can be downloaded from : http://connect.apple.com/cgi-bin/Web...MemberSite.woa

You need to register first, it's free. After, you go in Download section and you'll find it.


mayank, I cannot give you support on paraFoam since I don't use it. You can post a question in the appropriate thread:

http://www.cfd-online.com/OpenFOAM_D...tml?1216547856

I'm aware of the "hunk" extension when downloading - just rename the file with the right extension and decompress after. To apply Takuya's patch, you need to download the source code with cvs and follow the procedure to compile Paraview. Qt and cmake are required. Please look at :

http://www.paraview.org/New/download.html (see current development distribution section)

http://paraview.org/Wiki/ParaView:Build_And_Install

Pierre-Olivier
podallaire is offline   Reply With Quote

Old   July 20, 2008, 09:11
Default thanx PO for ur help and patie
  #13
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 17
mgz1985 is on a distinguished road
thanx PO for ur help and patience..

If you do not use paraFoam then how do you visualize your results. As I am getting no where with paraFoam, i think i can follow your lead.
mgz1985 is offline   Reply With Quote

Old   July 20, 2008, 09:34
Default You can open an OpenFOAM case
  #14
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
You can open an OpenFOAM case directly with Paraview3.3 if you use Takuya's patch. Still, you need to compile it from sources. Please take a look at :

http://www.cfd-online.com/OpenFOAM_D...tml?1211418745
http://www.cfd-online.com/OpenFOAM_D...tml?1216503048

Another otpion is to convert the results to VTK files using the command foamToVTK than you can open direclty vtk files with pre-compiled Paraview.

Hope this helps,

Pierre-Olivier
podallaire is offline   Reply With Quote

Old   July 20, 2008, 09:52
Default thanx a lot PO... i shall t
  #15
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 17
mgz1985 is on a distinguished road
thanx a lot PO...

i shall try the latter option as i m very bad at computers..i cant tr the thing today but shall try it tomorrow and let you know...

regarding the second option, my command shuld be as underneath or not

foamtoVTK <root> <case>

i hope it works...just as a backup if i have to compile then at the paraview website, the software is in gtgz or tgz extension. how do i extract it from there coz tar is not being accepted by my system
mgz1985 is offline   Reply With Quote

Old   July 20, 2008, 16:32
Default Bernhard and Pierre-Olivier,
  #16
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 18
egp is on a distinguished road
Bernhard and Pierre-Olivier,

Good job on the patches and documentation!!

OpenFOAM-1.5 compiles on my Intel MacPro with: OSX 10.5.4, gcc-4.2.1, and openmpi-1.2.3 (in /usr/lib/openmpi).

I've run through a few serial and parallel test cases, and all seems to be working OK.

Eric
egp is offline   Reply With Quote

Old   July 21, 2008, 04:55
Default Hi! Back from the weekend a
  #17
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
Hi!

Back from the weekend and I'm bringing a new patch with me. This one helps to run paraFoam (some workarounds are needed with the plugins otherwise paraview chokes on the "regular" OpenFoam-libraries):

OpenFOAM-1.5-Mac-v2.patch

Compiling of the PV-plugin should work as described in the Release notes. Compilation of paraview worked without bigger problems. Just some remarks on compiling paraview:
- I used the last Release of QT 4.3.x from Trolltech as this was recommended (didn't feel liker trying 4.4 since paraview seems to be very sensitive about versions)
- Propably compilation will fail at 66% (something about a missing QtAssisent-stuff missing). Go to the platforms/darwinYourArch-directory. There do "ccmake ." and look for the QT_QTASSISTANT-settings. Set them by hand (this seems to be a problem with the Trolltech-releases). Go back to the Paraview-directory. There rerun "build_paraview 1". The 1 (or any other argument) is important as it stops the script from clearing what was built so far
- Don't forget to switch on Python before compiling Paraview unless you want to miss the coolest thing about paraview3

@Pierre-Olivier's question about funkySetFields: I'm afraid it is not yet ready for 1.5 and I propably won't have time to port it this week. For the time being you'll have to run its 1.4.1-incarnation

@Pierre-Oliver's reporting of the 32-architecture: s###. I didn't realize that of course that darwin exist in 64 AND 32 bits on intel. That would make all the #ifdefs rather bloated, And there doesn't seem to be a need to distinguish between architectures on Darwin. So unless somebody with a 64-Intel (Eric?) reports problems I think we should stick with darwinPpc/darwinIntel (reverting the patch back to just one darwin-platform would only confuse the general public I think)

Bernhard


Bernhard
__________________
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   July 21, 2008, 15:09
Default Hi Bernhard, thanks for the
  #18
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Hi Bernhard,

thanks for the patch ! I was able to compile a fresh cvs version of Paraview3. The Paraview 3 app works; however, it crashes when I try to open an OpenFOAM case or with paraFoam. I will try to compile the version provided in "ThirdParty" directory with the "buildParaview3.3-cvs" scipt. Not sure what is the problem with the new PV3Foam libs.

You can comment line 94 in ParaView3.3-cvs/CMakeLists.txt to be able to use QT 4.4.

It's a really good thing to have both darwinppc and darwinintel. This way, I can compile both architecture on the same disk image.

Best regards,

PO
podallaire is offline   Reply With Quote

Old   July 22, 2008, 09:07
Default Hi PO! Concerning the archi
  #19
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
Hi PO!

Concerning the architectures: the Apple-compiler allows to specifiy multiple architectures "-arch ppc -arch i386". According to the man-page it then produces a universal binary that runs on both architectures. You'll only have to compile once, but the binaries will be a bit bloated

@paraview crash: make sure that the PV_PLUGIN_PATH points to a directory where only the two libPV3*.dylib-files reside (all other OF-dylibs will make paraview crash). Try loading the two dylibs by hand from the Plugin-Manager (if they fail you should get an error message)

Bernhard
__________________
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   July 22, 2008, 09:28
Default Good morning Bernhard (is it t
  #20
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Good morning Bernhard (is it the morning fo you ?),

Yes, you are right, an universal binary can be compiled - never tried with OF but it's a very good idea.

Since I built a "bundle" of paraview (paraview.app), my PV_PLUGIN_PATH variable was not set properly because I was not launching the app from a shell (double-click on icon). I tried from the shell and it worked. I found the PV3FoamReader unstable - I'll stick with the native reader developed by Takuya for now which is pretty much the same thing but really more stable.

Thanks and have a good day !

PO
podallaire is offline   Reply With Quote

Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
New version fluent file open in Old version ? MANOJKUMAR FLUENT 2 July 10, 2013 04:43
Difference between Version 6.3 and Version 6.2 erikaj FLUENT 0 October 11, 2007 12:36
LES with version 6.3 Steve FLUENT 0 April 26, 2007 15:00
SEM in the 3.5 version Anis Phoenics 0 May 5, 2006 12:41
BUG IN VERSION 3.5!!!!!!!! AERODYNAMIFUN Phoenics 0 May 17, 2004 19:24


All times are GMT -4. The time now is 22:11.