|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Join Date: Jul 2010
Posts: 11
Rep Power: 17 ![]() |
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.
|
|
|
|
|
|
|
|
|
#2 |
|
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 130 ![]() ![]() ![]() ![]() ![]() ![]() |
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
__________________
|
|
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Jul 2010
Posts: 11
Rep Power: 17 ![]() |
Worked great. Thanks!
|
|
|
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2010
Posts: 18
Rep Power: 17 ![]() |
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 |
|
|
|
|
|
|
|
|
#5 | |
|
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 19 ![]() |
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 |
||
|
|
|
||
|
|
|
#6 |
|
New Member
Join Date: Apr 2010
Posts: 18
Rep Power: 17 ![]() |
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 |
|
|
|
|
|
|
|
|
#7 |
|
New Member
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 16 ![]() |
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. |
|
|
|
|
|
|
|
|
#8 |
|
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 19 ![]() |
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 |
|
|
|
|
|
|
|
|
#9 | |
|
New Member
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 16 ![]() |
Quote:
|
||
|
|
|
||
|
|
|
#10 |
|
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 19 ![]() |
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 |
|
|
|
|
|
|
|
|
#11 |
|
New Member
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 16 ![]() |
Yes, I'm attaching it below.
|
|
|
|
|
|
|
|
|
#12 | |
|
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 19 ![]() |
Line 11 of your error log says
Quote:
__________________
Regards, Gijs |
||
|
|
|
||
|
|
|
#13 |
|
New Member
Yavor Semov
Join Date: Dec 2010
Posts: 4
Rep Power: 16 ![]() |
I'm compiling on a cluster, and "which mpicxx" returns /opt/bin/mpich2/bin/mpicxx. I've attached the build logs from thirdparty.
|
|
|
|
|
|
|
|
|
#14 | |
|
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 19 ![]() |
Hmm, logfile line 17:
Quote:
__________________
Regards, Gijs |
||
|
|
|
||
|
|
|
#15 |
|
New Member
lishijie
Join Date: Mar 2012
Posts: 4
Rep Power: 15 ![]() |
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? |
|
|
|
|
|
|
|
|
#16 | ||
|
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 130 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings lishijie,
Quote:
Quote:
Bruno
__________________
|
|||
|
|
|
|||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |