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

Installing OF 1.6 on Mac OS X

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 4, 2009, 09:21
Default
  #41
Senior Member
 
MadsR's Avatar
 
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 175
Rep Power: 8
MadsR is on a distinguished road
I think you have a good point there. I have seen, though, new graphic cards with more than 1GB of local memory, and the memory band-width from the GPU to its own memory can be very high (more than 100GB/s). But double precision performance can seriously impact peak throughput, although I think this is already being dealt with.

At least it's interesting to follow the development :-)


/Mads
__________________
Online free airfoil-mesher for OpenFOAM here
MadsR is offline   Reply With Quote

Old   September 8, 2009, 13:44
Default
  #42
New Member
 
Felix Apel
Join Date: Sep 2009
Posts: 15
Rep Power: 7
Don456 is on a distinguished road
Hi,

I also tried to compile OF 1.6 on Mac os. After some installing of needed stuff everything worked well until I got:

make: *** No rule to make target `//finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.dep', needed by `Make/darwinIntelDPOpt/dependencies'. Stop.

Has anyone an idea how I can solve that problem?

I tried to compile under 10.6 and as well under 10.5 (32 bit).

Greetings Felix
Don456 is offline   Reply With Quote

Old   September 8, 2009, 17:19
Default
  #43
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 Don456 View Post
Hi,

I also tried to compile OF 1.6 on Mac os. After some installing of needed stuff everything worked well until I got:

make: *** No rule to make target `//finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.dep', needed by `Make/darwinIntelDPOpt/dependencies'. Stop.

Has anyone an idea how I can solve that problem?

I tried to compile under 10.6 and as well under 10.5 (32 bit).

Greetings Felix
No idea. That file never caused problems. Two questions:
- Which version of the compiler are you using (g++ -v)
- Have you tried "wclean; rmdepall" in the $FOAM_SRC/finiteVolume-directory. Because it looks a bit like a problem that occurs when the compilation process is interrupted in the middle of the generation of a dependency-file (the dependency-file is not completly written and the next compilation is confused)
- A third question ("I didn't expect the spanish inquisition" "Nobody expects ..."): on the shell. What is the output of "echo $FOAM_SRC"? Because the content of $FOAM_SRC should be between the two / of "//finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.dep"

Bernhard

PS: the stuff with the spanish inquisition is only funny if you know that MontyPython-sketch by heart.
gschaider is offline   Reply With Quote

Old   September 8, 2009, 18:00
Default
  #44
New Member
 
Felix Apel
Join Date: Sep 2009
Posts: 15
Rep Power: 7
Don456 is on a distinguished road
Thanks for the reply.

Question 1:
bionicbook5:~ OF$ g++ -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)

Question 2:

After I read your post I tried both and this is the result:

bionicbook5:src OF$ wmake libso finiteVolume
SOURCE=fvMesh/fvMesh.C ; g++ -DdarwinIntel -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/triSurface/lnInclude -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/meshTools/lnInclude -IlnInclude -I. -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelDPOpt/fvMesh.o
In file included from fvMesh/fvMesh.C:53:
lnInclude/CECCellToFaceStencil.H: In constructor ‘Foam::centredCECCellToFaceStencilObject::centredC ECCellToFaceStencilObject(const Foam::fvMesh&)’:
lnInclude/CECCellToFaceStencil.H:57: error: ‘Foam::CECCellToFaceStencil::CECCellToFaceStencil( const Foam::CECCellToFaceStencil&)’ is private
lnInclude/centredCECCellToFaceStencilObject.H:69: error: within this context
In file included from fvMesh/fvMesh.C:54:
lnInclude/CFCCellToFaceStencil.H: In constructor ‘Foam::centredCFCCellToFaceStencilObject::centredC FCCellToFaceStencilObject(const Foam::fvMesh&)’:
lnInclude/CFCCellToFaceStencil.H:57: error: ‘Foam::CFCCellToFaceStencil::CFCCellToFaceStencil( const Foam::CFCCellToFaceStencil&)’ is private
lnInclude/centredCFCCellToFaceStencilObject.H:69: error: within this context
In file included from fvMesh/fvMesh.C:55:
lnInclude/CPCCellToFaceStencil.H: In constructor ‘Foam::centredCPCCellToFaceStencilObject::centredC PCCellToFaceStencilObject(const Foam::fvMesh&)’:
lnInclude/CPCCellToFaceStencil.H:57: error: ‘Foam::CPCCellToFaceStencil::CPCCellToFaceStencil( const Foam::CPCCellToFaceStencil&)’ is private
lnInclude/centredCPCCellToFaceStencilObject.H:69: error: within this context
In file included from fvMesh/fvMesh.C:56:
lnInclude/FECCellToFaceStencil.H: In constructor ‘Foam::centredFECCellToFaceStencilObject::centredF ECCellToFaceStencilObject(const Foam::fvMesh&)’:
lnInclude/FECCellToFaceStencil.H:69: error: ‘Foam::FECCellToFaceStencil::FECCellToFaceStencil( const Foam::FECCellToFaceStencil&)’ is private
lnInclude/centredFECCellToFaceStencilObject.H:69: error: within this context
In file included from fvMesh/fvMesh.C:57:
lnInclude/CECCellToFaceStencil.H: In constructor ‘Foam::upwindCECCellToFaceStencilObject::upwindCEC CellToFaceStencilObject(const Foam::fvMesh&, bool, Foam::scalar)’:
lnInclude/CECCellToFaceStencil.H:57: error: ‘Foam::CECCellToFaceStencil::CECCellToFaceStencil( const Foam::CECCellToFaceStencil&)’ is private
lnInclude/upwindCECCellToFaceStencilObject.H:76: error: within this context
In file included from fvMesh/fvMesh.C:58:
lnInclude/CFCCellToFaceStencil.H: In constructor ‘Foam::upwindCFCCellToFaceStencilObject::upwindCFC CellToFaceStencilObject(const Foam::fvMesh&, bool, Foam::scalar)’:
lnInclude/CFCCellToFaceStencil.H:57: error: ‘Foam::CFCCellToFaceStencil::CFCCellToFaceStencil( const Foam::CFCCellToFaceStencil&)’ is private
lnInclude/upwindCFCCellToFaceStencilObject.H:76: error: within this context
In file included from fvMesh/fvMesh.C:59:
lnInclude/CPCCellToFaceStencil.H: In constructor ‘Foam::upwindCPCCellToFaceStencilObject::upwindCPC CellToFaceStencilObject(const Foam::fvMesh&, bool, Foam::scalar)’:
lnInclude/CPCCellToFaceStencil.H:57: error: ‘Foam::CPCCellToFaceStencil::CPCCellToFaceStencil( const Foam::CPCCellToFaceStencil&)’ is private
lnInclude/upwindCPCCellToFaceStencilObject.H:76: error: within this context
In file included from fvMesh/fvMesh.C:60:
lnInclude/FECCellToFaceStencil.H: In constructor ‘Foam::upwindFECCellToFaceStencilObject::upwindFEC CellToFaceStencilObject(const Foam::fvMesh&, bool, Foam::scalar)’:
lnInclude/FECCellToFaceStencil.H:69: error: ‘Foam::FECCellToFaceStencil::FECCellToFaceStencil( const Foam::FECCellToFaceStencil&)’ is private
lnInclude/upwindFECCellToFaceStencilObject.H:76: error: within this context
In file included from fvMesh/fvMesh.C:62:
lnInclude/CFCFaceToCellStencil.H: In constructor ‘Foam::centredCFCFaceToCellStencilObject::centredC FCFaceToCellStencilObject(const Foam::fvMesh&)’:
lnInclude/CFCFaceToCellStencil.H:60: error: ‘Foam::CFCFaceToCellStencil::CFCFaceToCellStencil( const Foam::CFCFaceToCellStencil&)’ is private
lnInclude/centredCFCFaceToCellStencilObject.H:69: error: within this context
make: *** [Make/darwinIntelDPOpt/fvMesh.o] Error 1

Question 3:

bionicbook5:src OF$ echo $FOAM_SRC
/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src

In addition to that I'm using OpenFOAM 1.6.x (git version). I hope that this is not the problem.

I also get some other Errors. For example:

bionicbook5:src OF$ wmake libo OSspecific/$WM_OSTYPE
SOURCE=printStack.C ; g++ -DdarwinIntel -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelDPOpt/printStack.o
printStack.C: In function ‘void Foam:rintSourceFileAndLine(Foam::Ostream&, const Foam::HashTable<int, Foam::fileName, Foam::string::hash>&, const Foam::fileName&, const Foam::word&)’:
printStack.C:119: warning: use of old-style cast
printStack.C: In function ‘void* Foam::getStackAddress()’:
printStack.C:209: warning: use of old-style cast
printStack.C: In function ‘void* Foam::getStackAddress(int)’:
printStack.C:243: warning: use of old-style cast
printStack.C: In function ‘unsigned int Foam::backtrace(void**, unsigned int)’:
printStack.C:253: warning: comparison between signed and unsigned integer expressions
printStack.C:257: warning: use of old-style cast
printStack.C:263: warning: use of old-style cast
printStack.C: In function ‘char** Foam::backtrace_symbols(void**, unsigned int)’:
printStack.C:273: warning: use of old-style cast
printStack.C:283: warning: use of old-style cast
printStack.C:283: error: cast from ‘void*’ to ‘unsigned int’ loses precision
printStack.C:283: warning: use of old-style cast
printStack.C:283: error: cast from ‘void*’ to ‘unsigned int’ loses precision
printStack.C:283: warning: use of old-style cast
printStack.C:285: warning: use of old-style cast
printStack.C:277: warning: unused variable ‘result’
make: *** [Make/darwinIntelDPOpt/printStack.o] Error 1
Don456 is offline   Reply With Quote

Old   September 8, 2009, 19:22
Default
  #45
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 Don456 View Post
Thanks for the reply.

Question 1:
bionicbook5:~ OF$ g++ -v
gcc version 4.2.1 (Apple Inc. build 5646)
OK. This is the compiler provided by Apple. I use a third-party 4.3, but I don't know if this would cure your problems (don't think so)

Can anyone here confirm a successful compilation with the Apple-compiler?

Quote:
Originally Posted by Don456 View Post
Question 2:

After I read your post I tried both and this is the result:

bionicbook5:src OF$ wmake libso finiteVolume
SOURCE=fvMesh/fvMesh.C ; g++ -DdarwinIntel -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/triSurface/lnInclude -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/meshTools/lnInclude -IlnInclude -I. -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelDPOpt/fvMesh.o
In file included from fvMesh/fvMesh.C:53:
lnInclude/CECCellToFaceStencil.H: In constructor ‘Foam::centredCECCellToFaceStencilObject::centredC ECCellToFaceStencilObject(const Foam::fvMesh&)’:
lnInclude/CECCellToFaceStencil.H:57: error: ‘Foam::CECCellToFaceStencil::CECCellToFaceStencil( const Foam::CECCellToFaceStencil&)’ is private
lnInclude/centredCECCellToFaceStencilObject.H:69: error: within this context
OK. This looks definitely different from the previous message you posted. But it looks quite similar to the problem described in
Foam::CECCellToFaceStencil::CECCellToFaceStencil(. ..) is private
(which would indicate that 1.6 doesn't compile too well with a 4.2 compiler

Quote:
Originally Posted by Don456 View Post
Question 3:

bionicbook5:src OF$ echo $FOAM_SRC
/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src

In addition to that I'm using OpenFOAM 1.6.x (git version). I hope that this is not the problem.
Shouldn't be a problem. As long as you know how to keep the Mac-patches at the same time

The question for $FOAM_SRC is obsolete as the problem seems to occur no longer

Quote:
Originally Posted by Don456 View Post
I also get some other Errors. For example:

bionicbook5:src OF$ wmake libo OSspecific/$WM_OSTYPE
SOURCE=printStack.C ; g++ -DdarwinIntel -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelDPOpt/printStack.o
printStack.C: In function ‘void Foam:rintSourceFileAndLine(Foam::Ostream&, const Foam::HashTable<int, Foam::fileName, Foam::string::hash>&, const Foam::fileName&, const Foam::word&)’:

printStack.C:283: error: cast from ‘void*’ to ‘unsigned int’ loses precision
You're compiling on 64 bit, right? The cast should be to "unsigned long int" I think (which should be already in the patch)

Bernhard
gschaider is offline   Reply With Quote

Old   September 9, 2009, 04:26
Default compiler issue
  #46
New Member
 
Aurelia Vallier
Join Date: Sep 2009
Posts: 8
Rep Power: 7
AureliaV is on a distinguished road
Hi
after some days of struggling it's time to come here and ask for help.
I did the following:

#1# create a case sensitive disc image called /Volumes/myvoldiskimage
hdiutil create -size 1t -type SPARSE -fs HFSX -volname myvoldiskimage mydiskimage
hdiutil compact mydiskimage.sparseimage
hdiutil attach mydiskimage.sparseimage

#2# create OpenFOAM directory
ln -s /Volumes/myvoldiskimage OpenFOAM

#3# download OF1.6 and Thirdparty1.6 generall and do tar in OpenFOAM directory (which is case sensitive)
cd OpenFOAM
tar xzf ~/Downloads/OpenFOAM-1.6.General.gtgz
tar xvzf ~/Downloads/ThirdParty-1.6.General.gtgz

#4# download patches (not with mozilla but with firefox to kepp .gz) and do tar in the appropriate (case sensitive) directory:
cd OpenFOAM-1.6
mv ~/Downloads/OpenFOAM-1.6-Mac.patch.v1.gz .
gunzip OpenFOAM-1.6-Mac.patch.v1.gz
patch -p1 <OpenFOAM-1.6-Mac.patch.v1

cd ThirdParty-1.6
mv ~/Downloads/ThirdParty-1.6.-Mac.patch.v1.gz .
gunzip ThirdParty-1.6.-Mac.patch.v1.gz
patch -p1 <ThirdParty-1.6.-Mac.patch.v1

#.gitignore allready exists and the one from the patch was rejected. I overwrote it:
79:ThirdParty-1.6 aurelia_thomas_vallier$ cp .gitignore.rej .gitignore


#5#adapt the compiler (gcc-mp-4.3 and g+-mp-4.3) to fit the system
...???

#6# add this line in ~/.bash_profile
. ~/OpenFOAM/OpenFOAM-1.6/etc/bashrc

#7# source it:
. ~/.bash_profile

#8# compile
cd OpenFOAM-1.6
./Allwmake


The point #5# is the one which I can't solve by myself...
I add in etc/bahrc, line 92
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH

but when I did /.Allwmake, the first error was
+ cd wmake/src
+ make
gcc-mp-4.3 -m64 -Wall -O3 -fPIC -Ddarwin dirToString.c -o /Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6/wmake/bin/darwinIntel64/dirToString
make: gcc-mp-4.3: Command not found
make: *** [/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6/wmake/bin/darwinIntel64/dirToString] Error 127

I checked the following:
which gcc
/usr/bin/gcc

g++ -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5493~1/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 5493)

It seems that the compiler used it the one provided by Xcode, not the one in ThirdParty
Then I tried to change line 102-103 in OpenFOAM/OpenFOAM-1.6/etc/settings.sh :
compilerInstall=OpenFOAM
#compilerInstall=System
But when I source the bash file, I get this error:
. ~/OpenFOAM/OpenFOAM-1.6/etc/bashrc
Warning in /Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6/etc/settings.sh:
Cannot find /Users/aurelia_thomas_vallier/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/darwinIntel64 installation.
Please install this compiler version or if you wish to use the system compiler,
change the 'compilerInstall' setting to 'System' in this file

And this is because there is no file name "platforms" in OpenFOAM/ThirdParty-1.6/gcc-4.3.3/
95:gcc-4.3.3 aurelia_thomas_vallier$ ls
ABOUT-NLS Makefile.def config.rpath intl libobjc maintainer-scripts
COPYING Makefile.in config.sub libada libssp missing
COPYING.LIB Makefile.tpl configure libcpp libstdc++-v3 mkdep
COPYING3 NEWS configure.ac libdecnumber libtool-ldflags mkinstalldirs
COPYING3.LIB README contrib libffi libtool.m4 move-if-change
ChangeLog README.SCO depcomp libgcc ltgcc.m4 stage_final
ChangeLog.tree-ssa boehm-gc fixincludes libgfortran ltmain.sh symlink-tree
INSTALL compile gcc libgomp ltoptions.m4 ylwrap
LAST_UPDATED config gnattools libiberty ltsugar.m4 zlib
MAINTAINERS config-ml.in include libjava ltversion.m4
MD5SUMS config.guess install-sh libmudflap lt~obsolete.m4


So in ets/bashrc the export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH didn't apply?

I looked at the files in OpenFOAM/OpenFOAM-1.6/wmake/rules/darwinIntel64 and it doesn't seem to me that there is something to change there (in c, c++ and orignal there i a line whith cc = gcc-mp-4.3 -m64)

can someone translate the line "adapt the compiler (gcc-mp-4.3 and g+-mp-4.3) to fit the system" to a beginner ?
thanks in advance!
Aurelia
AureliaV is offline   Reply With Quote

Old   September 9, 2009, 06:26
Default
  #47
New Member
 
Felix Apel
Join Date: Sep 2009
Posts: 15
Rep Power: 7
Don456 is on a distinguished road
@Bernhard

I'm not compiliing 64 bit.

I switched to a newer version of gcc so that problem is solved.

But now I got another one it's quite strange:

SOURCE=finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C ; g++ -DdarwinIntel -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/triSurface/lnInclude -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/meshTools/lnInclude -IlnInclude -I. -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/Users/OF/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelDPOpt/quadraticFitSnGradData.o
finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C: In constructor ‘Foam::quadraticFitSnGradData::quadraticFitSnGradD ata(const Foam::fvMesh&, Foam::scalar)’:
finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C:102: error: ‘class Foam::extendedCellToFaceStencil’ has no member named ‘stencil’
finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C:107: error: no matching function for call to ‘Foam::extendedCellToFaceStencil::collectData(cons t Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, Foam::List<Foam::List<Foam::Vector<double> > >&)’
make: *** [Make/darwinIntelDPOpt/quadraticFitSnGradData.o] Error 1

Do you have an idea?

@Aurelia

you just have to edit the bashrc and the wmake rules for darwin. In all files you have to change gcc-m-4.3 into gcc. You have to do the same as well with g++. Hope that helps you.
Don456 is offline   Reply With Quote

Old   September 9, 2009, 17:25
Default
  #48
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 don't have those problems / just re-compiled the latest git version.

On another topic, I wanted to mention that after installing Snow Leopard yesterday, I'm now able to compile OpenFOAM 1.6.x on it, not easy but seems to work. The only thing that does not compile is ParMetis lib -> redistributeMeshPar is broken for now because of that.

Couple things to mention :

1) Getting a working version of gcc 4.3 was the most difficult part / I tried everything : compiling from sources and MacPort. Still buggy, not working for now. The easiest way is to use fink and install gcc 4.4. However, fink needs to be built from sources as documented on the website.
2) The openfoam patche need some modifications to reflect the new compiler and to apply the following modif : OpenFoam-1.5 on Solaris -- compilation problem calling octreeDataPoint(.) constructor
4) Still working on qt/paraview cocoa 64 bit, will let you know when I get a working version

PO
podallaire is offline   Reply With Quote

Old   September 11, 2009, 10:14
Default
  #49
New Member
 
Aurelia Vallier
Join Date: Sep 2009
Posts: 8
Rep Power: 7
AureliaV is on a distinguished road
Hi
thank you Felix for your help
well I got the same error than you then.. so I also installed a newer version of gcc
and now I have OpenFOAM-1.6.x
the compilation doesn't succeed anyway. The /applications/ are not compiled because of many previously errors
here is the list of errors that appear during compilation

#0# compiling ThirdParty-1.6:

++ cd malloc
++ ./Allwmake
+ wmake libso hoard
'libNULL.dylib' is up to date.
+ wmake libo fbsdmalloc
ld -r -o libNULL.o
ld warning: -arch not specified
ld: no object files specified for inferred architecture i386
make: *** [libNULL.o] Error 1

+ make distclean
make: *** No rule to make target `distclean'. Stop.

++ wmake libso ParMETISLib
ld: library not found for -lmetis-parmetis
collect2: ld returned 1 exit status
make: *** [/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/lib/darwinIntel64DPOpt/openmpi-1.3.3/libparmetis.dylib] Error 1




#1# in decompositionMethods
+ wmake libso decompositionMethods
ld: library not found for -lscotch
collect2: ld returned 1 exit status
make: *** [/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/lib/darwinIntel64DPOpt/libdecompositionMethods.dylib] Error 1
+ '[' -d /Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/lib/darwinIntel64DPOpt/openmpi-1.3.3 ']'
+ WM_OPTIONS=darwinIntel64DPOptOPENMPI
+ wmake libso parMetisDecomp
ld: library not found for -lmetis-parmetis
collect2: ld returned 1 exit status
make: *** [/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/lib/darwinIntel64DPOpt/openmpi-1.3.3/libparMetisDecompositionMethod.dylib] Error 1


#2# in meshTools
+ wmake libso meshTools
ld: library not found for -ldecompositionMethods
collect2: ld returned 1 exit status
make: *** [/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/lib/darwinIntel64DPOpt/libmeshTools.dylib] Error 1

#3# in finiteVolume
SOURCE=cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.C ; g++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/src/triSurface/lnInclude -I/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/src/meshTools/lnInclude -IlnInclude -I. -I/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/Users/aurelia_thomas_vallier/OpenFOAM/Ope
nFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64DPOpt/pointSourceProperties.o
SOURCE=cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesIO.C ; g++ -m64 -
DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users
/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/src/triSurface/lnInclude -I/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/src/meshTools/ln
Include -IlnInclude -I. -I/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/Users/aurelia_thomas_vallier/OpenFOAM/O
penFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64DPOpt/pointSourcePropertiesIO.o
ld: library not found for -lmeshTools
collect2: ld returned 1 exit status
make: *** [/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/lib/darwinIntel64DPOpt/libfiniteVolume.dylib] Error 1
+ wmake libso sampling
ld: library not found for -lfiniteVolume
collect2: ld returned 1 exit status
make: *** [/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/lib/darwinIntel64DPOpt/libsampling.dylib] Error 1
+ wmake libso dynamicMesh
ld: library not found for -lfiniteVolume
collect2: ld returned 1 exit status
make: *** [/Users/aurelia_thomas_vallier/OpenFOAM/OpenFOAM-1.6.x/lib/darwinIntel64DPOpt/libdynamicMesh.dylib] Error 1

and it continues like this with many similar error messages

I hope the error #2# will be fixed when the error #0#,#1# will not happen anymore

I would appreciate some help! It will be so nice to be abble to use OpenFoam on my MacBook...

Aurelia
AureliaV is offline   Reply With Quote

Old   September 11, 2009, 10:32
Default
  #50
New Member
 
Felix Apel
Join Date: Sep 2009
Posts: 15
Rep Power: 7
Don456 is on a distinguished road
Hi Aurelia,

I also had some libs missing and up to now I was not able to fix them so still no OpenFOAM 1.6 on my Mac but since some time I use a precompiled OpenFOAM 1.5 version on my Mac.

If you are interested: http://www.ifdmavt.ethz.ch/education...foam/of-macosx

Whouldn`t it be nice if someone publishes a compiled Mac version so everyone can use it.
As you can see in the link above it's also a precompiled version and works good.
In additon to that the solution to have a case sensitive environment is also quite smart.

So long Felix.

Ps. If someone has ideas about the compile errors please post!
Don456 is offline   Reply With Quote

Old   September 11, 2009, 16:48
Default
  #51
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 185
Rep Power: 8
podallaire is on a distinguished road
Aurelia,

I believe that you are using the default g++ 4.0 from Apple Xcode
which will not work with 1.6.x / did you have a look at the Wiki which explains
the detailled procedure ?

http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac

You need gcc-4.3 from MacPort, this is why the patch calls gcc-mp-4.3, g++-mp-4.3 and cpp-mp-4.3

The default gcc 4.0 and gcc 4.2 which are provided with XCode will not work.

Regards,

PO
podallaire is offline   Reply With Quote

Old   September 11, 2009, 16:55
Default
  #52
New Member
 
Felix Apel
Join Date: Sep 2009
Posts: 15
Rep Power: 7
Don456 is on a distinguished road
I tried to use gcc 4.4.3 because MacPorts gcc 4.3 is actually not working under Mac os 10.6.
So far gcc 4.4 seems not to work for OF 1.6

Greetings Felix

I think I will give it a try with gcc 4.3 under Mac os 10.5
Don456 is offline   Reply With Quote

Old   September 11, 2009, 16:58
Default
  #53
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 185
Rep Power: 8
podallaire is on a distinguished road
try gcc 4.4 with Fink under Mac OS X 10.6
podallaire is offline   Reply With Quote

Old   September 11, 2009, 22:53
Default
  #54
New Member
 
Aurelia Vallier
Join Date: Sep 2009
Posts: 8
Rep Power: 7
AureliaV is on a distinguished road
Hi Felix and Pierre Olivier
thank you both for your post!

> I use a precompiled OpenFOAM 1.5 version on my Mac.
Thanks for the link Felix. Actually I already installed it, and it's working well

As I use my own solver I sometimes need to make some changes in the OpenFOAM-1.* subdirectories ( OFstream for example). That's why a need to be able to compile it.


>I believe that you are using the default g++ 4.0 from Apple Xcode
which will not work with 1.6.x
no, I installed a new gcc in usr/local/bin and made symlink to the gcc in usr/bin
and I change all the gcc/++-m-4.3 into gcc/++ in the rules (c, c++ and general) and the bash file
now the compiler is gcc4.4
aurelia_thomas_vallier$ gcc --version
gcc (GCC) 4.4.1 20090623 (prerelease)
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

well I 'll try to install Macport gcc4.3 instead, maybe... maybe it'll work??
we'll see...
AureliaV is offline   Reply With Quote

Old   September 21, 2009, 04:57
Default
  #55
New Member
 
Filipe Rosa
Join Date: Jul 2009
Posts: 3
Rep Power: 8
filipe is on a distinguished road
Hello,
I am trying to compile the 32 bit version of OpenFOAM 1.6 on Snow Leopard but it looks the 64bits is always compiling giving that previous error. I already place in the bashrc the option export WM_32=on and change the rules for darwinIntel for -m32 but it seams that each time I try to compile the system auto detects try to compile in 64 bits. Anyone can point me out on this?
Regards,
Filipe
filipe is offline   Reply With Quote

Old   September 21, 2009, 13:24
Default
  #56
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 filipe View Post
Hello,
I am trying to compile the 32 bit version of OpenFOAM 1.6 on Snow Leopard but it looks the 64bits is always compiling giving that previous error. I already place in the bashrc the option export WM_32=on and change the rules for darwinIntel for -m32 but it seams that each time I try to compile the system auto detects try to compile in 64 bits. Anyone can point me out on this?
Regards,
Filipe
Wie "that previous error" you mean what? It is not obvious fro me from the context.

I just installed Snow Leopard on my machine. The version of OF compiled on 1.5 runs. I will try later this week to do a recompilation.

Have a look whether the WM_ARCH_OPTION-environment variable is set. If set to 64 it enforces a 64-bit-compilation

Bernhard
gschaider is offline   Reply With Quote

Old   September 22, 2009, 03:50
Default
  #57
New Member
 
Filipe Rosa
Join Date: Jul 2009
Posts: 3
Rep Power: 8
filipe is on a distinguished road
Sorry, I mean the paraview not compiling properly in 64. However I was able to compile everything in 64 and installed a pre compiled version of paraview and now everything is working.
Thanks,
Filipe
filipe is offline   Reply With Quote

Old   September 22, 2009, 13:44
Default
  #58
New Member
 
Felix Apel
Join Date: Sep 2009
Posts: 15
Rep Power: 7
Don456 is on a distinguished road
Hi,

after some time I retried to compile under 10.5 (32 bit) with gcc 4.4.
It sems to work good but one problem left.

But another one than before:

Bionicbook5:src openfoam$ wmake libso meshTools
SOURCE=triSurface/surfaceFeatures/surfaceFeatures.C ; g++ -DdarwinIntel -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/openfoam/OpenFOAM/OpenFOAM-1.6.x/src/triSurface/lnInclude -I/Users/openfoam/OpenFOAM/OpenFOAM-1.6.x/src/decompositionMethods/decompositionMethods/lnInclude -I/Users/openfoam/OpenFOAM/OpenFOAM-1.6.x/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/Users/openfoam/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/Users/openfoam/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelDPOpt/surfaceFeatures.o
triSurface/surfaceFeatures/surfaceFeatures.C: In member function ‘Foam::Map<int> Foam::surfaceFeatures::nearestSamples(const Foam::labelList&, const Foam:ointField&, const Foam::scalarField&) const’:
triSurface/surfaceFeatures/surfaceFeatures.C:769: error: conflicting declaration ‘Foam:ctreeDataPoint samples’
triSurface/surfaceFeatures/surfaceFeatures.C:768: error: ‘samples’ has a previous declaration as ‘Foam::treeBoundBox samples’
triSurface/surfaceFeatures/surfaceFeatures.C: In member function ‘Foam::Map<int> Foam::surfaceFeatures::nearestSamples(const Foam::labelList&, const Foam:ointField&, const Foam::scalarField&, const Foam::scalarField&, Foam::scalar) const’:
triSurface/surfaceFeatures/surfaceFeatures.C:870: error: conflicting declaration ‘Foam:ctreeDataPoint samples’
triSurface/surfaceFeatures/surfaceFeatures.C:869: error: ‘samples’ has a previous declaration as ‘Foam::treeBoundBox samples’
make: *** [Make/darwinIntelDPOpt/surfaceFeatures.o] Error 1

Has someone an idea for a solution?

Greetings Felix
Don456 is offline   Reply With Quote

Old   September 22, 2009, 20:23
Default
  #59
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 already posted a link related to this error :

OpenFoam-1.5 on Solaris -- compilation problem calling octreeDataPoint(.) constructor

Also, I have managed to fix the MacPort gcc-4.3 on snow leopard, see links here :

https://trac.macports.org/ticket/20933
https://trac.macports.org/ticket/20838

OpenFOAM 1.6.x compiles without problems.

PO
podallaire is offline   Reply With Quote

Old   September 24, 2009, 11:14
Default gcc-4.2.1 patch for 1.6.x
  #60
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 11
7islands is on a distinguished road
Hi,

I managed to compile the 1.6.x OS X port with Apple's gcc-4.2.1 by the way I proposed a while back. My two main findings are

1. What's really strange is that with the default Opt setting of -O3 everything compiles, but the solvers always crash immediately after start whereas blockMesh runs fine. After some trial-and-errors it turned out -fno-inline-functions had to be added. The problem was not only on OS X but also on Linux (I also tested with gcc-4.2.4 on Ubuntu 9.04). I may have done something wrong?

2. A result of some simple timings by running the initial 0.0005 [s] of compressibleInterFoam/depthCharge3D case (in 4 processor parallel) on a same machine:
OS X version / Apple's gcc-4.2.1 (Xcode version) / gcc43 from MacPorts
10.5 / 35.6 [s] (3.1.3, build 5574) / --
10.6 / 29.9 [s] (3.2, build 5646) / 30.4 [s]
From the numbers a remarkable performance improvement can be observed by switching from OS X 10.5 to 10.6, while no substantial performance difference is seen between Apple's gcc-4.2.1 and MacPort gcc-4.3.

From the above results I'm mostly decided to throw away the gcc-4.2.1 modifications and stick with MacPort gcc-4.3 However in case one may feel like trying it out I attach the patch.

OpenFOAM-1.6.x-Mac-gcc421.patch
  • Do a fresh clone from the 1.6.x git-repository
  • Apply Bernhard's OS X patch (I used rev. 1391 from openfoam-extend)
  • Apply the attached patch
  • Compilers can be switched by setting WM_COMPILER to Gcc42 or Gcc
  • Like the original OS X patch the patch should also be backward portable to Linux (I did most of the work on Ubuntu 9.04 but didn't test the final version of the patch). The command names of the compilers are assumed to be gcc-4.2/g++-4.2 (modify as necessary).
I'm all ears if your findings are anything different than mine.

Takuya

Last edited by 7islands; September 25, 2009 at 02:47. Reason: fixed incompatibility with Ubuntu (/bin/dash)
7islands 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
OpenFOAM13 for Mac OSX Darwin 104 hjasak OpenFOAM Installation 70 September 24, 2010 05:06
problems with installing OpenFOAM 1.6 su_junwei OpenFOAM Installation 8 September 10, 2009 12:54
Problems Installing OF 1.6 32 bit bucksfan OpenFOAM Installation 19 August 4, 2009 01:36
Mac Simple Install Request or Processing Assistance Help sjohnson OpenFOAM Installation 4 December 12, 2008 08:46
MAC + SOLA for free surface T Main CFD Forum 1 April 11, 2001 13:43


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