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

OpenFOAM install on RHEL 5.5

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2010, 03:03
Default OpenFOAM install on RHEL 5.5
  #1
New Member
 
Join Date: Jul 2010
Posts: 11
Rep Power: 16
phinallydone is on a distinguished road
I’m attempting to install OpenFOAM on RHEL 5.5. I’ve downloaded gcc44 and all necessary dependencies. How do I configure the source to use gcc44 (/usr/bin/gcc44) instead of gcc (/usr/bin/gcc)? Is this a setting in OpenFOAM-1.7.1/etc/bashrc? Thanks in advance.
phinallydone is offline   Reply With Quote

Old   October 12, 2010, 10:30
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings phinallydone,

I'm assuming you are using the x86_64 architecture version of RHEL. If so, scroll down in OpenFOAM's bashrc and search for this piece of code:
Code:
 x86_64)
        case $WM_ARCH_OPTION in
        32)
            export WM_COMPILER_ARCH='-64'
            export WM_CC='gcc'
            export WM_CXX='g++'
            export WM_CFLAGS='-m32 -fPIC'
            export WM_CXXFLAGS='-m32 -fPIC'
            export WM_LDFLAGS='-m32'
            ;;
        64)
            WM_ARCH=linux64
            export WM_COMPILER_LIB_ARCH=64
            export WM_CC='gcc'
            export WM_CXX='g++'
            export WM_CFLAGS='-m64 -fPIC'
            export WM_CXXFLAGS='-m64 -fPIC'
            export WM_LDFLAGS='-m64'
            ;;
        *)
            echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"
            ;;
        esac
        ;;
There simply change the gcc and g++ entries to gcc44 and g++44.

If you aren't using the x86_64 architecture version of RHEL, then you can simply export WM_CC and WM_CXX accordingly to your architecture.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 13, 2010, 12:51
Default
  #3
New Member
 
Join Date: Jul 2010
Posts: 11
Rep Power: 16
phinallydone is on a distinguished road
Worked great. Thanks!
phinallydone is offline   Reply With Quote

Old   February 8, 2011, 20:23
Default
  #4
New Member
 
Join Date: Apr 2010
Posts: 18
Rep Power: 16
namCFD is on a distinguished road
Hello Bruno,

I sincerely hope you can point me in the right direction.

Since my system gcc version is 4.1.2. I have installed a gcc version 4.4.5 in a /opt/gcc445 so the command "which gcc44" point to /opt/gcc445/bin/gcc44, and similarly for g++44.

I also changed the /etc/bashrc file accordingly to post #2 above.

The beginning of log file for Allwmake is:

Makefile:54: /home/hnguyen/OpenFOAM/OpenFOAM-1.7.1/wmake/rules/linux64gcc44/general: No such file or directory
Makefile:55: /home/hnguyen/OpenFOAM/OpenFOAM-1.7.1/wmake/rules/linux64gcc44/c++: No such file or directory
make: *** No rule to make target `/home/hnguyen/OpenFOAM/OpenFOAM-1.7.1/wmake/rules/linux64gcc44/c++'. Stop.

Thank you for your time and advice.
__________________
Nam
namCFD is offline   Reply With Quote

Old   February 9, 2011, 03:16
Default
  #5
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi Nam,

Quote:
Makefile:54: /home/hnguyen/OpenFOAM/OpenFOAM-1.7.1/wmake/rules/linux64gcc44/general: No such file or directory
Could it be that you need to make wmake rules for your new linux64gcc44 setup? Does this help?:

Code:
cp -r /home/hnguyen/OpenFOAM/OpenFOAM-1.7.1/wmake/rules/linux64Gcc /home/hnguyen/OpenFOAM/OpenFOAM-1.7.1/wmake/rules/linux64gcc44
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 9, 2011, 18:08
Default
  #6
New Member
 
Join Date: Apr 2010
Posts: 18
Rep Power: 16
namCFD is on a distinguished road
Hello Gijs,

Thank you for your suggestion. I think I did this thing all wrong. I should have placed the compiler in the ThirdParty directory for it to work correctly as recommended by this

http://www.openfoam.com/archive/1.6/docs/README.php.

I will try this and update this post.

UPDATE:
So I stumbled upon these blogs by Bruno:

http://www.cfd-online.com/Forums/blo...-7-series.html

http://www.cfd-online.com/Forums/blo...-openfoam.html

Following these blogs and everything works. OpenFOAM-1.7.1 and ParaView 3.8.0 were installed on my Scientific Linux 5.5 (a clone of Enterprise Red Hat 5.5) 64 bit system.

Regards,
__________________
Nam

Last edited by namCFD; February 9, 2011 at 19:16. Reason: Update
namCFD is offline   Reply With Quote

Old   May 17, 2011, 15:24
Default
  #7
New Member
 
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 15
yss88 is on a distinguished road
Hello,
since I have a similar problem with installing OF I decided to post here. I hope it isn't a problem
The cluster I am using has gcc44 installed in usr/bin/gcc44 and so far I changed the entries in bashrc as required in post #2 to gcc44 and g++44, but I still got some errors.
When running Allwmake from the Thirdparty directory I got the message that my compiler is not able to produce working executables, and running the Allwmake in apllications gave the errfile I've attached. I tried to find if there's g++44 but couldn't find it.
Maybe it would be best to compile gcc locally?
Thanks in advance for the help, I really appreciate it.
Attached Files
File Type: zip errfile.zip (15.9 KB, 2 views)
yss88 is offline   Reply With Quote

Old   May 18, 2011, 01:05
Default
  #8
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi Yavor,

Are those really all the errors you got? The log starts with applications and a bit further down it says "/usr/bin/ld: cannot find -lfiniteVolume". Did $WM_PROJECT_DIR/src actually compile properly?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   May 19, 2011, 04:52
Default
  #9
New Member
 
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 15
yss88 is on a distinguished road
Quote:
Originally Posted by gwierink View Post
Hi Yavor,

Are those really all the errors you got? The log starts with applications and a bit further down it says "/usr/bin/ld: cannot find -lfiniteVolume". Did $WM_PROJECT_DIR/src actually compile properly?
This is not the entire error log, because I stopped the compilation process when I saw these errors, but the /src couldn't compile properly also. I found that others have had the same error "cannot find -lfiniteVolume", but I decided to ask for some help not to mess up things
yss88 is offline   Reply With Quote

Old   May 19, 2011, 05:15
Default
  #10
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Aha, that's exactly the point. The error you got is quite late in the installation process, when you're compiling the applications. So, your src didn't compile properly. Do you have a build log of src?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   May 22, 2011, 05:15
Default
  #11
New Member
 
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 15
yss88 is on a distinguished road
Yes, I'm attaching it below.
Attached Files
File Type: zip src_log.zip (10.0 KB, 4 views)
yss88 is offline   Reply With Quote

Old   May 22, 2011, 05:32
Default
  #12
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Line 11 of your error log says
Quote:
OPwrite.C:29:17: error: mpi.h: No such file or directory
If you're compiling on a desktop, probably ThirdParty (openmpi) did not compile properly. If you're on a cluster (and using something else than the openmpi provided with ThirdParty) you need to specify where your MPI library lives. So, how did compilation of ThirdParty go?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   May 22, 2011, 05:57
Default
  #13
New Member
 
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 15
yss88 is on a distinguished road
I'm compiling on a cluster, and "which mpicxx" returns /opt/bin/mpich2/bin/mpicxx. I've attached the build logs from thirdparty.
Attached Files
File Type: zip thirdparty_log.zip (2.8 KB, 6 views)
yss88 is offline   Reply With Quote

Old   May 22, 2011, 07:43
Default
  #14
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hmm, logfile line 17:
Quote:
configure: error: Could not run a simple C++ program. Aborting.
Have you set your compiler directives correctly, so that OpenFOAM can find gcc-4.4? Have a look here, it's a different cluster, but maybe it's useful ...
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   March 30, 2012, 22:17
Default
  #15
New Member
 
lishijie
Join Date: Mar 2012
Posts: 4
Rep Power: 14
lishijie is on a distinguished road
Hi,
now I want to install OpenFOAM 2.1.0 on RHEL5.5, and I have installed Gcc4.6.3, but OpenFOAM still can't make correct, how should I do?
lishijie is offline   Reply With Quote

Old   April 1, 2012, 05:38
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings lishijie,

Quote:
Originally Posted by lishijie View Post
Hi,
now I want to install OpenFOAM 2.1.0 on RHEL5.5, and I have installed Gcc4.6.3, but OpenFOAM still can't make correct, how should I do?
I'm going to answer you with a quote from a recent thread:
Quote:
Originally Posted by linnemann View Post
Just install centFOAM

It will not do anything to your system.

It comes with its own GCC version 4.6.x.

There are multiple guides/help on how to compile OF on CentOS 5.x releases.

This thread has guide for OF-1.7 but the procedure is the same for 2.1
http://www.cfd-online.com/Forums/ope...-released.html
Best regards,
Bruno
__________________
wyldckat 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
unable to install openfoam 1.7 using apt-get maazhmd OpenFOAM Installation 7 July 24, 2011 12:18
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 15:43
OpenFOAM Install problem masb OpenFOAM 3 May 25, 2009 12:32
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 05:48
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


All times are GMT -4. The time now is 04:15.