CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM-1.7.0 for CentOS/RHEL/SL 5.x 64bit released (http://www.cfd-online.com/Forums/openfoam-installation/77668-openfoam-1-7-0-centos-rhel-sl-5-x-64bit-released.html)

linnemann June 30, 2010 06:25

OpenFOAM-1.7.0 for CentOS/RHEL/SL 5.x 64bit released
 
Hi all

Just finished compiling/uploading 1.7.0 for CentOS/RHEL/SL 5.x 64bit based OS'es.

As usual it can be found here

Best
Linnemann

alberto July 1, 2010 14:04

Thank you!

bhh July 2, 2010 03:47

Hi Niels,

Any chance of making a 32 bit version?

rgds
Bjorn

linnemann July 2, 2010 05:43

Hi Bjorn

I don't use 32bit and I do not know how many CFD guys really use 32bit.

So I will have my focus on 64bit, but the manual instructions on the wiki page should apply to 32bit as well just strip the x86_64 from the yum packages.

To compile 1.7.0 you need to do the following.

as root

Code:

yum install gcc gcc-c++ bison ncurses-devel tix glibc-devel flex flex-devel zlib-devel libXt-devel
As user

Code:

cd $HOME

mkdir OpenFOAM

wget http://downloads.sourceforge.net/foam/ThirdParty-1.7.0.gtgz?use_mirror=mesh

wget http://downloads.sourceforge.net/foam/OpenFOAM-1.7.0.gtgz?use_mirror=mesh

cd OpenFOAM

tar -xvf ../ThirdParty-1.7.0.gtgz
tar -xvf ../OpenFOAM-1.7.0.gtgz

put this line in your .bashrc and source it

Code:

alias OF17=". $HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc"

. $HOME/.bashrc

Now the command OF17 should load the OpenFOAM environment

Then you need a couple of dependencies to compile gcc-4.4.4

Code:

mkdir $HOME/build
cd $HOME/build

GMP---

Code:

wget ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.bz2

tar -xvf gmp-5.0.1.tar.bz2

cd gmp-5.0.1

OF17

./configure --prefix=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1

make -j2 (for two cpu cores, 4 if you have 4 cores)
make install

MPFR---

Code:

cd $HOME/build

wget http://ftp.gnu.org/gnu/mpfr/mpfr-2.4.2.tar.gz

tar -xvf mpfr-2.4.2.tar.gz

cd mpfr-2.4.2

OF17

./configure --prefix=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2 --with-gmp=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1

make -j2
make install

GCC---

Code:

cd $HOME/build

wget http://ftp.gnu.org/gnu/gcc/gcc-4.4.4/gcc-4.4.4.tar.gz

tar -xvf gcc-4.4.4.tar.gz

cd gcc-4.4.4

mkdir build (important to compile gcc out of source)

cd build

OF17

../configure --prefix=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.4.4 --with-gmp=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1 --with-mpfr=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2

make -j2
make install

Now you should be able to go into the ThirdParty-1.7.0 folder and issue

Code:

OF17
./Allwmake

and the same for OpenFOAM.

You will have to figure paraview out for yourself since I don't compile it in the ThirdParty folder.

Hope this will get you somewhere.

bhh July 2, 2010 07:26

1 Attachment(s)
Hi, Niels

I got stuck after the command:
../configure --prefix=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.4.4 --with-gmp=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1 --with-mpfr=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2

I got the error given in the attached screenshot. Any clue about what went wrong?

rgds
Bjorn

bhh July 2, 2010 07:35

Hi again,

Sorry, the above error came after the "make j2" command line

rgds
Bjorn

linnemann July 2, 2010 07:42

Hi

It seems gcc cant find mpfr according to this

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35577

Did you remember to run OF17 before configuring else the path for gmp and mpfr cant be found

You could try with the full path instead of

--with-gmp=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1 --with-mpfr=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2

use

--with-gmp=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/linux/gmp-5.0.1 --with-mpfr=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/linux/mpfr-2.4.2


Or add gmp and mpfr to your LD_LIBRARY_PATH

bhh July 2, 2010 08:08

Hi,
I tried your suggestion but the same error occurred.
rgds
Bjorn

niklas July 2, 2010 08:16

Hi Bjorn,

Hope you are well :)

I had the same problem when using gcc 4.1.2.
I switched to openfoam-1.7.0 and started to compile gcc-4.4.4 with
the system compiler and could not get it to work so before switching
environment from 1.6 to 1.7, compile gcc-4.4.4 with
the compiler from openfoam-1.6.x, which was gcc-4.3.3 for me.

Then no problemo.

N

bhh July 2, 2010 08:38

Hi Niklas & Niels,

I am not that good in linux commands, so I probably need a detailed cookbook recipe to get OF1.7 to work. Niels did a good job in doing so, but I got stuck. Niklas you also probably give good advise, but I am not able to use it (becuase of my lack of knowledge in linux).

rgds
Bjorn

niklas July 2, 2010 08:49

what does it say if you type

gcc -v

bhh July 2, 2010 08:56

1 Attachment(s)
Niklas,

the Attached screenshot show the result after gcc -v. This is however after I changed to 1.6.x
Bjorn

niklas July 2, 2010 10:04

right,
but Im guessing that you didnt use that version when compiling gcc-4.4.4.

However, if you stay in the 1.6.x environment you can compile gcc-4.4.4
with gcc-4.3.3 and that will probably work better

using
../configure --prefix=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.4.4 --with-gmp=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1 --with-mpfr=$HOME/OpenFOAM/ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2

make
make install

...assuming that the enviroment variables WM_ARCH and WM_COMPILER_ARCH are the same
in 1.7.0 and 1.6.x and that your installation is under $HOME/OpenFOAM

N

bhh July 5, 2010 03:14

Hi,
When I executed the command you propose I get the response:
bash: ../configure: No such file or directory

Any clue what might be wrong?

Bjorn

niklas July 5, 2010 03:40

go to the gcc-4.4.4 directory and create a dir called...for instance build with 'mkdir build'
'cd build' and execute the command from there
you should not run the configure script in the gcc-4.4.4 directory

bhh July 5, 2010 04:39

Niklas,
I feel stupid: in ThirdParty-1.6.x there is no gcc-4.4.4 only gcc-4.3.3. As I indicated in an earlier post I am not well adapted to linux commands.
Bjorn

niklas July 5, 2010 06:41

The gcc-4.4.4 should reside in the ThirdParty-1.7.0 directory.

Just 'cd ~/OpenFOAM/ThirdParty-1.7.0' while still in the 1.6.3 environment.

bhh July 5, 2010 08:28

Niklas,
In OpenFOAM-1.7.0 there is no gcc folder, only:
Allwmake bin doc README ReleaseNotes-1.7 src tutorials
applications COPYING etc README.html ReleaseNotes-1.7.html test wmake
Bjorn

bhh July 5, 2010 08:41

Niklas
I meant to say that in OpenFOAM ThirdParty-1.7.0 thre is no gcc flder, only:
[user@OpenFOAM ThirdParty-1.7.0]$ ls
Allclean makeParaView paraview-3.8.0 platforms wmakeFiles
Allwmake metis-5.0pre2 ParMetis-3.1 scotch_5.1
AllwmakeLibccmio openmpi-1.4.1 ParMGridGen-1.0 tools

Bjorn

bhh July 5, 2010 08:45

NIklas,
I found the gcc-4.4.4 under /home/user/OpenFOAM/ThirdParty-1.7.0/platforms/linux/gcc-4.4.4

But there were no files present. This is what I got when executing the command
bash: ../configure: No such file or directory

Bjorn


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