CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Question on specify gcc compiler for OpenFOAM 15 (

peterlai October 1, 2008 22:21

Hi All, I tried to install
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/
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 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!

lin October 2, 2008 04:13

try move your OPENFOAM folder
try move your OPENFOAM folder from


peterlai October 2, 2008 07:20

No, I add a path in shell file
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 "" is related to the compiler choose

"case "$WM_COMPILER_INST" in
case "$WM_COMPILER" in

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.

All times are GMT -4. The time now is 09:07.