|
[Sponsors] |
October 12, 2010, 03:03 |
OpenFOAM install on RHEL 5.5
|
#1 |
New Member
Join Date: Jul 2010
Posts: 11
Rep Power: 16 |
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.
|
|
October 12, 2010, 10:30 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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 ;; 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
__________________
|
|
October 13, 2010, 12:51 |
|
#3 |
New Member
Join Date: Jul 2010
Posts: 11
Rep Power: 16 |
Worked great. Thanks!
|
|
February 8, 2011, 20:23 |
|
#4 |
New Member
Join Date: Apr 2010
Posts: 18
Rep Power: 16 |
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 |
|
February 9, 2011, 03:16 |
|
#5 | |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hi Nam,
Quote:
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 |
||
February 9, 2011, 18:08 |
|
#6 |
New Member
Join Date: Apr 2010
Posts: 18
Rep Power: 16 |
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 |
|
May 17, 2011, 15:24 |
|
#7 |
New Member
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 15 |
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. |
|
May 18, 2011, 01:05 |
|
#8 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
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 |
|
May 19, 2011, 04:52 |
|
#9 |
New Member
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 15 |
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
|
|
May 19, 2011, 05:15 |
|
#10 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
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 |
|
May 22, 2011, 05:15 |
|
#11 |
New Member
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 15 |
Yes, I'm attaching it below.
|
|
May 22, 2011, 05:32 |
|
#12 | |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Line 11 of your error log says
Quote:
__________________
Regards, Gijs |
||
May 22, 2011, 05:57 |
|
#13 |
New Member
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 15 |
I'm compiling on a cluster, and "which mpicxx" returns /opt/bin/mpich2/bin/mpicxx. I've attached the build logs from thirdparty.
|
|
May 22, 2011, 07:43 |
|
#14 | |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hmm, logfile line 17:
Quote:
__________________
Regards, Gijs |
||
March 30, 2012, 22:17 |
|
#15 |
New Member
lishijie
Join Date: Mar 2012
Posts: 4
Rep Power: 14 |
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? |
|
April 1, 2012, 05:38 |
|
#16 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings lishijie,
Quote:
Quote:
Bruno
__________________
|
|||
|
|
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 |