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

[OpenFOAM.org] Installation of OpenFOAM 2.3.1 on RHEL 6.3

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2015, 02:27
Default Installation of OpenFOAM 2.3.1 on RHEL 6.3
  #1
New Member
 
Jack B.
Join Date: Apr 2009
Posts: 24
Rep Power: 16
Turbulent is on a distinguished road
Hi,

Is it possbile to install OpenFOAM 2.3.1 on RHEL Server 6.3?
The latest upgradable GCC version for the system is 4.4.7 while OpenFOAM demands GCC 4.5.0 and above.

Any help would be appreciated.

Thanks,

Jack
Turbulent is offline   Reply With Quote

Old   March 24, 2015, 11:55
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Yes, it is possible. You even have two possibilities:

1. Build newer version gcc (using makeGcc script from ThirdParty folder, http://openfoamwiki.net/index.php/In...HEL#CentOS_6.5)

2. Install newer version of Gcc using Sofware Collections (https://access.redhat.com/documentat...e_Collections/).
alexeym is offline   Reply With Quote

Old   March 26, 2015, 04:32
Default
  #3
Member
 
Al
Join Date: Jul 2013
Location: Japan
Posts: 47
Blog Entries: 3
Rep Power: 13
donQi is on a distinguished road
Hi Jack,

here comes another way I used [but before try Alexey's suggestion that is a more elegant solution]

Similarly to you, I had a redhat server 6.4 Santiago, and gcc 4.4.7 without the possibility to become root.

Therefore I did the following:
1) take an hard disk with some GB of space and install on it virtual box portable http://www.vbox.me/
2) create a virtual machine installing CentOS 6.6
3) follow the instruction from http://www.openfoam.org/download/git.php
4) copy the compiled version of the virtual machine into your redhat 6.4 server
5) modify the environment variables
I test some tutorials and they are running well.

If you are interested in more details I copy below my diary of command executed:

In the virtual machine centOS6.6:

as root:
Code:
yum install git
download the sources
Code:
 cd /home/donQi/OpenFOAM
as normal user [not Root]
Code:
git clone git://github.com/OpenFOAM/OpenFOAM-2.3.x.git
    cd OpenFOAM-2.3.x
    git pull
save in /home/donQi/OpenFOAM the ThirdParty-2.3.1.tgz
(always as normal user)
Code:
tar xzf ThirdParty-2.3.1.tgz
    mv ThirdParty-2.3.1 ThirdParty-2.3.x
now as root:
Code:
yum groupinstall 'Development Tools'
    yum install openmpi openmpi-devel
    yum-config-manager --nogpgcheck --add-repo http://dl.atrpms.net/el6-x86_64/atrpms/stable
    yum install --nogpgcheck qtwebkit qtwebkit-devel
    yum install --nogpgcheck CGAL CGAL-devel
then :
Code:
 ln -s /usr/lib64/libboost_thread-mt.so /usr/lib64/libboost_thread.so
then as normal user
Code:
 gedit ~/.bashrc
add the lines:
Code:
 export PATH=/usr/lib64/openmpi/bin/:$PATH
    export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib/:$LD_LIBRARY_PATH
then in terminal
Code:
source ~/.bashrc
    mpirun --version
you should see the message:
mpirun (Open MPI) 1.8.1
then as root:
Code:
 yum-config-manager --nogpgcheck --add-repo http://springdale.princeton.edu/data/puias/6.5/x86_64/os
    yum-config-manager --nogpgcheck --add-repo http://springdale.princeton.edu/data/puias/DevToolset/6.5/x86_64
    yum install --nogpgcheck devtoolset-1.1-runtime devtoolset-1.1-gcc.x86_64 devtoolset-1.1-gcc-c++.x86_64
This creates an isolated installation of GCC which can be used by sourcing the relevant script by typing the following in a local terminal:
Code:
   source /opt/rh/devtoolset-1.1/enable
then as normal user
Code:
    source /opt/rh/devtoolset-1.1/enable
    gcc --version
and we get
Code:
 gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
        Copyright (C) 2012 Free Software Foundation, Inc.
        This is free software; see the source for copying conditions.  There is NO
        warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Finally!!!
ENVIRONMENT VARIABLES
in thunder VirtualMachine where we had /home/donQi/OpenFOAM/ we have just add in ~/.bashrc :
Code:
source $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc
type:
foam
and you should be in the directory OpenFOAM-2.3.x
let's check
Code:
 foamSystemCheck
we get:
Code:
System check: PASS
Jeremy Clarkson get the vietnamese driving license!!! OK!!!!
Then
Code:
cd $WM_PROJECT_DIR
to avoid an error [ "/usr/bin/ld: cannot find -lz" ] before launching the Allrun install also
Code:
    yum install zlib-static
    yum install glibc-static
NOTE: if you get an error "NOKEY.." then use:
Code:
    yum install --nogpgcheck zlib-static
    yum install --nogpgcheck glibc-static
Then launch:
Code:
./Allwmake > make.log 2>&1
OK zero errors.

Now back to copy in our server.
>> Copying the compiled openFOAM to Redhat6.4 /
In the thunder VirtualMachine, copy all the files inside the OpenFOAM directory into the share directory:
Code:
sudo su - 
    cd -rL /home/donQi/OpenFOAM/* /media/sf_ShareThunder
NOTE: we add the L option to avoid the error "ERROR Cannot create symlink to"
Then back to the RedHat6.4 machine:
we copy the directory from the virtual machine (OpenFOAM-2.3.x, donQi-2.3.x and ThirdParty-2.3.x) into
Code:
/net/lnx6/home/donQi/OpenFOAM/thunderCompiled
In ~/.bashrc set :
Code:
 alias OF23x='. /net/lnx6/home/donQi/OpenFOAM/thunderCompiled/OpenFOAM-2.3.x/etc/bashrc'
e nella ect/bash
Code:
 foamInstall=/net/lnx6/home/donQi/OpenFOAM/thunderCompiled/
new terminal
Code:
  source ~/.bashrc
  OF23x
  tut
  cd incompressible/icoFoam
  blockMesh
OK works

Code:
[1034 cavity] >> blockMesh
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.x-c70d1f3c1beb
Exec   : blockMesh
Date   : Mar 26 2015
donQi is offline   Reply With Quote

Reply

Tags
rhel 6.3

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 course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
RHEL 6.3 Installation problem Turbulent STAR-CCM+ 0 September 3, 2014 08:01
[Discussion] Restructuring the Installation page at openfoamwiki.net wyldckat OpenFOAM Installation 16 November 2, 2013 12:43
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
OpenFOAM 1.7.1 installation problem on Fedora 14 armonica OpenFOAM Installation 16 March 31, 2011 14:16


All times are GMT -4. The time now is 18:16.