CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Question on specify gcc compiler for OpenFOAM 15 (http://www.cfd-online.com/Forums/openfoam-installation/57307-question-specify-gcc-compiler-openfoam-15-a.html)

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/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!

lin October 2, 2008 04:13

try move your OPENFOAM folder
 
try move your OPENFOAM folder from
/home/zlai/LZG/projects/OpenFOAM

to
/home/zlai/OpenFOAM

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 "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.


All times are GMT -4. The time now is 03:01.