CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM14 for Mac OSX Darwin 104 (https://www.cfd-online.com/Forums/openfoam-installation/57349-openfoam14-mac-osx-darwin-104-a.html)

gschaider August 7, 2007 07:22

Hi Eric! Thanks for the fee
 
Hi Eric!

Thanks for the feedback. In the next days I'll try compile 1.4.1 on my notebook. I hope that I can then provide a unified patch (which incorporates the additions you suggested. I guess I missed those because I never tested the stuff in parallel)

@Rick: Have you tried setting the processor affinity with mpirun (https://www.sun.com/products-n-solutions/hardware/docs/html/819-7480-10/mca-para ms.html havn't tried it myself yet) to see if it really is the cache? (another possibility would be to set the affinity with the taskset-command afterwards, but that would make it hard to get accurate measurments) But I'm betting on the memory bandwidth

gschaider August 10, 2007 08:40

Just before I run into the wee
 
Just before I run into the weekend: I uploaded a patch for 1.4.1 to the Wiki-page. All the nexessary changes are in that patch (I hope)

It compiles with an OpenMPI from DarwinPorts.

Havn't done too much testing on it. Give me a word if you have problems (or if it works for you)

gschaider August 15, 2007 13:18

Hi Eric! I guess you may ha
 
Hi Eric!

I guess you may have noticed this thread:
http://www.cfd-online.com/cgi-bin/Op...how.cgi?1/4323
(conclusion: cores sharing memory bandwith is bad) But I would have expected a decent speedup at least for the 2CPU-case. Have you had a chance to do parallel benchmarks with non-OpenFOAM software?

egp August 15, 2007 14:37

Hi Bernhard, I wrote a smal
 
Hi Bernhard,

I wrote a small C++ code to compute Pi (e.g., see Using MPI, 2nd ed, by Gropp et al.) over 1e9 intervals. Parallel performance is almost perfect,

1 proc = 10.6 secs
2 proc = 5.3
3 proc = 3.5
4 proc = 2.8
5 proc = 2.1
6 proc = 1.8
7 proc = 1.5
8 proc = 1.6

However, there is almost no data being passed for this test case, which means that the performance doesn't suffer. Also, I did the timing using MPI::Wtime, which gave very different results from the command line "time -p mpirun -np ...".

Eric

gschaider August 15, 2007 14:56

Hi Eric! Have you tried a "
 
Hi Eric!

Have you tried a "pure" MPI-Benchmark? I think I once used this one:
http://www.dhpc.adelaide.edu.au/projects/MPIBench/
(don't know for sure if it's that one) and I think from the results one can judge the memory-throughput

Bernhard

gschaider September 18, 2007 19:20

It was pointed out to me, that
 
It was pointed out to me, that the first 1.4.1-patch that I uploaded to the Wiki was incomplete (very incomplete in fact). I uploaded a new version.

Sorry to everyone who tried and failed

podallaire September 28, 2007 08:27

Hi guys, thanks a lot for t
 
Hi guys,

thanks a lot for the patch and all the instructions ! I was able to compile everything including Paraview 2-4 on my MacBook Pro and it works really well ! I have only one remaining question :

- Is it possible to use a pre-compiled binary of Paraview3 and link it in order to build paraFoam ?

Best regards,

PO Dallaire

gschaider October 1, 2007 07:08

Hi PO! Look for discussions
 
Hi PO!

Look for discussions elsewhere on this board concerning ParaView3. Short answer is no, because
a) Paraview3 is not yet supported by paraFoam
b) to compile the PVReader you need at least the Paraview-headers and the CMakeCache.txt that was used to build the binary and none of those is distributed with the binaries

If you want to use paraview3 your options are:
a) use foamToVTK
b) use the OpenFOAM-filter built into (but not always enabled) in Paraview3 (see discussions elsewhere)

Bernhard

podallaire October 3, 2007 09:25

Thanks for the infos Bernhard
 
Thanks for the infos Bernhard !
Have a nice day
PO

sek October 17, 2007 20:27

It appears that a new version
 
It appears that a new version of operating system (v10.5 Leopard) wll be released on Oct. 26. Can I surmise it'll become much easier to install OF on Mac?

sek October 17, 2007 20:33

It appears that a new version
 
It appears that a new version of operating system (v10.5 Leopard) wll be released on Oct. 26. Can I surmise it'll become much easier to install OF on Mac?

podallaire October 17, 2007 20:33

Hey, it is already easy becaus
 
Hey, it is already easy because of all the work those guys did here :-) Everything work so far on my Macs.

No, it will be exactly the same.

Regards,

PO Dallaire

paka October 17, 2007 20:39

Might be easier, because new L
 
Might be easier, because new Leopard is going to use new Sun Microsystems disc partition, which if I'm not mistaken is called ZFS. It might have happened that Apple switched in Leopard to case sensitive operating system, but I'm just guessing.

podallaire October 17, 2007 20:51

Hi, from what I saw in the
 
Hi,

from what I saw in the previous developer builds, ZFS was not the default file system. Hopefully, that will change for the final version.

paka October 17, 2007 20:54

If I'm right, last two builds
 
If I'm right, last two builds were suppose to have ZFS, but I'm not sure.

hjasak October 18, 2007 00:57

Well, I already ordered it. W
 
Well, I already ordered it. When the pack comes, I will re-port OpenFOAM-1.4.1-dev to Mac OS X Leopard and report. If people are interested I can do the mountable disc partition again - is anyone actually using this at the moment?

Hrv

paka October 18, 2007 04:09

Aloha Hrvoje, Yes, definite
 
Aloha Hrvoje,

Yes, definitely the mountable package would be great. I know couple people working on it.

Thanks,
Krystian

podallaire October 28, 2007 19:52

Hi guys, I installed Leopar
 
Hi guys,

I installed Leopard and made some quick checks for OpenFOAM :

1) Mac OS X does not use ZFS in the installation - still does use the mac os x extended journaled - I do not see ZFS in disk utility
2) I can use my OpenFOAM disk image from Tiger, no problem
3) I tried to recompile but I saw an error somewhere with uint function - I'll try again later this week when I'll have more time
4) I did not compile paraview 2-6; in fact, I compiled Paraview 3 from scratch since it is Mac os X native - no problem here
5) FYI, I found a problem with X11 when compiling and linking opengl library with other programs (see http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_B ug). Don't know if this useful for the OpenFOAM project - just an info ...

Best regards,

PODallaire

podallaire October 30, 2007 11:33

Hi, The error I saw when I
 
Hi,

The error I saw when I tried to recompile is :

primitives/uint/uintIO.C: In function 'Foam::Istream& Foam::operator>>(Foam::Istream&, unsigned int&)':
primitives/uint/uintIO.C:69: error: 'uint' was not declared in this scope
make: *** [Make/darwinDPOpt/uintIO.o] Error 1

PO

gschaider October 30, 2007 14:34

Hi! Don't have Leopard, so
 
Hi!

Don't have Leopard, so I can only guess how to fix this (BTW: which version of g++ comes with Leopard/XCode3 ?):

Try to replace the offending line
i = uint(t.labelToken());
with
i = (unsigned int)(t.labelToken());
(you WILL get a warning about an old-style cast)

Bernhard

podallaire October 30, 2007 14:49

Thanks ! Also, openmpi 1.2.
 
Thanks !

Also, openmpi 1.2.3 comes pre-compiled with XCode

g++ --v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

podallaire October 30, 2007 20:13

I compiled openfoam on Leopard
 
I compiled openfoam on Leopard, some notes :

1) As suggested by Bernhard, a minor modification must be done in uintIO.C

2) With the opengl bug, a flag must be added for foamDebugSwitches : -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries /libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/li bGL.dylib

3) Problem with FoamX and Java -> compiled with error and FoamX does not work ...

Good evening,

PO

podallaire November 1, 2007 09:34

adding "-source 1.4" to java f
 
adding "-source 1.4" to java flags (in file make/rules/General/java) will solve java critical errors

PO

egp November 7, 2007 17:29

Bernhard, Are you putting a
 
Bernhard,

Are you putting all of the OSX patches into 1.4.1-dev?

I assumed that you probably had done this, but when I tried to build 1.4.1-dev on 10.5, it complained about not recognizing Darwin.

Closer inspection of OpenFOAM-1.4.1-dev/.bashrc, etc. shows that the patch has not been applied....

Is there an easy way to get the OSX patch off the svn repostitory?

Eric

hjasak November 8, 2007 02:11

That would be my fault, in two
 
That would be my fault, in two ways:

- I didn't merge the Darwin bits from 1.3 to 1.4.1-dev

- I haven't re-ported to Mac OSX, in expectation of Leopard. The beast is now in the post and when I upgrade my Macs, the dev line will be ported and packed up into sparse disc images.

Bernhard, if there is a way to push the Darwin porting changes into the dev line, please have a go.

Thanks,

Hrv

gschaider November 8, 2007 09:03

Hi Eric, Hi Hrv! The reason
 
Hi Eric, Hi Hrv!

The reason I never put the Mac-Patches into the dev is that I didn't have the disk space on my iBook for two separate OpenFOAM-Installations and I didn't want to inject it into svn from my Linux-machines (where I obviously can't test it)

I will try to do it over the weekend (if the mighty god of diskspace allows it)

Bernhard

hollyc January 20, 2008 20:56

Hi all, I'm trying to compi
 
Hi all,

I'm trying to compile on my Macbook running Leopard. Have added the rules to the directory, and applied the patch, but when .OpenFOAM-1.4.1/.bashrc runs, I get the following error message:


Your Darwin operating system is not supported by this release of OpenFOAM. For further assistance, please contact www.openfoam.org

I'm using MacPorts 1.6.0 - really not sure where to go from here. Any help would be greatly appreciated.

Cheers,
Holly.

gschaider January 21, 2008 13:03

Hi! In .OpenF.OpenFOAM-1.4.
 
Hi!

In .OpenF.OpenFOAM-1.4.1/bashrc there should be an entry concerning darwin just before the comment that says "An unsupported operating system". Otherwise the patch was not correctly applied/the patch-file is faulty.

What does patch say if you apply the patch again (at least it should complain about a previously applied patch in some places)

Bernhard

hollyc January 21, 2008 20:23

Hi, Thanks for the assistan
 
Hi,

Thanks for the assistance - the darwin part is there, and it says this:

Mac OS X 10.4 Darwin
# ~~~~~~~~~~~~~~~~~~~~
elif [ "$machineTest" = "Darwin" ]; then

export WM_ARCH=darwin
export WM_COMPILER=
export WM_MPLIB=OPENMPI

MACOSX_DEPLOYMENT_TARGET="10.4"

Then when I run the patch, this is what happens:

b-macbookhttp://www.cfd-online.com/OpenFOAM_D...part/proud.gifpenFOAM-1.4.1 Holly$ patch -p0 <OpenFOAM-1.4.1-MacOSX.patch
patching file .bashrc
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file .OpenFOAM-1.4.1/bashrc
Reversed (or previously applied) patch detected! Assume -R? [n] y
Hunk #1 succeeded at 156 (offset 1 line).
patching file .OpenFOAM-1.4.1/apps/paraview/bashrc
patching file wmake/src/lex.yy.c
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file wmake/rules/darwin/c++Debug
patching file wmake/rules/darwin/c
patching file wmake/rules/darwin/mplibMPICH
patching file wmake/rules/darwin/cDebug
patching file wmake/rules/darwin/mplibOPENMPI
patching file wmake/rules/darwin/c++Opt
patching file wmake/rules/darwin/.gdb_history
patching file wmake/rules/darwin/mplibLAM
patching file wmake/rules/darwin/c++Prof
patching file wmake/rules/darwin/mplib
patching file wmake/rules/darwin/cOpt
patching file wmake/rules/darwin/X
patching file wmake/rules/darwin/c++
patching file wmake/rules/darwin/cProf
patching file wmake/rules/darwin/general
patching file wmake/wmakeLnInclude
patching file wmake/wmake
patching file wmake/Makefile
patching file applications/utilities/postProcessing/graphics/PVFoamReader/Allwmake
patching file applications/utilities/miscellaneous/foamDebugSwitches/Make/options
patching file applications/utilities/preProcessing/mapFields/Make/options
patching file applications/utilities/preProcessing/FoamX/C++/FoamXLib/ITypeDescriptorImpl.C
patching file applications/utilities/parallelProcessing/decompositionMethods/metis-5.0pre2/GKl ib/trunk/error.c
patching file applications/utilities/parallelProcessing/decompositionMethods/metis-5.0pre2/GKl ib/trunk/memory.c
patching file applications/utilities/parallelProcessing/decompositionMethods/metis-5.0pre2/GKl ib/trunk/gk_externs.h
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file applications/utilities/parallelProcessing/decompositionMethods/metis-5.0pre2/GKl ib/Make/options
patching file applications/utilities/parallelProcessing/decompositionMethods/parMetisDecomp/Pa rMetis-3.1/ParMETISLib/stdheaders.h
patching file applications/utilities/mesh/conversion/ccm26ToFoam/libccmio/libcgns/Make/options
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/Allwmake
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/MGridGenGamgAgglomeration/ParMGridGen-1.0/MGridGen/Lib/mgridgen.h
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/MGridGenGamgAgglomeration/ParMGridGen-1.0/MGridGen/Lib/Make/options
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/MGridGenGamgAgglomeration/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/OpenFOAM/OSspecific/Unix/printStack.C
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/OpenFOAM/OSspecific/Unix/clockTime/clockTime.H
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/OpenFOAM/OSspecific/Unix/fileStat.C
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/OpenFOAM/primitives/ulong/ulongIO.C
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/OpenFOAM/primitives/Scalar/doubleFloat.H
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/OpenFOAM/primitives/Scalar/Scalar.H
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file src/triSurface/triSurface/interfaces/NAS/readNAS.C
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file bin/patchTool
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file bin/FoamX
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file bin/killFoamX
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file bin/foamEndJob
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file bin/foamInstallationTest
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file bin/runFoamXHB
Reversed (or previously applied) patch detected! Assume -R? [n] y

and then I try and . $HOME/.bashrc I get this:

Your Darwin operating system is not supported by this release of OpenFOAM. For further assistance, please contact www.openfoam.org.

Executing: /Volumes/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/apps/ensightFoam/bashrc
Executing: /Volumes/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/apps/paraview/bashrc


Thanks for the assistance

gschaider January 22, 2008 07:19

OK. The patch seems to be alri
 
OK. The patch seems to be alright (sorry for doubting you). Obviously (but I'm not really good with shell-programming )"$machineTest" is "Darwin" because it is printed like this by the catch-all-else from the original and the elif-condition printed above should be true.

Could you source the bashrc from the command line with
. ~/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/bashrc
and see what happens? Add some echo-commands to the script and see what parts actually get sexecuted (I really don't know what could be the problem)

Bernhard

hollyc January 22, 2008 22:53

Well that was exciting... S
 
Well that was exciting...

So just before I sourced the bashrc, I thought I'd check it - and lo and behold.. no Darwin section. So I reapplied the patch again.. checked it.. and there was a Darwin section.. so I sourced it - it ran perfectly. I ran OpenFOAM-1.4.1/Allwmake and it appears that everything went great :D

So I attempt to run FoamX.. and I get this:

b-macbook:tutorials Holly$ FoamX
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX: line 88: kill: (94458) - No such process
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX: line 88: kill: (94464) - No such process
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX: line 88: kill: (94471) - No such process
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX: line 88: kill: (94478) - No such process
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX: line 88: kill: (94485) - No such process
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX: line 88: kill: (94492) - No such process
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX: line 88: kill: (94499) - No such process
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX:
.
. (so it goes on...)
.
.
line 88: kill: (94741) - No such process
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/killFoamX: line 88: kill: (94748) - No such process
Starting NameServer with inet:b-macbook.aibn.uq.edu.au:1234 ...
Starting FoamX Host Browser with inet:b-macbook.aibn.uq.edu.au:1234 ...
/Volumes/OpenFOAM/OpenFOAM-1.4.1/bin/runFoamXHB: line 139: FoamXHostBrowser: command not found
runFoamXHB : cleanup
runFoamXHB: Name server is not running.

Hopefully this makes sense to someone - I have no idea. Any help much appreciated http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

- Holly

gschaider January 23, 2008 19:03

Hi Holly! I hardly use Foam
 
Hi Holly!

I hardly use FoamX. I remember that some of the shell-scripts that call FoamX got patched because some commands on MacOSX behave BSDy (as opposed to the Linuxy behaviour that is assumed by the original OF-scripts). MAYBE (I don't have Leopard) this behaviour has changed and now these patches are contraproductive. Look at the patch-file. Maybe manually reversing the relevant patches helps.

Bernhard

sek February 5, 2008 14:32

Hi Bernhard, Greetings fro
 
Hi Bernhard,

Greetings from D.C. Any progress on MAC patch to the dev version?

gschaider February 7, 2008 14:10

Hi! You mean Hrv's version
 
Hi!

You mean Hrv's version on
https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/O penFOAM-1.4.1-dev/ ?

The patches were submitted some time back (and are in the repository) but I forgot to announce it.

Bernhard

sek February 14, 2008 11:41

Hi, I compiled 1.4.1 on MA
 
Hi,

I compiled 1.4.1 on MAc OX10.4 darwin intel processor, and tried to run paraview. This is what I got.

===========================================
ParaView error: InitializeTcl failed
Tk_Init error: no display name and no $DISPLAY environment variable
============================================

Cab someone tell me what's going on and what I should do?

Thanks,

hjasak February 14, 2008 12:52

Did you start it from xterm +
 
Did you start it from xterm + are you running X?

Hrv

sek February 14, 2008 15:10

I thought I was running X, but
 
I thought I was running X, but I actually wasn't. M X11 applications were not working because of that, Thanks for poining this out. BTW how are you handling going back and force between xterm and shell terminal on MAC?

Thanks in advance,

sek February 15, 2008 12:37

Hi, Hrv's dev version doesn
 
Hi,

Hrv's dev version doesn't compile properly because the linker can't locate libraries. The rror message looks like

/usr/bin/ld: can;t locate file for: -lfiniteVolume

Can anybody tell me how to resolve this? It appears there's something to do with $LIB_SRC.

TIA

hjg March 15, 2008 12:18

Hello All, I'm trying to in
 
Hello All,

I'm trying to install OpenFoam-1.4.1. My current platform is a iMac Intel DuoCore with MacOsX-10.5.2.
Iwas following the instructions also given on the Wiki (Installation of 1.4.1). Allwmake exits at the same point with message:

make[2]: *** [/Users/heinzjuergengeurtz/OpenFOAM/OpenFOAM-1.4.1/applications/bin/darwinDPOpt/ mixtureAdiabaticFlameT] Error 1
make[1]: *** [mixtureAdiabaticFlameT] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [thermophysical] Error 2
make: Target `application' not remade because of errors.
+ '[' 0 = 1 -a '' = doc ']'

Has anybody an idea how to solve this???

Live long and prosper...

HJG

gschaider March 17, 2008 10:01

Hi HJ! There must be anothe
 
Hi HJ!

There must be another error message before the one you posted (I really appreciate that you do not post the whole compile-output). Just run it again with (assuming bash)

./Allwake 2>&1 | tee compile.log

and look in the compile.log for the first error before the message you were posting

Bernhard


All times are GMT -4. The time now is 19:08.