|
[Sponsors] |
October 14, 2011, 06:10 |
OpenFOAM-2.0.x on Ubuntu 11.10
|
#1 |
New Member
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 16 |
Dear Foamers,
has anyone managed to fully install OF on the new Ubuntu release yet? I have managed to install the first part with no problems, but when i get to makeParaView, compilation aborts without much information: [ 3%] Built target vtklibxml2 make: *** [all] Error 2 Command exited with non-zero status 2 My guess is that QT that comes with Ubuntu 11.10 is too new (4.7.4) and that i might need an older version (probably 4.6.3 since this is what i usually use). Can anyone confirm this theory? |
|
October 14, 2011, 10:03 |
|
#2 |
New Member
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 16 |
[Solved]
This is an issue with gcc-4.6.1. It can be solved by editing the file ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx and including the line: #include <stddef.h> Afterwards paraview will compile without any problems. |
|
October 16, 2011, 17:27 |
|
#3 |
New Member
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17 |
I too have had difficulties compiling OpenFoam 2.0.x on Kubuntu 11.10. A piece of my compilation below illustrates the problems:
make[2]: Leaving directory `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/applications/solvers/multiphase/twoPhaseEulerFoam' make[1]: Target `application' not remade because of errors. make[1]: Leaving directory `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/applications/solvers/multiphase' make: *** [multiphase] Error 2 make[1]: Entering directory `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/applications/solvers/stressAnalysis' make[2]: Entering directory `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/applications/solvers/stressAnalysis/solidDisplacementFoam' make[2]: `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/solidDisplacementFoam' is up to date. make[2]: Leaving directory `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/applications/solvers/stressAnalysis/solidDisplacementFoam' make[2]: Entering directory `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam' make[2]: `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/solidEquilibriumDisplacementFoam' is up to date. make[2]: Leaving directory `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam' make[1]: Leaving directory `/home/kevin/OpenFOAM/OpenFOAM-2.0.x/applications/solvers/stressAnalysis' make: Target `application' not remade because of errors. As a result, when I go to run the damBreak4Phase tutorial, I see that the "alphaContactAngle" boundary was not compiled and doesn't show up a valid boundary type. Does any one think that changing to an older compiler would help (current compiler with Kubuntu 11.10 is gcc 4.6.1)? Open to any other ideas. |
|
October 16, 2011, 17:39 |
|
#4 |
New Member
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 16 |
did you install the required dependencies for ununtu before compiling?
Code:
sudo apt-get install build-essential flex cmake zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libxt-dev |
|
October 16, 2011, 17:57 |
|
#5 |
New Member
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17 |
Yes I did. I just checked by executing your suggested code and nothing was upgraded as it was already the newest version.
For background, when I was running Kubutu 11.04 with OpenFoam 2.0.x. After updating Kubuntu to 11.10, OpenFoam seemed to be still running OK. Then I did a git pull to update 2.0.x and that's when my problems arose. I then did a fresh install of 2.0.x with the same error messages and issues. |
|
October 17, 2011, 05:12 |
|
#6 |
New Member
Giulio
Join Date: Oct 2011
Posts: 28
Rep Power: 15 |
Hi i've similar problems. I'm following the link below : http://www.openfoam.com/download/ubuntu.php and i substituted oncelot for the version 11.10.
When i type in step 2 sudo apt-get update the terminal answers W: Impossibile recuperare http://www.openfoam.com/download/ubu...-i386/Packages 404 Not Found E: Impossibile scaricare alcuni file di indice: saranno ignorati o verranno usati quelli vecchi. In English: W: Unable to retrieve http://www.openfoam.com/download/ubu...-i386/Packages 404 Not Found E:Can not download some index files will be ignored, or old ones used. What's wrong?Who can help me out? Thank you P.S. Is the first time i use Ubuntu so i'm completly ignorant on |
|
October 17, 2011, 17:11 |
|
#7 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi Giulio
The conversation here is too advanced. It is about compiling the OpenFOAM code from scratch (this is also refereed to as install or sometimes the "real install"). For your case, I think OF is not yet available for Ubuntu 11.10 .... it is just 3 days old ... The guess is that they are currently porting it for this version. What you need to do is to keep checking the install webpage for any news on 11.10. Regards, Hisham |
|
October 19, 2011, 11:12 |
|
#8 | |
Member
Diego Angeli
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
Quote:
I'll let you know D. |
||
October 20, 2011, 10:26 |
|
#9 |
New Member
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 16 |
Hello,
I've got the same problem. Did you manage to compile OpenFoam-2.0.X using gcc4.5? If it worked can you tell me which commands you've used? Regards, Jochem |
|
October 20, 2011, 13:47 |
|
#10 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
I'm on the case. It looks like it's a bunch of linker errors - I can make them go away 1 by 1 by adding -lmissingLibrary to the options files... but I'm not sure if I'm wasting my time... I mean, this can fix it, but is this merely a work-around for a compiler error that is going to be fixed soon anyway?
Insights?
__________________
~~~ Follow me on twitter @DavidGaden |
|
October 20, 2011, 16:29 |
|
#11 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
Well, I finished anyway. To get it working on my machine, I had to change one line in 16 different files. I've attached the details as a text file.
I've sent the details of the fix to the guys at OpenFOAM. Note: I'm not saying this is the proper fix - this is how it worked on my machine. Maybe it will help you guys.
__________________
~~~ Follow me on twitter @DavidGaden |
|
October 21, 2011, 11:52 |
|
#12 |
Member
Diego Angeli
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
Thanks David, kudos to you: the bugfix works perfectly!! You saved me additional days of struggle.
So it was not the compiler, though wrong linking options... I must admit that it left me quite puzzled however: some of the missing links referred to well-established solvers like interFoam whose building options should be assessed. |
|
October 21, 2011, 12:11 |
|
#13 |
New Member
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17 |
David,
You bug fix worked me - well at least almost. I am still unable to run the multiphaseInterFoam demo receiving an error about the "interfaceCompression" apparently not compiling. But all the others seem to compile now. Could you check to see if when you run the tutorial case for the damBreak4phase you get the same error as below? Perhaps it got missed on your bug list. --> FOAM FATAL IO ERROR: Unknown discretisation scheme interfaceCompression |
|
October 21, 2011, 12:14 |
|
#14 | |
New Member
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 16 |
Quote:
http://www.openfoam.com/mantisbt/view.php?id=316 Last edited by kpsl; October 24, 2011 at 15:05. |
||
October 21, 2011, 12:28 |
|
#15 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
edit: this is in response to Kevin's problem above.
Funny - I was just noticing this myself, and was working on it. The problem is: with the "bugfix", interfaceProperties and twoPhaseInterfaceProperties libraries link to eachother. The only reason it worked for me (and maybe for Diego too) is we had a previously failed install with those libraries already in existence. I believe the fix is this: undo the changes I told you to make to src/transportModels/twoPhaseInterfaceProperties/Make/options That is, change the last few lines of the file from this: Code:
LIB_LIBS = \ -linterfaceProperties \ -lfiniteVolume Code:
LIB_LIBS = -lfiniteVolume
__________________
~~~ Follow me on twitter @DavidGaden Last edited by marupio; October 21, 2011 at 12:30. Reason: clarified who I'm answering |
|
October 21, 2011, 18:37 |
|
#16 |
New Member
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 16 |
EDIT: Looks like this doesn't help either. At least not for me...
Here is a workaround for those who don't mind downgrading to gcc-4.5 Note this is for 64bit and will install gcc-4.5 while leaving gcc-4.6 untouched. You can choose which version is the dominant one. I have not fully tested this yet but it should take care of the problem as well. Install gcc 4.5 Code:
sudo apt-get install gcc-4.5 g++-4.5 Code:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.5 30 sudo update-alternatives --config gcc set default g++ Code:
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 40 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.5 30 sudo update-alternatives --config g++ set default x86_64-linux-gnu-gcc Code:
sudo update-alternatives --install /usr/bin/x86_64-linux-gnu-gcc x86_64-linux-gnu-gcc /usr/bin/x86_64-linux-gnu-gcc-4.6 40 sudo update-alternatives --install /usr/bin/x86_64-linux-gnu-gcc x86_64-linux-gnu-gcc /usr/bin/x86_64-linux-gnu-gcc-4.5 30 sudo update-alternatives --config x86_64-linux-gnu-gcc set default x86_64-linux-gnu-g++ Code:
sudo update-alternatives --install /usr/bin/x86_64-linux-gnu-g++ x86_64-linux-gnu-g++ /usr/bin/x86_64-linux-gnu-g++-4.6 40 sudo update-alternatives --install /usr/bin/x86_64-linux-gnu-g++ x86_64-linux-gnu-g++ /usr/bin/x86_64-linux-gnu-g++-4.5 30 sudo update-alternatives --config x86_64-linux-gnu-g++ You can revert back to gcc-4.6 by running the last line in each code section and choosing option 0 instead of 1. Last edited by kpsl; October 22, 2011 at 05:35. |
|
October 22, 2011, 07:29 |
Changes as a patch
|
#17 |
Senior Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 123
Rep Power: 18 |
Hi all and thank you David for the fix!
I took the liberty of applying the changes as a git patch. It's based on this commit 93ce41240e5c2b04690f15152e52f48e03d4df39 The patch can be applied by Code:
cd $WM_PROJECT_DIR git checkout -b davidsFix git apply --check fixOF.patch Code:
git am --signoff < fixOF.patch Here's a good guide on git and patches: http://ariejan.net/2009/10/26/how-to...atch-with-git/ Best Regards Nicolas Last edited by nsf; October 22, 2011 at 07:32. Reason: should be "--signoff" |
|
October 23, 2011, 17:07 |
|
#18 |
New Member
Gustavo
Join Date: Feb 2010
Location: Curitiba - PR - Brasil
Posts: 16
Rep Power: 16 |
Hi David,
I've used your bugfix and I've compiled OF but not all the combustion tutorials seem to work. Do you happen to have any other ideas on how to solve it? Best regards, Gustavo. |
|
October 24, 2011, 14:45 |
|
#19 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
What error are you getting? Is it a SIGFPE, with a stack dump?
__________________
~~~ Follow me on twitter @DavidGaden |
|
October 24, 2011, 14:56 |
|
#20 |
Senior Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 123
Rep Power: 18 |
Hello David,
I also still have some problems. After applying your changes the compilation runs fine. There are no "undefined references" but it seems that applications now can't find certain libraries. For instance if you try $FOAM_TUTORIALS/incompressible/pisoFoam/les/pitzDaily it will say Code:
--> FOAM FATAL ERROR: Unknown turbulenceModel type LESModel Valid turbulenceModel types: 1 ( laminar ) I'm currently recompiling everything to see if the issue persists. I'll let you know. /Nicolas |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM vs Ubuntu 10.10 64 bit | vkrastev | OpenFOAM Installation | 12 | April 23, 2011 11:14 |
Installing OpenFOAM 1.6 on Ubuntu 10.4 | sda | OpenFOAM Installation | 5 | May 27, 2010 21:19 |
How to Install OpenFOAM on 64 Ubuntu 9.04 | hansel | OpenFOAM Installation | 62 | March 19, 2010 15:43 |
OpenFOAM on non-English Ubuntu distribution | fabian_roesler | OpenFOAM | 3 | January 11, 2010 08:16 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |