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

OpenFOAM 1.6.x - CentOS 5.3 x86_64

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 23, 2009, 11:02
Default OpenFOAM 1.6.x - CentOS 5.3 x86_64
  #1
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hello Foamers

Here is a prepackaged/precompiled version of OpenFOAM-1.6.x and the ThirdParty-1.6.x sources. Some extra mesh related programs have been put in the ThirdParty package.

All built from source, no prepackaged binaries, so optimal speed for CentOS.

This time I have retained the sources in the ThirdParty folder since it is needed for recompilation of the OpenFOAM source. When you have it all installed you should be able to go into the install dir and do:
git pull
./Allwmake
Now you should be updated with all the bugfixes etc.

---------------- Included ----------------

- OpenFOAM 1.6.x (flex, mpfr and gmp built from source)

- Paraview 3.6.1, Mpi support, ffmpeg support (export to avi), and parallezied support for decomposed cases.

- gmsh-2.3.1

- engrid-1.0.1

- meshlab-1.2.1

---------------- Install Instructions for the whole package ----------------

0. Next steps are all done as root

1. First you need to install the gcc and c++ compiler, bison and ncurses-devel (thx wersoe) which is shipped with CentOS 5.3, needed to compile/recompile OpenFOAM solvers/libraries, or your own solvers.
yum install gcc gcc-c++ bison ncurses-devel
2. Create a folder for OpenFOAM, the default in the bashrc is /usr/loal/OpenFOAM
mkdir /usr/local/OpenFOAM
3. unpack the content of OpenFOAM-1.6.x_CentOS-5.3_x86-64.tar.gz and ThirdParty-1.6.x_CentOS-5.3_x86-64.tar.gz, from sourceforge, to the folder
cd /usr/loal/OpenFOAM
tar -xvf /pathtothedownload/OpenFOAM-1.6.x_CentOS-5.3_x86-64.tar.gz
tar -xvf /pathtothedownload/ThirdParty-1.6.x_CentOS-5.3_x86-64.tar.gz

4. Fix any possibly wrong permissions
chmod -R 755 /usr/local/OpenFOAM
5. Next part is done as non-root (user)

6. Put this line in your .bashrc file.
. /usr/local/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc
7. Restart console or source the bashrc.
. ~/.bashrc
there is a space between the dot and the tilde

8. Check that it works by doing
which gcc
this should output the following
/usr/local/OpenFOAM/ThirdParty-1.6.x/gcc-4.3.3/platforms/linux64/bin/gcc

------------------Install done-------------------

The Qt-4.5.2.tar.gz and vtk-5.4.2.tar.gz, in the non-essential folder at sourceforge, are extras. Only needed if you consider recompiling paraview, or some other app which depends on Qt/vtk.

It is possible to install to another location other than /usr/local, all you have to do is to modify you own .bashrc file, the bashrc in OpenFOAM (/usr/local/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc) to point to the new location of the install, like in the regular OpenFOAM README.

---------------- Disclaimer ----------------
The package has been verified on a fresh minimal gnome install of CentOS 5.3 64bit (and a recompilation was done)

The package is "as is" and can only be guaranteed to work with a 64bit version of CentOS/RedHat/Scientific 5.3 (yum update is fine). Or if in a cluster environment Rocks 5.2 (based on CentOS 5.3).

If other distributions are used, I can't help you.

---------------- Download ----------------

I have made a sourceforge project for this which can be found at

https://sourceforge.net/projects/centfoam/

You can build your own OpenFOAM by only downloading the ThirdParty package and then doing:
git clone git://repo.or.cz/OpenFOAM-1.6.x.git
In the OpenFOAM-1.6.x/etc folder edit the bashrc file to contain the following at the end:
export PATH=$WM_THIRD_PARTY_DIR/gmsh-2.3.1/bin:$PATH
export PATH=$WM_THIRD_PARTY_DIR/meshlab-1.2.1:$PATH
export PATH=$WM_THIRD_PARTY_DIR/engrid-1.0.1:$PATH
export PATH=$WM_THIRD_PARTY_DIR/libraries/bin:$PATH

export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/paraview-3.6.1/platforms/linux64Gcc/bin:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/libraries/lib:$LD_LIBRARY_PATH

after that do this
cd OpenFOAM-1.6.x
./Allwmake

And you should have your own compiled version (don't know why you would do that since I've compiled it already, but you have the possibility )


---------------- BUGS ----------------

1 .User wesoe reported an issue where the geometry is not shown, Takuya proposed putting the following into your .bashrc or run the command before paraFoam is run.
export LC_ALL=C
This is apparently a locale issue when using Qt-4.5 to build paraview.

2. An error related to paraview, if its not installed in /usr/local/OpenFOAM and fails to start because is states a library is missing, do this as root.
mkdir $WM_THIRD_PARTY_DIR/paraview-3.6.1/platforms/linux64Gcc/lib

ln -s $WM_THIRD_PARTY_DIR/paraview-3.6.1/platforms/linux64Gcc/bin $WM_THIRD_PARTY_DIR/paraview-3.6.1/platforms/linux64Gcc/lib/paraview-3.6

Last edited by linnemann; September 21, 2009 at 06:04.
linnemann is offline   Reply With Quote

Old   September 7, 2009, 05:29
Default
  #2
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Hi all,

I have OpenFOAM-1.6 installed on my computer. And I'm using Centos-5.3. Now if I want to update to OpenFOAM-1.6.x what are the exact steps that I should do to update succesfully? I have git installed.

Thank you!

Regards,

Petri Sulasalmi
PetSul is offline   Reply With Quote

Old   September 7, 2009, 06:30
Default
  #3
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Download the 1.6.x version from the sourceforge webpage and read what I posted above.

Regards
Linnemann
linnemann is offline   Reply With Quote

Old   September 7, 2009, 07:13
Default
  #4
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
I try to run Allwmake in OpenFOAM-1.6.x directory and it gives me the following message

Error: Current directory in not $WM_PROJECT_DIR
The environment variable are not consistent with the installation.
Check the OpenFOAM entries in your dot-files and source them.

What should I do and where?

Regards,

Petri Sulasalmi
PetSul is offline   Reply With Quote

Old   September 7, 2009, 07:31
Default
  #5
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

Have you edited the OpenFOAM bashrc to point to the right location/folder?
linnemann is offline   Reply With Quote

Old   September 7, 2009, 07:34
Default
  #6
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Quote:
Originally Posted by linnemann View Post
Hi

Have you edited the OpenFOAM bashrc to point to the right location/folder?

Yes I have edited .bashrc file but it still refuses to run the Allwmake.
PetSul is offline   Reply With Quote

Old   September 7, 2009, 07:39
Default
  #7
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Update!

I manage to run Allwmake but I gave a load of errors.
PetSul is offline   Reply With Quote

Old   September 7, 2009, 07:45
Default
  #8
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

make sure that these lines are in the bottom of the OpenFOAM bashrc file.

export PATH=$PATH:$WM_THIRD_PARTY_DIR/gmsh-2.3.1/bin
export PATH=$PATH:$WM_THIRD_PARTY_DIR/meshlab-1.2.1
export PATH=$PATH:$WM_THIRD_PARTY_DIR/engrid-1.0.1
export PATH=$PATH:$WM_THIRD_PARTY_DIR/libraries/bin

export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/paraview-3.6.1/platforms/linux64Gcc/bin:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/libraries/lib:$LD_LIBRARY_PATH
linnemann is offline   Reply With Quote

Old   September 8, 2009, 01:41
Default
  #9
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Hi,

yes I added those lines at the end of bashrc file in the OpenFOAM-1.6.x/etc directory. Then I tried again to run Allwmake but it still gives a lot of errors, for example

make[2]: *** [Make/linux64GccDPOpt/equilibriumFlameT.o] Error 1
make[2]: Target `/usr/local/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/equilibriumFlameT' not remade because of errors.
make[2]: Leaving directory `/usr/local/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/thermophysical/equilibriumFlameT'
make[1]: *** [equilibriumFlameT] Error 2
make[2]: Entering directory `/usr/local/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
/bin/sh: /usr/local/OpenFOAM/OpenFOAM-1.6.x/wmake/bin/linux64Gcc/wmkdep: No such file or directory
make[2]: Leaving directory `/usr/local/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[2]: Entering directory `/usr/local/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
SOURCE=mixtureAdiabaticFlameT.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/mixtureAdiabaticFlameT.o
/usr/local/OpenFOAM/ThirdParty-1.6.x/gcc-4.3.3/platforms/linux64/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.3/cc1plus: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make[2]: *** [Make/linux64GccDPOpt/mixtureAdiabaticFlameT.o] Error 1
make[2]: Target `/usr/local/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/mixtureAdiabaticFlameT' not remade because of errors.
make[2]: Leaving directory `/usr/local/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[1]: *** [mixtureAdiabaticFlameT] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/usr/local/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/thermophysical'
make: *** [thermophysical] Error 2
make: Target `application' not remade because of errors.

That's just some of it. Should I remove the 1.6 version of the OpenFOAM and ThirdParty or something..?

Regards,

Petri Sulasalmi
PetSul is offline   Reply With Quote

Old   September 8, 2009, 02:24
Default
  #10
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

This is the error that ruins it for you

error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory

libmpfr.so.1 is located in the ThirdParty-1.6.x/libraries/lib folder and it seems it haven't sourced it correctly, so I suspect that its not sourcing the lines I suggested correctly. what is the output of:

echo $LD_LIBRARY_PATH

you can also try and put the lines I suggested below the sourcing of the OpenFOAM bashrc in the user .bashrc.

I really don't know why you get this error since I've tested it 3 times on newly installed CentOS and the instructions have worked for me every time.

Regards
linnemann is offline   Reply With Quote

Old   September 8, 2009, 02:35
Default
  #11
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
This is the out put of echo $LD_LIBRARY_PATH:

/usr/local/OpenFOAM/ThirdParty-1.6.x/libraries/lib:/usr/local/OpenFOAM/ThirdParty-1.6.x/paraview-3.6.1/platforms/linux64Gcc/bin:/usr/local/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/openmpi-1.3.3:/usr/local/OpenFOAM/ThirdParty-1.6.x/openmpi-1.3.3/platforms/linux64GccDPOpt/lib:/usr/local/OpenFOAM/ThirdParty-1.6.x/gcc-4.3.3/platforms/linux64/lib64:/usr/local/OpenFOAM/ThirdParty-1.6.x/gcc-4.3.3/platforms/linux64/lib:/usr/local/OpenFOAM/ThirdParty-1.6.x/gmp-4.2.4/platforms/linux64/lib:/usr/local/OpenFOAM/ThirdParty-1.6.x/mpfr-2.4.1/platforms/linux64/lib:/home/petri/OpenFOAM/petri-1.6.x/lib/linux64GccDPOpt:/usr/local/OpenFOAM/site/1.6.x/lib/linux64GccDPOpt:/usr/local/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt:/usr/local/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt

I tried to run Allwmake after adding the stuff to my user .bashrc but it's all the same.

Regards
PetSul is offline   Reply With Quote

Old   September 8, 2009, 03:19
Default
  #12
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

As I can see /usr/local/OpenFOAM/ThirdParty-1.6.x/libraries/lib is in the LD_LIBRARY_PATH and I see no reason why it shouldn't work.

you have installed the dependencies from yum?

Regards
linnemann is offline   Reply With Quote

Old   September 8, 2009, 04:21
Default
  #13
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Do you mean this stuff:

yum install gcc gcc-c++ bison ncurses-devel

?
PetSul is offline   Reply With Quote

Old   September 8, 2009, 05:36
Default
  #14
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

Yup I mean that stuff.

I've just tried installing it again and I get no errors.

Regards
linnemann is offline   Reply With Quote

Old   September 8, 2009, 05:51
Default
  #15
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Yes I have them installed and latest versions too.
PetSul is offline   Reply With Quote

Old   September 14, 2009, 03:45
Default
  #16
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Is it possible that the updating problems have something to do with the amount of processors? I'm using a Mac with 8 cores, os is (as mentioned) Centos-5.3.
PetSul is offline   Reply With Quote

Old   September 14, 2009, 05:58
Default
  #17
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

I highly doubt it as I've done it on dual-core and quad-core systems.
linnemann is offline   Reply With Quote

Old   September 14, 2009, 06:41
Default
  #18
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

Probably a stupid question, but you are using 64bit version of CentOS?

Regards
linnemann is offline   Reply With Quote

Old   September 14, 2009, 06:45
Default
  #19
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Quote:
Originally Posted by linnemann View Post
Hi

Probably a stupid question, but you are using 64bit version of CentOS?

Regards

Yes, 64bit Centos indeed.
PetSul is offline   Reply With Quote

Old   September 14, 2009, 07:54
Default
  #20
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
I probably got it working, it's compiling atm but no errors, yet at least. I guess it takes some time to complete?

Anyway I didn't download ThirdParty-1.6.x just changed the name of ThirdParty-1.6 as someone suggested in another thread, otherwise I did as you instructed and no error messages yet. Quite strange.

Regards,

Petri
PetSul is offline   Reply With Quote

Reply

Tags
1.6.x, centos, openfoam

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.6 package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 36 September 2, 2009 12:46
OpenFOAM 1.5.x package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 7 July 30, 2009 03:14
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
OpenFOAM 15 and CentOS 52 installation issues remrich OpenFOAM Bugs 9 March 20, 2009 01:48
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50


All times are GMT -4. The time now is 23:37.