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

Question on specify gcc compiler for OpenFOAM 15

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 1, 2008, 22:21
Default Hi All, I tried to install
  #1
New Member
 
zlai
Join Date: Mar 2009
Posts: 2
Rep Power: 0
peterlai is on a distinguished road
Hi All,

I tried to install OpenFOAM 1.5 from source on my CentOS operation system. Following the instructions in README, I added the OpenFOAM environment setting into my shell file and sourced it. But I noticed an warning message appears which means the proper gcc compiler for OpenFOAM is missing.

" Warning in /home/zlai/LZG/projects/OpenFOAM/OpenFOAM-1.5/etc/settings.sh:
Cannot find /home/zlai/LZG/projects/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux installation.
Please install this compiler version or if you wish to use the system compiler, change the WM_COMPILER_INST setting to 'System' in this file"

Now I have installed the GCC 4.3.1 into the ThirdParty folder with a folder name gcc-4.3.1. But I got confused with how to let the setting.sh file know this version of GCC I just installed.

It looks like the path to the compiler is pointing to the " .../gcc-4.3.1/platforms/linux". But I could not find it in the GCC 4.3.1 I installed.

Does anybody can help me with this? Thanks!
peterlai is offline   Reply With Quote

Old   October 2, 2008, 04:13
Default try move your OPENFOAM folder
  #2
lin
Senior Member
 
Hua Zen
Join Date: Mar 2009
Posts: 114
Rep Power: 8
lin is on a distinguished road
try move your OPENFOAM folder from
/home/zlai/LZG/projects/OpenFOAM

to
/home/zlai/OpenFOAM
lin is offline   Reply With Quote

Old   October 2, 2008, 07:20
Default No, I add a path in shell file
  #3
New Member
 
zlai
Join Date: Mar 2009
Posts: 2
Rep Power: 0
peterlai is on a distinguished road
No, I add a path in shell file for the FOAM_INT_DIR as wrote in README, so it's OK for me to put the source file in "/home/zlai/LZG/projects/OpenFOAM", while the "PROJECT_USER_DIR" will be created in #HOME.

My question is how to let OpenFOAM 1.5 use the GCC 4.3.1 I have installed in ThirdParty folder. Actually, I know the following part of script in "setting.sh" is related to the compiler choose

"case "$WM_COMPILER_INST" in
OpenFOAM)
case "$WM_COMPILER" in
Gcc)
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.1/platforms/$WM_ARCH$WM_COMPILER_ARC H
;;
Gcc42)
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARC H
;;
esac
...
...
...
"

I just don't know how to modify the directory ".../gcc-4.3.1/platforms/$WM_ARCH$WM_COMPILER_ARCH" to be my one.

Thanks you for your suggestion.
peterlai is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CheckMesh error using a tutorial from OpenFOAM 114 with openFOAM 13 martapajon OpenFOAM Native Meshers: blockMesh 7 January 21, 2008 13:52
Compiler in OpenFoam gulp OpenFOAM Installation 4 October 27, 2007 11:36
OpenFOAM users in Munich OpenFOAM benutzer in M%c3%bcnchen jaswi OpenFOAM 0 August 3, 2007 13:11
OpenFOAM installation on AIX 53 with gnu 40 compiler chauvin OpenFOAM Installation 3 June 15, 2006 13:12
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix mbeaudoin OpenFOAM Installation 2 April 28, 2006 08:54


All times are GMT -4. The time now is 02:54.