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

OpenFOAM-2.0.x on Ubuntu 11.10

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2011, 06:10
Default OpenFOAM-2.0.x on Ubuntu 11.10
  #1
New Member
 
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 15
kpsl is on a distinguished road
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?
kpsl is offline   Reply With Quote

Old   October 14, 2011, 10:03
Default
  #2
New Member
 
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 15
kpsl is on a distinguished road
[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.
nsf likes this.
kpsl is offline   Reply With Quote

Old   October 16, 2011, 17:27
Default
  #3
New Member
 
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17
kflora is on a distinguished road
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.
kflora is offline   Reply With Quote

Old   October 16, 2011, 17:39
Default
  #4
New Member
 
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 15
kpsl is on a distinguished road
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
kpsl is offline   Reply With Quote

Old   October 16, 2011, 17:57
Default
  #5
New Member
 
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17
kflora is on a distinguished road
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.
kflora is offline   Reply With Quote

Old   October 17, 2011, 05:12
Default
  #6
New Member
 
Giulio
Join Date: Oct 2011
Posts: 28
Rep Power: 15
giulio.topazio is on a distinguished road
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
giulio.topazio is offline   Reply With Quote

Old   October 17, 2011, 17:11
Default
  #7
Senior Member
 
Hisham's Avatar
 
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17
Hisham is on a distinguished road
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
Hisham is offline   Reply With Quote

Old   October 19, 2011, 11:12
Default
  #8
Member
 
Diego Angeli
Join Date: Mar 2009
Posts: 31
Rep Power: 17
diego_angeli is on a distinguished road
Quote:
Originally Posted by kflora View Post
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.
Hi, I've got similar problems in compiling OF2.0.x on Ubuntu Oneiric amd64 and I think you're right. I installed the gcc4.5 pack and I'm trying now to force OF to compile with it.

I'll let you know

D.
diego_angeli is offline   Reply With Quote

Old   October 20, 2011, 10:26
Default
  #9
New Member
 
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 16
Jochem is on a distinguished road
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
Jochem is offline   Reply With Quote

Old   October 20, 2011, 13:47
Default
  #10
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
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
marupio is offline   Reply With Quote

Old   October 20, 2011, 16:29
Default
  #11
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
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.
Attached Files
File Type: txt Bugfix.txt (6.9 KB, 213 views)
diego_angeli, JinBiao, nsf and 1 others like this.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   October 21, 2011, 11:52
Default
  #12
Member
 
Diego Angeli
Join Date: Mar 2009
Posts: 31
Rep Power: 17
diego_angeli is on a distinguished road
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.
diego_angeli is offline   Reply With Quote

Old   October 21, 2011, 12:11
Default
  #13
New Member
 
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17
kflora is on a distinguished road
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
kflora is offline   Reply With Quote

Old   October 21, 2011, 12:14
Default
  #14
New Member
 
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 15
kpsl is on a distinguished road
Quote:
Originally Posted by kflora View Post
David,
--> FOAM FATAL IO ERROR:
Unknown discretisation scheme interfaceCompression
Sounds similar to a problem I've been having.

http://www.openfoam.com/mantisbt/view.php?id=316

Last edited by kpsl; October 24, 2011 at 15:05.
kpsl is offline   Reply With Quote

Old   October 21, 2011, 12:28
Default
  #15
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
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
to this:

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
marupio is offline   Reply With Quote

Old   October 21, 2011, 18:37
Default
  #16
New Member
 
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 15
kpsl is on a distinguished road
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
set default gcc
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
Choose option 1

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++
Choose option 1

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
Choose option 1

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++
Yup, choose option 1.

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.
kpsl is offline   Reply With Quote

Old   October 22, 2011, 07:29
Default Changes as a patch
  #17
nsf
Senior Member
 
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 123
Rep Power: 18
nsf is on a distinguished road
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
If there's no errors of last command do

Code:
git am --signoff < fixOF.patch
When the OpenFoam foundation has a fix you can checkout the master branch, pull their changes and delete the branch "davidsFix".

Here's a good guide on git and patches:
http://ariejan.net/2009/10/26/how-to...atch-with-git/

Best Regards

Nicolas
Attached Files
File Type: patch fixOF.patch (11.0 KB, 38 views)
abcdef123 likes this.

Last edited by nsf; October 22, 2011 at 07:32. Reason: should be "--signoff"
nsf is offline   Reply With Quote

Old   October 23, 2011, 17:07
Default
  #18
New Member
 
Gustavo
Join Date: Feb 2010
Location: Curitiba - PR - Brasil
Posts: 16
Rep Power: 16
ghindi is on a distinguished road
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.
ghindi is offline   Reply With Quote

Old   October 24, 2011, 14:45
Default
  #19
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
What error are you getting? Is it a SIGFPE, with a stack dump?
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   October 24, 2011, 14:56
Default
  #20
nsf
Senior Member
 
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 123
Rep Power: 18
nsf is on a distinguished road
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
)
So it would seem pisoFoam can't what ever library that contain the turbulence model. Nor can I decompose with scotch even though it compiled just fine.

I'm currently recompiling everything to see if the issue persists. I'll let you know.

/Nicolas
nsf is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
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


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