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 |
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 |
Quote:
- 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. |
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::printSourceFileAndLine(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 |
Quote:
Can anyone here confirm a successful compilation with the Apple-compiler? Quote:
http://www.cfd-online.com/Forums/ope...l-private.html (which would indicate that 1.6 doesn't compile too well with a 4.2 compiler Quote:
The question for $FOAM_SRC is obsolete as the problem seems to occur no longer Quote:
Bernhard |
compiler issue
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 |
@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. |
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 : http://www.cfd-online.com/Forums/ope...nstructor.html 4) Still working on qt/paraview cocoa 64 bit, will let you know when I get a working version PO |
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 |
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! |
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 |
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 |
try gcc 4.4 with Fink under Mac OS X 10.6
|
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... |
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 |
Quote:
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 |
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 |
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::pointField&, const Foam::scalarField&) const’: triSurface/surfaceFeatures/surfaceFeatures.C:769: error: conflicting declaration ‘Foam::octreeDataPoint 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::pointField&, const Foam::scalarField&, const Foam::scalarField&, Foam::scalar) const’: triSurface/surfaceFeatures/surfaceFeatures.C:870: error: conflicting declaration ‘Foam::octreeDataPoint 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 |
I already posted a link related to this error :
http://www.cfd-online.com/Forums/ope...nstructor.html 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 |
gcc-4.2.1 patch for 1.6.x
1 Attachment(s)
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 MacPortsFrom 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. Attachment 1134
Takuya |
Cool ! I tried it and worked / did not run anything yet but will do soon.
Best regards, PO |
hi, i've got that thing after trying to patch third party
macbook-pro-15:ThirdParty-1.6 resolc$ patch -p1 <ThirdParty-1.6.-Mac.patch.v1 The next patch would create the file .gitignore, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file .gitignore.rej can't find file to patch at input line 18 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h b/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h |index 9d0c85c..0cce518 100644 |--- a/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h |+++ b/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h -------------------------- File to patch: so, whats wrong or what to patch? |
Quote:
Bernhard |
nahhh.. it should show patching process when patching.. and this is the first and only message..
|
Quote:
Bernhard |
Hi,
Is there a fix for libhoard not compiling on Mac OS X 10.6.1 64-bit ? Elvis Dowson |
I don't think so / you don't need this library to run OpenFOAM, should
not be a problem PO |
I'm getting the following compilation errors, with OpenFoam-1.6, Mac OS X 10.6.1, with MacPorts gcc-mp-4.3, and Bernhard's from his repository.
Seems to me like some basic c++ include files not working. Any suggestions on what I can do to get it to compile? Making dependency list for source file library_error_exit.c SOURCE=arch.c ; gcc-mp-4.3 -m64 -DdarwinIntel64 -DWM_DP -Wall -O3 -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DSCOTCH_RENAME -I../../include -DSCOTCH_VERSION=\""5.1"\" -IlnInclude -I. -I/Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64DPOpt/arch.o In file included from /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:49, from /usr/include/memory.h:36, from common.h:65, from arch.c:75: /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/char.H:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Foam' In file included from /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:50, from /usr/include/memory.h:36, from common.h:65, from arch.c:75: /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/Hasher.H:48:19: error: cstddef: No such file or directory In file included from /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:50, from /usr/include/memory.h:36, from common.h:65, from arch.c:75: /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/Hasher.H:52: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Foam' In file included from /usr/include/memory.h:36, from common.h:65, from arch.c:75: /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:52:18: error: string: No such file or directory /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:53:19: error: cstring: No such file or directory /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:54:19: error: cstdlib: No such file or directory In file included from /usr/include/memory.h:36, from common.h:65, from arch.c:75: /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Foam' In file included from /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:225, from /usr/include/memory.h:36, from common.h:65, from arch.c:75: /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:27:20: error: iostream: No such file or directory In file included from /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/string.h:225, from /usr/include/memory.h:36, from common.h:65, from arch.c:75: /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:56: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:78: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:112: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:135: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:172: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:183: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:193: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token /Users/elvis/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/stringI.H:199: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token |
Quote:
- a simple "Hello world" compiles with that compiler? - your OF-installation is on a case-sensitve volume (because in my opinion the string.h should read string.H - it is my suspicion that because of the case-insensitvity the string.H of OF shadows the /usr/include/string.h) Bernhard |
Oh, I wasn't aware of the fact that I had to do all the compilation on a case-insensitive volume. I am using my OS X 10.6.1 home directory, which is case-sensitive.
Could you give me some quick commands on how to create a case-insensitive volume, and to do the compilation from within that volume? Best regards, Elvis |
Quote:
Test in the terminal touch foo touch Foo ls If ls shows you BOTH files the volume is Case-Sensitive, otherwise it is Case-Insensitive. You need a case-sensitve volume for OF. Either a separate partition (that's better) or a disk-image. Under no circumstances try to convert your system-disc to case-sensitive (unless you want to completely reinstall your machine) Bernhard |
Quote:
Could you please give me an example on how to create a disk-image and mount it so that I can do all the compilation in it. Best regards, Elvis |
Quote:
For performance reasons I'd recommend a real partition. I think repartitioning the System-Disc with the Disc-Utility can be done, but you're on your own here .... |
Hi Elvis
This is a part of the message I wrote a few weeks ago: #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 hope it helps Aurelia |
Thanks for the replies, Aurelia and Bernhard! :-)
I opted for a physical disk partition, for performance reasons. Now, if I were to work with the OpenFOAM-1.6.x git repository, should I patch the sources manually. If so, do I use Bernhard's patches as a starting point? I tried patching the git repository once before using Bernhard's patches and it failed. I also notice that in wiki for OpenFOAM-1.4 http://openfoamwiki.net/index.php/Ho...e_OpenFOAM_Mac there is a mention to a set of Darwin rules : Untar Media:DarwinWmakeRules.1.4.v1.tgz to get compilation rules for darwin Is that necessary? Best regards, Elvis |
Hi,
Is there a git repository for ThirdParty-1.6, just like OpenFOAM-1.6.x ? How about creating a new branch called macosx-10.6.1 to do the development for Mac OS X 10.6.1 support? Best regards, Elvis |
Right now, I've managed to apply Bernhard's Mac OS X patches, to a cloned local branch of the OpenFOAM-1.6.x repository, and called that branch macosx-10.6.1. So, in case this compilation works, I can push the changes to the master repository, so that development can take place for adding Mac OS X support for OpenFOAM.
Best regards, Elvis |
When attempting to compile OpenFOAM-1.6.x with the patches applied, I get the following errors:
config.status: executing libtool commands ++ make cd . && /bin/sh /Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/openmpi-1.3.3/config/missing --run aclocal-1.10 -I config sh: config/ompi_get_version.sh: No such file or directory Is this significant? |
Compilation is proceeding, but I get a couple of errors like the ones below:
could not open file fvm.H for source file laplaceFilter/laplaceFilter.C could not open file fvc.H for source file laplaceFilter/laplaceFilter.C I haven't compiled anything in the ThirdParty-1.6.x-patches folder (I'm using OpenFOAM-1.6.x-patches as the starting point, since I'm working on a local git repository, to generate some patches, if the need arises). So, should I compile ThirdParty-1.6.x-patches, and then launch ./Allwmake from the OpenFOAM-1.6.x-patches folder? Best regards, Elvis |
Hi,
I think it compiled fine now. I just ran the test tutorial and didn't get any errors. Best regards, Elvis Technote OpenFOAM-1.6-001: How to install OpenFOAM-1.6 on Mac OS X 10.6.1 Overview This document describes how to install OpenFOAM-1.6 on Mac OS X 10.6.1 (Snow Leopard). Procedure Step 01.00: Download MacPorts-1.8.0 Download MacPorts from the MacPorts download directory: http://distfiles.macports.org/MacPorts/ Run the package installer, to install the MacPorts infrastructure software to /opt/local/bin Update the MacPorts installation by running the following command $ sudo port selfupdate Step 01.01: Install MacPorts gcc43 $ sudo port install gcc43 Step 02.00: Clone the official qt git source code repository git clone git://gitorious.org/qt/qt.git Step 02.01: Checkout the qt-4.5 branch cd qt git checkout 4.5 Step 02.02: Clone the git branch git clone . ../qt-4.5 Step 02.03: Configure qt-4.5 ./configure -platform macx-g++ -cocoa -arch x86_64 -nomake examples -nomake demos -framework -sdk /Developer/SDKs/MacOSX10.6.sdk/ -prefix /Developer/Applications/Qt-4.5 Step 02.04: Build qt-4.5 make -j 4 Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into /Developer/Applications/Qt-4.5 To reconfigure, run 'make confclean' and 'configure'. Step 02.05: Build qt-4.5 documentation make docs Step 02.06: Install qt-4.5 sudo make install Step 02.07: Update the PATH environment variable to the qt installation’s binary folder vi ~/.profile # Qt-4.5 export PATH=/Developer/Applications/Qt-4.5/bin:$PATH Step 03.00: Install CMake from the cvs repository cvs -d :pserver:anonymous@www.cmake.org:/cvsroot/CMake login (respond with password cmake) Follow this command by checking out the source code: cvs -d :pserver:anonymous@www.cmake.org:/cvsroot/CMake co CMake Bootstrap, build and install CMake $ ./bootstrap $ make $ sudo make install Step 04.00: Install Paraview from the cvs repository. mkdir $HOME/Tool/ParaView cd $HOME/Tool/ParaView cvs -d :pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 login (respond with empty password) Follow this command by checking out the source code: cvs -d :pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 co ParaView3 For checking out the data, use the following: cvs -d :pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 co ParaViewData Configure ParaView using CMake mkdir $HOME/Tool/ParaView/ParaView3-bin cd $HOME/Tool/ParaView/ParaView3-bin ccmake $HOME/Tool/ParaView/ParaView3 Press c to configure and select the following options BUILD_SHARED_LIBS = ON PARAVIEW_USE_MPI = ON PARAVIEW_ENABLE_PYTHON = ON Build ParaView make -j 4 Step 05.00: Install OpenFOAM from tar sources tar xzf OpenFOAM-1.6.General.gtgz tar xzf ThirdParty-1.6.General.gtgz cd OpenFOAM-1.6 patch -p1 < ../OpenFOAM-1.6-Mac.patch cd .. cd ThirdParty-1.6 patch -p1 < ../ThirdParty-1.6.-Mac.patch cd .. . /Users/elvis/OpenFOAM/OpenFOAM-1.6/etc/bashrc cd $WM_PROJECT_DIR ./Allwmake OR Step 05.01: Install OpenFOAM from the git repository. cd ~/OpenFOAM git clone git://repo.or.cz/OpenFOAM-1.6.x.git tar -zxf ThirdParty-1.6.General.gtgz ln -s ThirdParty-1.6 ThirdParty-1.6.x cd ThirdParty-1.6.x Step 06.00: Test the OpenFOAM installation. To test whether your installation is ready, run one of the several tutorial-cases, i.e. the "lid driven cavity" case as follows (see also "Getting Started" of the README included in the OpenFOAM distribution): mkdir -p /Users/elvis/Tool/OpenFOAM/run cp -r $WM_PROJECT_DIR/tutorials run cd run/tutorials/incompressible/icoFoam/ blockMesh -case cavity icoFoam -case cavity If these commands fail, you either put the files in the wrong place or didn't source the rc-file. Re-check that everything is where it should be and that you sourced the rc-file as documented in the installation instructions. |
All times are GMT -4. The time now is 14:13. |