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

How to Install OpenFOAM on 64 Ubuntu 9.04

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2009, 13:57
Smile How to Install OpenFOAM on 64 Ubuntu 9.04
  #1
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
This article explains what I did to make OpenFOAM and Paraview work on Ubuntu 9.04.

Background:
I have a quad core 64 bit computer running Ubuntu 9.04. I downloaded OpenFOAM 1.5 about 1.5 months ago. I didn't read the install directions very well, and stumbled into a working system within hours (minutes), including a working paraview / paraFoam. Later, I tried to upgrade to 1.5-dev. I figured the install was so easy that I'd just rebuild everything. I spent the next 3 weeks trying to get a working OpenFOAM and paraview on my system. Had I not seen that it worked before, I would have given up. I'm posting this to hopefully save others an amazing amount of frustration.

Lessons Learned:
Before I get into the 'How to do it', I'd like to list some lessons learned.

1) The binary distribution of ThirdParty (and maybe OpenFOAM1.5) Can't be trusted on 64 bit Ubuntu 9.04. I don't say this lightly. Cmake doesn't work, some libraries don't load, etc. It's very confusing, and it was a hard lesson to accept. I downloaded several times and from several sources. I don't simply have a bad copy.

2) The older versions of QT WILL NOT build working code. Paraview will complain that it can't open one of it's own libraries. I'm sure of this for QT-4.3.1 and I'm pretty sure it's the case for QT-4.3.5. This is ironic since the OpenFOAM readme makes a big point of stating you really need to use those versions.

3) If you mess up on a build, (wrong environement variables, wrong library path, wrong settings, etc.) You are best off wiping the directory clean, and starting with a new copy from your tar files. Rebuilding, especially if you change a library, doesn't seem dependable. (There is probably a way to clean, but I don't know it.)

4) A current version of gcc won't compile OpenFOAM. Apparently some exception handing was changed that makes it incompatible.

5) There is a lot of bad advice in these forums when it comes to Ubuntu and paraview. If someone is having problems on Ubuntu please don't give them the generic answer that they need the older version of QT. That bad advice cost me days of time.

How to:
These instructions are the results of much trial and error. I tried to keep notes, and start with a clean distribution if I went down the wrong path. I did install some libraries that may or may not have been needed. I'll list everything I used and you can decide if you think they are needed or not. My notes are a little sketchy, but hopefully I can list what I did.

1) Install Ubuntu 9.04 and let it update everything it wants to.

2) System Menu -> Administration -> Synaptic Package Manager
Install these packages:
cmake (2.6.2-1ubuntu1)
libpq-dev (8.3.7-1)
libpq5 (8.3.7-1)
mesa-common-dev (7.4-0ubuntu3.1)
qt4-demos (4.5.0-0ubuntu4.1)
qt4-designer (4.5.0-0ubuntu4.1)
qt4-dev-tools-dbg (4.5.0-0ubuntu4.1)
qt4-doc (4.5.0-0ubuntu4.1)
qt4-doc-html (4.5.0-0ubuntu4.1)
qt4-qmake (4.5.0-0ubuntu4.1)
qt4-qtconfig (4.5.0-0ubuntu4.1)
zlib1g-dev (1:1.2.3.3.dfsg-12ubuntu2)
libgmp3-doc (2:4.2.4+dfsg-2ubuntu1)
libmath-bigint-gmp-perl (1.24-1)
bison (1:2.3.dfsg-5)
flex-old (2.5.4a-7build1)
libvtk5 (5.0.4-1.1ubuntu1)
libvtk5-dev (5.0.4-1.1ubuntu1)
openssh-server (1:5.1p1-5ubuntu1)
libqt4-assistant (4.5.0-0ubuntu4.1)
libqt4-dbus (4.5.0-0ubuntu4.1)
libqt4-designer (4.5.0-0ubuntu4.1)
libqt4-dev (4.5.0-0ubuntu4.1)
libqt4-help (4.5.0-0ubuntu4.1)
libqt4-network (4.5.0-0ubuntu4.1)
libqt4-opengl (4.5.0-0ubuntu4.1)
libqt4-opengl-dev (4.5.0-0ubuntu4.1)
libqt4-qt3support (4.5.0-0ubuntu4.1)
libqt4-script (4.5.0-0ubuntu4.1)
libqt4-scripttools (4.5.0-0ubuntu4.1)
libqt4-sql (4.5.0-0ubuntu4.1)
libqt4-sql-mysql (4.5.0-0ubuntu4.1)
libqt4-sql-sqlite (4.5.0-0ubuntu4.1)
libqt4-svg (4.5.0-0ubuntu4.1)
libqt4-test (4.5.0-0ubuntu4.1)
libqt4-webkit (4.5.0-0ubuntu4.1)
libqt4-xml (4.5.0-0ubuntu4.1)
libqt4-xmlpatterns (4.5.0-0ubuntu4.1)
libqtcore4 (4.5.0-0ubuntu4.1)
libqtgui4 (4.5.0-0ubuntu4.1)
libvtk5-qt4 (5.0.4-1.1ubuntu1)
libvtk5-qt4-dev (5.0.4-1.1ubuntu1)
python-dbg (2.6.2-0ubuntu1)
python-dev (2.6.2-0ubuntu1)
python-qt4 (4.4.4-2ubuntu6)
python-qt4-common (4.4.4-2ubuntu6)
python-qt4-dbg (4.4.4-2ubuntu6)
python-qt4-dev (4.4.4-2ubuntu6)
python-sip4 (4.7.9-1ubuntu1)
python-sip4-dbg (4.7.9-1ubuntu1)
python-sip4-dev (4.7.9-1ubuntu1)
python2.6-dbg (2.6.2-0ubuntu1)
python2.6-dev (2.6.2-0ubuntu1)
qt4-demos (4.5.0-0ubuntu4.1)
qt4-designer (4.5.0-0ubuntu4.1)
qt4-dev-tools (4.5.0-0ubuntu4.1)
qt4-doc (4.5.0-0ubuntu4.1)
qt4-qmake (4.5.0-0ubuntu4.1)
qt4-qtconfig (4.5.0-0ubuntu4.1)
git-core (1:1.6.0.4-1ubuntu2)
git-doc (1:1.6.0.4-1ubuntu2)

When it comes to qt, if it had qt4 in the name, I installed it. This list comes from my package manager history. Other packages will also be loaded with the ones you select. I'm sure 70% of this isn't needed, but this is what worked for me.

2) Download the OpenFOAM files: OpenFOAM-1.5.General.gtgz, ThirdParty.General.gtgz, ThirdParty.linux64Gcc.gtgz (yes, the untrustworthy binary distribution.)

3) Download gmp-4.1.3.tar.gz and mpfr-2.4.1.tar.gz. I got these because I was going to build gcc from source, but then had problems and didn't build gcc from scratch. I did install these two packages though, so I don't know if they are really needed or not.

4) Untar gmp-4.1.3
go in the directory
./configure
make
sudo make install

5) Untar mpfr-2.4.1.tar.gz
go in the directory.
./configure
make
sudo make install

6) Untar OpenFOAM-1.5.General.gtgz and ThirdParty.General.gtgz into an OpenFOAM directory somewhere. (Your home/OpenFOAM, /usr/local/OpenFOAM, whatever) *** Don't untar the binary distribution ***

7) Edit OpenFOAM/OpenFOAM-1.5/etc/bashrc and change the foamInstall=/usr/local/$WM_PROJECT to point to your location. If you put it in your home dir you might be okay as is.

8) Edit OpenFOAM/ThirdParty/ParaView3.3-cvs/CMakeLists.txt Comment out line 89 and 94 so it looks like below. (This is removing the check for the recommended version of QT.)

IF(NOT QT4_FOUND)
# MESSAGE(SEND_ERROR "Qt ${QT_MIN_VERSION} or greater not found. Please check the QT_QMAKE_EXECUTABLE variable.")
ELSE(NOT QT4_FOUND)
# don't go greater than supported version
STRING(REGEX MATCH "^4\\.3\\.[0-9]+" qt_version_tmp "${QTVERSION}")
IF (NOT qt_version_tmp)
# MESSAGE(SEND_ERROR "Qt ${QTVERSION} not supported. Please use Qt 4.3 (you may need to clean your

9) untar ONLY THE GCC part of the binary Third Party distribution. (Be in the top OpenFOAM directory)
tar --wildcards -xzvf ThirdParty.linux64Gcc.gtgz 'ThirdParty/gcc*' Hopefully this unpacks only the gcc part of that tarfile. We need to use this version of gcc, which fortunately seems to work.

10) edit ~/.bashrc and add the lines to the end: (change /usr/local to your location)

source /usr/local/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc

export ParaView_INST_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs
export ParaView_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
export PV_PLUGIN_PATH=/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt
export PATH=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/bin:$PATH

11) logout and log back in to get the environment all set up.

12) cd OpenFOAM/OpenFOAM-1.5
./Allwmake &> make.log
[In another window] tail -f make.log so you can watch the messages.
Openfoam should build, but the Allwmake will fail when trying to do parafoam or something else. That's okay as far as I can tell. This takes a few hours.

13) cd (to your home directory or anywhere else you want to put the build log).
buildParaView3.3-cvs &> build.log
[in another window] tail -f build.log
This build also takes a while.

14) cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
./Allwclean
./Allwmake
This only takes a minute.

Hopefully after doing this, you have a working installation. You might have to log out and in one more time. My notes were a little sketchy so if you have problems post here and I'll see if I can help.

Steve

Last edited by hansel; July 3, 2009 at 11:52.
hansel is offline   Reply With Quote

Old   July 1, 2009, 22:12
Default
  #2
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
Okay I upgraded to the 1.5-dev version. It wasn't too painful. I added the binutils-dev package using the package manager and recompiled using pretty much the same procedure as with 1.5.

You will also need to recompile paraview and the reader (Steps 13 and 14) since some file formats have changed slightly.

Last edited by hansel; July 3, 2009 at 11:23.
hansel is offline   Reply With Quote

Old   July 2, 2009, 11:13
Default
  #3
Member
 
Ramesh Yapalparvi
Join Date: Jun 2009
Posts: 53
Rep Power: 17
yapalparvi is on a distinguished road
Hi Steve,

Thanks for a very good description. I followed similar steps in installing the software

after I logged out and logged in. I got the following message

Warning in /home/ramesh/OpenFOAM/OpenFOAM-1.5/etc/settings.sh:
Cannot find /home/ramesh/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux installation.
Please install this compiler version or if you wish to use the system compiler,
change the WM_COMPILER_INST setting to 'System' in this file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
If I change this to System I get errors and also If I try to perform ./foamInstallationtest it will give critical errors saying conflicting compilers. Please let me know. Thanks
Ramesh
yapalparvi is offline   Reply With Quote

Old   July 2, 2009, 11:16
Default
  #4
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
Did you do something like my step 9, where you untar the gcc compiler from the binary ThirdParty tar file?
hansel is offline   Reply With Quote

Old   July 2, 2009, 11:46
Default
  #5
Member
 
Ramesh Yapalparvi
Join Date: Jun 2009
Posts: 53
Rep Power: 17
yapalparvi is on a distinguished road
yes exactly the same
yapalparvi is offline   Reply With Quote

Old   July 2, 2009, 12:42
Default
  #6
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
Did you check to see if gcc is really there? (in /home/ramesh/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux)

Maybe it untarred to the wrong directory? Did it untar at all?

By the way did you install in your home directory?

Steve
hansel is offline   Reply With Quote

Old   July 2, 2009, 12:50
Default
  #7
Member
 
Ramesh Yapalparvi
Join Date: Jun 2009
Posts: 53
Rep Power: 17
yapalparvi is on a distinguished road
I used exactly the same comand as you have mentioned in your article regarding untar of only gcc files.
%%%%%%%%%%%%%%%%%%%%%%%
ramesh@ubuntu:~/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin$ ls
c++ gcc x86_64-unknown-linux-gnu-c++ x86_64-unknown-linux-gnu-gcc-4.3.1
cpp gccbug x86_64-unknown-linux-gnu-g++
g++ gcov x86_64-unknown-linux-gnu-gcc
ramesh@ubuntu:~/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This is a snapshot of my file directory. As you can see I have gcc in it

Yes I have installed in /home/ramesh/OpenFOAM
yapalparvi is offline   Reply With Quote

Old   July 2, 2009, 13:24
Default
  #8
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
This is strange.....
what do you get if you type gcc --version?

On my system instead of ...OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin it's in OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin

Are you using the binary distribution for 64 bit?
hansel is offline   Reply With Quote

Old   July 2, 2009, 13:32
Default
  #9
Member
 
Ramesh Yapalparvi
Join Date: Jun 2009
Posts: 53
Rep Power: 17
yapalparvi is on a distinguished road
HI Steve,

Thanks for answering my queries patiently


I have linux64 to linux

regarding the version If I type gcc -v

I get a message
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ramesh@ubuntu:~/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin$ gcc -v
bash: /home/ramesh/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin/gcc: cannot execute binary file
ramesh@ubuntu:~/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I do not know why
Yes I am using 64 bit version.
yapalparvi is offline   Reply With Quote

Old   July 2, 2009, 14:01
Default
  #10
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
The fact that you have a linux directory and I have a linux64 directory seems to indicate that we aren't using the same ThirdParty.linux64Gcc.gtgz file. I don't understand how that could be.

Not being able to execute the binary file is a problem. :-)

My gcc is 592052 bytes long. Is that the size of yours? If they are from the same tar file, they should be the same length.

Are you on an Ubuntu 9.04 system or something else?
hansel is offline   Reply With Quote

Old   July 2, 2009, 14:14
Default
  #11
Member
 
Ramesh Yapalparvi
Join Date: Jun 2009
Posts: 53
Rep Power: 17
yapalparvi is on a distinguished road
I have linked my linux64 directory to directory linux thats about it since it was giving an error when source the .bashrc file, see also the post written by me earlier.

I have used ThirdParty.linux64Gcc.gtgz file from the openfoam website to untar it


Yes I am using ubuntu 9.04
yapalparvi is offline   Reply With Quote

Old   July 2, 2009, 14:26
Default
  #12
New Member
 
vinay
Join Date: Jun 2009
Posts: 2
Rep Power: 0
vinkar is on a distinguished road
Quote:
Originally Posted by hansel View Post
This article explains what I did to make OpenFOAM and Paraview work on Ubuntu 9.04.

Background:
I have a quad core 64 bit computer running Ubuntu 9.04. I downloaded OpenFOAM 1.5 about 1.5 months ago. I didn't read the install directions very well, and stumbled into a working system within hours (minutes), including a working paraview / paraFoam. Later, I tried to upgrade to 1.5-dev. I figured the install was so easy that I'd just rebuild everything. I spent the next 3 weeks trying to get a working OpenFOAM and paraview on my system. Had I not seen that it worked before, I would have given up. I'm posting this to hopefully save others an amazing amount of frustration.

Lessons Learned:
Before I get into the 'How to do it', I'd like to list some lessons learned.

1) The binary distribution of ThirdParty (and maybe OpenFOAM1.5) Can't be trusted on 64 bit Ubuntu 9.04. I don't say this lightly. Cmake doesn't work, some libraries don't load, etc. It's very confusing, and it was a hard lesson to accept. I downloaded several times and from several sources. I don't simply have a bad copy.

2) The older versions of QT WILL NOT build working code. Paraview will complain that it can't open one of it's own libraries. I'm sure of this for QT-4.3.1 and I'm pretty sure it's the case for QT-4.3.5. This is ironic since the OpenFOAM readme makes a big point of stating you really need to use those versions.

3) If you mess up on a build, (wrong environement variables, wrong library path, wrong settings, etc.) You are best off wiping the directory clean, and starting with a new copy from your tar files. Rebuilding, especially if you change a library, doesn't seem dependable. (There is probably a way to clean, but I don't know it.)

4) A current version of gcc won't compile OpenFOAM. Apparently some exception handing was changed that makes it incompatible.

5) There is a lot of bad advice in these forums when it comes to Ubuntu and paraview. If someone is having problems on Ubuntu please don't give them the generic answer that they need the older version of QT. That bad advice cost me days of time.

How to:
These instructions are the results of much trial and error. I tried to keep notes, and start with a clean distribution if I went down the wrong path. I did install some libraries that may or may not have been needed. I'll list everything I used and you can decide if you think they are needed or not. My notes are a little sketchy, but hopefully I can list what I did.

1) Install Ubuntu 9.04 and let it update everything it wants to.

2) System Menu -> Administration -> Synaptic Package Manager
Install these packages:
cmake (2.6.2-1ubuntu1)
libpq-dev (8.3.7-1)
libpq5 (8.3.7-1)
mesa-common-dev (7.4-0ubuntu3.1)
qt4-demos (4.5.0-0ubuntu4.1)
qt4-designer (4.5.0-0ubuntu4.1)
qt4-dev-tools-dbg (4.5.0-0ubuntu4.1)
qt4-doc (4.5.0-0ubuntu4.1)
qt4-doc-html (4.5.0-0ubuntu4.1)
qt4-qmake (4.5.0-0ubuntu4.1)
qt4-qtconfig (4.5.0-0ubuntu4.1)
zlib1g-dev (1:1.2.3.3.dfsg-12ubuntu2)
libgmp3-doc (2:4.2.4+dfsg-2ubuntu1)
libmath-bigint-gmp-perl (1.24-1)
bison (1:2.3.dfsg-5)
flex-old (2.5.4a-7build1)
libvtk5 (5.0.4-1.1ubuntu1)
libvtk5-dev (5.0.4-1.1ubuntu1)
openssh-server (1:5.1p1-5ubuntu1)
libqt4-assistant (4.5.0-0ubuntu4.1)
libqt4-dbus (4.5.0-0ubuntu4.1)
libqt4-designer (4.5.0-0ubuntu4.1)
libqt4-dev (4.5.0-0ubuntu4.1)
libqt4-help (4.5.0-0ubuntu4.1)
libqt4-network (4.5.0-0ubuntu4.1)
libqt4-opengl (4.5.0-0ubuntu4.1)
libqt4-opengl-dev (4.5.0-0ubuntu4.1)
libqt4-qt3support (4.5.0-0ubuntu4.1)
libqt4-script (4.5.0-0ubuntu4.1)
libqt4-scripttools (4.5.0-0ubuntu4.1)
libqt4-sql (4.5.0-0ubuntu4.1)
libqt4-sql-mysql (4.5.0-0ubuntu4.1)
libqt4-sql-sqlite (4.5.0-0ubuntu4.1)
libqt4-svg (4.5.0-0ubuntu4.1)
libqt4-test (4.5.0-0ubuntu4.1)
libqt4-webkit (4.5.0-0ubuntu4.1)
libqt4-xml (4.5.0-0ubuntu4.1)
libqt4-xmlpatterns (4.5.0-0ubuntu4.1)
libqtcore4 (4.5.0-0ubuntu4.1)
libqtgui4 (4.5.0-0ubuntu4.1)
libvtk5-qt4 (5.0.4-1.1ubuntu1)
libvtk5-qt4-dev (5.0.4-1.1ubuntu1)
python-dbg (2.6.2-0ubuntu1)
python-dev (2.6.2-0ubuntu1)
python-qt4 (4.4.4-2ubuntu6)
python-qt4-common (4.4.4-2ubuntu6)
python-qt4-dbg (4.4.4-2ubuntu6)
python-qt4-dev (4.4.4-2ubuntu6)
python-sip4 (4.7.9-1ubuntu1)
python-sip4-dbg (4.7.9-1ubuntu1)
python-sip4-dev (4.7.9-1ubuntu1)
python2.6-dbg (2.6.2-0ubuntu1)
python2.6-dev (2.6.2-0ubuntu1)
qt4-demos (4.5.0-0ubuntu4.1)
qt4-designer (4.5.0-0ubuntu4.1)
qt4-dev-tools (4.5.0-0ubuntu4.1)
qt4-doc (4.5.0-0ubuntu4.1)
qt4-qmake (4.5.0-0ubuntu4.1)
qt4-qtconfig (4.5.0-0ubuntu4.1)
git-core (1:1.6.0.4-1ubuntu2)
git-doc (1:1.6.0.4-1ubuntu2)

When it comes to qt, if it had qt4 in the name, I installed it. This list comes from my package manager history. Other packages will also be loaded with the ones you select. I'm sure 70% of this isn't needed, but this is what worked for me.

2) Download the OpenFOAM files: OpenFOAM-1.5.General.gtgz, ThirdParty.General.gtgz, ThirdParty.linux64Gcc.gtgz (yes, the untrustworthy binary distribution.)

3) Download gmp-4.1.3.tar.gz and mpfr-2.4.1.tar.gz. I got these because I was going to build gcc from source, but then had problems and didn't. So I don't know if they are really needed or not.

4) Untar gmp-4.1.3
go in the directory
./configure
make
sudo make install

5) Untar mpfr-2.4.1.tar.gz
go in the directory.
./configure
make
sudo make install

6) Untar OpenFOAM-1.5.General.gtgz and ThirdParty.General.gtgz into an OpenFOAM directory somewhere. (Your home/OpenFOAM, /usr/local/OpenFOAM, whatever) *** Don't untar the binary distribution ***

7) Edit OpenFOAM/OpenFOAM-1.5/etc/bashrc and change the foamInstall=/usr/local/$WM_PROJECT to point to your location. If you put it in your home dir you might be okay as is.

8) Edit OpenFOAM/ThirdParty/ParaView3.3-cvs/CMakeLists.txt Comment out line 89 and 94 so it looks like below. (This is removing the check for the recommended version of QT.)

IF(NOT QT4_FOUND)
# MESSAGE(SEND_ERROR "Qt ${QT_MIN_VERSION} or greater not found. Please check the QT_QMAKE_EXECUTABLE variable.")
ELSE(NOT QT4_FOUND)
# don't go greater than supported version
STRING(REGEX MATCH "^4\\.3\\.[0-9]+" qt_version_tmp "${QTVERSION}")
IF (NOT qt_version_tmp)
# MESSAGE(SEND_ERROR "Qt ${QTVERSION} not supported. Please use Qt 4.3 (you may need to clean your

9) untar ONLY THE GCC part of the binary Third Party distribution. (Be in the top OpenFOAM directory)
tar --wildcards -xzvf ThirdParty.linux64Gcc.gtgz 'ThirdParty/gcc*' Hopefully this unpacks only the gcc part of that tarfile. We need to use this version of gcc, which fortunately seems to work.

10) edit ~/.bashrc and add the lines to the end: (change /usr/local to your location)

source /usr/local/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc

export ParaView_INST_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs
export ParaView_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
export PV_PLUGIN_PATH=/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt
export PATH=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/bin:$PATH

11) logout and log back in to get the environment all set up.

12) cd OpenFOAM/OpenFOAM-1.5
./Allwmake &> make.log
[In another window] tail -f make.log so you can watch the messages.
Openfoam should build, but the Allwmake will fail when trying to do parafoam or something else. That's okay as far as I can tell. This takes a few hours.

13) cd (to your home directory or anywhere else you want to put the build log).
buildParaView3.3-cvs &> build.log
[in another window] tail -f build.log
This build also takes a while.

14) cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
./Allwclean
./Allwmake
This only takes a minute.

Hopefully after doing this, you have a working installation. You might have to log out and in one more time. My notes were a little sketchy so if you have problems post here and I'll see if I can help.

Steve
Thanks for the verify useful info. I am trying to install OpenFOAM 1.5 on Ubuntu 9.04 following the instructions in the forum for the past 2 weeks, but no luck. Hopefully this thread should help me. I will give a try. Thanks Steve .
vinkar is offline   Reply With Quote

Old   July 2, 2009, 21:26
Default
  #13
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
Quote:
Originally Posted by yapalparvi View Post
I have linked my linux64 directory to directory linux thats about it since it was giving an error when source the .bashrc file, see also the post written by me earlier.

I have used ThirdParty.linux64Gcc.gtgz file from the openfoam website to untar it


Yes I am using ubuntu 9.04
Yapalparvi and I continued this in email and I'll just document for completeness that if you openfoam seems confused about linux / linux64 you should check to find out if you are on a 32 bit or 64 bit OS and if you have the appropriate binary package. In this case he was trying to load 64 bit software on a 32 bit OS which explains why gcc couldn't execute.
hansel is offline   Reply With Quote

Old   July 3, 2009, 05:27
Default
  #14
Member
 
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17
anger is on a distinguished road
Hello,

just want to add an information which cost me a lot of time to find out:
I'm using OF on a Core2Duo with Jaunty (Kubuntu 9.04) 64 bit and found out that I was unable to run a case which was proven to run previously on another system (which actually was 32 bit, but that's another stroy...).
The key point of this was that I compiled OF with the system compiler; this compiled flawlessly, the simulation ran, but refused to converge (I think because of problems with the pressure solver, but this is pure speculation). It seems to be important that in Jaunty OF should be compiled with the compiler delivered with the ThirdParty package.
Hopefully, this is no redundant information, but I formerly always used the system compiler to compile OF and never ran into problems...

Best,
-Thomas
anger is offline   Reply With Quote

Old   July 3, 2009, 11:23
Default
  #15
New Member
 
Stefan Arsovski
Join Date: Jul 2009
Location: Skopje, Macedonia
Posts: 6
Rep Power: 17
Stefan Arsovski is on a distinguished road
Hi hansel

I'm trying to install OpenFOAM for more than 3 weeks on ubuntu 9.04 amd64 with no luck

So I read Ur thread and I tried to do it again, but I've problems.

1. I installed fresh ubuntu 9.04 amd 64, I update it and I installed everything U said in Synaptic System Manager

2. I download all five files for OpenFOAM

3. Here U said that U didn't install gmp-4.1.3.tar.gz and mpfr-2.4.1.tar.gz. So I also didn't. Coz of that I jumped the next two steps.

6. I made a directory "OpenFOAM" in /home/stefan (stefan is my user name), and I put all five files there. From the terminal I extract them (tar xzf <filename>) and the new directorys were created OpenFOAM-1.5 and ThirdParty.

7. I didn't do this step coz U said "If you put it in your home dir you might be okay as is".

8. I didn't edit the CMakeLists.txt coz it was all the same as U sugest to be.

9. I realy don't understand this step, may I explain it again. (I'm new with linux)

10. I opened the bashrc file and again I was not shure what to do. The last line was:
#
So, I've to copy the text after the "#":
#export ParaView_INST_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs
export ParaView_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
export PV_PLUGIN_PATH=/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt
export PATH=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/bin:$PATH

or to delete the "#", copy the text and then to put "#" at the last line:
export ParaView_INST_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs
export ParaView_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
export PV_PLUGIN_PATH=/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt
export PATH=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/bin:$PATH
#


11. I restart the ubuntu

12. cd OpenFOAM/OpenFOAM-1.5
./Allwmake &> make.log is not working for me, I get nothing. And U said it takes a few hours

I need Ur help, if U have some free time pls help me. If U use skype and U think it will be better there add me "Stefan.Arsovski."

I'm w8 for U
Stefan Arsovski is offline   Reply With Quote

Old   July 3, 2009, 11:24
Smile
  #16
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
Quote:
Originally Posted by anger View Post
Hello,

just want to add an information which cost me a lot of time to find out:
I'm using OF on a Core2Duo with Jaunty (Kubuntu 9.04) 64 bit and found out that I was unable to run a case which was proven to run previously on another system (which actually was 32 bit, but that's another stroy...).
The key point of this was that I compiled OF with the system compiler; this compiled flawlessly, the simulation ran, but refused to converge (I think because of problems with the pressure solver, but this is pure speculation). It seems to be important that in Jaunty OF should be compiled with the compiler delivered with the ThirdParty package.
Hopefully, this is no redundant information, but I formerly always used the system compiler to compile OF and never ran into problems...

Best,
-Thomas
Thanks for making that clearer. I couldn't even get the system compiler to compile the code. It complained about mismatched types in some exception code.
hansel is offline   Reply With Quote

Old   July 3, 2009, 11:43
Default
  #17
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
Quote:
Originally Posted by Stefan Arsovski View Post
Hi hansel

I'm trying to install OpenFOAM for more than 3 weeks on ubuntu 9.04 amd64 with no luck

So I read Ur thread and I tried to do it again, but I've problems.

1. I installed fresh ubuntu 9.04 amd 64, I update it and I installed everything U said in Synaptic System Manager

2. I download all five files for OpenFOAM

3. Here U said that U didn't install gmp-4.1.3.tar.gz and mpfr-2.4.1.tar.gz. So I also didn't. Coz of that I jumped the next two steps.

6. I made a directory "OpenFOAM" in /home/stefan (stefan is my user name), and I put all five files there. From the terminal I extract them (tar xzf <filename>) and the new directorys were created OpenFOAM-1.5 and ThirdParty.

7. I didn't do this step coz U said "If you put it in your home dir you might be okay as is".

8. I didn't edit the CMakeLists.txt coz it was all the same as U sugest to be.

9. I realy don't understand this step, may I explain it again. (I'm new with linux)

10. I opened the bashrc file and again I was not shure what to do. The last line was:
#
So, I've to copy the text after the "#":
#export ParaView_INST_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs
export ParaView_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
export PV_PLUGIN_PATH=/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt
export PATH=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/bin:$PATH

or to delete the "#", copy the text and then to put "#" at the last line:
export ParaView_INST_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs
export ParaView_DIR=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
export PV_PLUGIN_PATH=/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt
export PATH=/usr/local/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/bin:$PATH
#


11. I restart the ubuntu

12. cd OpenFOAM/OpenFOAM-1.5
./Allwmake &> make.log is not working for me, I get nothing. And U said it takes a few hours

I need Ur help, if U have some free time pls help me. If U use skype and U think it will be better there add me "Stefan.Arsovski."

I'm w8 for U
Okay lets answer this a step at a time.....

1) Good

2) I guess you are talking about the 3 Openfoam files and the gmp and mpfr?

3) I installed those files, I'm just not sure if they are really needed. Install gmp and mpfr to be safe.

6) You were only supposed to untar the source tarballs. Most of the binary one will cause trouble.

7) Okay

8) Look closer I added a '#' to the beginning of 2 lines.

9) Most of the binary distribution doesn't seem to work on this Ubuntu. But the gcc compiler does and we need the compiler to build the rest of the system. The tar command I listed only extracts the compiler from that file.

10) change all the /usr/locals to /home/stefan

11) no need to restart just log out and back in.

12) If it didn't take any timethen there was an error, the error is in the make.log file. Type 'more make.log' to see what the error was.


I would suggest erasing what you did (rm -rf /home/stefan/OpenFOAM) and trying again. Take your time and try to do it exactly as I listed. You don't have to reload the OS, so you won't have to do the package manager again.

Good luck!

Steve
hansel is offline   Reply With Quote

Old   July 3, 2009, 12:49
Default
  #18
New Member
 
Stefan Arsovski
Join Date: Jul 2009
Location: Skopje, Macedonia
Posts: 6
Rep Power: 17
Stefan Arsovski is on a distinguished road
Hi Steve, thanks for the fast response

2. I download them from http://www.opencfd.co.uk/openfoam/linux64.html, OpenFOAM-1.5.General.gtgz, OpenFOAM-1.5.linux64GccDPOpt.gtgz, OpenFOAM-1.5.linux64GccSPOpt.gtgz, ThirdParty.General.gtgz & ThirdParty.linux64Gcc.gtgz.

3. Where I can find gmp-4.1.3.tar.gz and mpfr-2.4.1.tar.gz to download them?
Stefan Arsovski is offline   Reply With Quote

Old   July 3, 2009, 16:54
Default
  #19
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
Quote:
Originally Posted by Stefan Arsovski View Post
Hi Steve, thanks for the fast response

2. I download them from http://www.opencfd.co.uk/openfoam/linux64.html, OpenFOAM-1.5.General.gtgz, OpenFOAM-1.5.linux64GccDPOpt.gtgz, OpenFOAM-1.5.linux64GccSPOpt.gtgz, ThirdParty.General.gtgz & ThirdParty.linux64Gcc.gtgz.

3. Where I can find gmp-4.1.3.tar.gz and mpfr-2.4.1.tar.gz to download them?
2) You just want these 3:
OpenFOAM-1.5.General.gtgz
ThirdParty.General.gtgz
ThirdParty.linux64Gcc.gtgz.

3) I don't remember where I got them. (sorry!) I found them with www.google.com. Just search on those file names and I think you'll get a bunch of hits.
hansel is offline   Reply With Quote

Old   July 6, 2009, 05:33
Default Compilation error
  #20
New Member
 
anonymous
Join Date: Jul 2009
Posts: 1
Rep Power: 0
spitz is on a distinguished road
Thanks for a nice guide! I have stumbled into some problems on step 12 (compiling OpenFOAM) though. It compiles the first part, but after some time it gives the following error:

Code:
SOURCE=surfaceCoarsen.C ;  g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3  -DNoRepository -ftemplate-depth-40 -Ibunnylod -I/home/user/OpenFOAM/OpenFOAM-1.5/src/triSurface/lnInclude -IlnInclude -I. -I/home/user/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/surfaceCoarsen.o
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3  -DNoRepository -ftemplate-depth-40 -Ibunnylod -I/home/user/OpenFOAM/OpenFOAM-1.5/src/triSurface/lnInclude -IlnInclude -I. -I/home/user/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude   -fPIC Make/linux64GccDPOpt/progmesh.o Make/linux64GccDPOpt/vector.o Make/linux64GccDPOpt/surfaceCoarsen.o -L/home/user/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt \
         -ltriSurface -lmeshTools -lOpenFOAM -liberty -ldl   -lm -o /home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/surfaceCoarsen
make[2]: Leaving directory `/home/user/OpenFOAM/OpenFOAM-1.5/applications/utilities/surface/surfaceCoarsen'
make[1]: Leaving directory `/home/user/OpenFOAM/OpenFOAM-1.5/applications/utilities/surface'
+ [  = doc ]
Link to the full file: http://www.stanford.edu/~eravnan/I4zoA8lorImnkq/make.log

I have followed the instructions as carefully as I can, and am using a 64 bit ubuntu 9.04 desktop edition. Also I compiled it twice and both times got the same result. On the second try, I did like hansel and installed almost all packages with qt4 in the name.

Some help would be appreciated as I have not much experience with reading the log files.
spitz is offline   Reply With Quote

Reply

Tags
9.04, installing openfoam, ubuntu 9.04

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 1.5.x package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 7 July 30, 2009 03:14
qt4.3.4 with ubuntu 9.04 "jaunty jackalope"? sven OpenFOAM 4 May 30, 2009 18:22
OpenFOAM Install problem masb OpenFOAM 3 May 25, 2009 11:32
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25


All times are GMT -4. The time now is 20:21.