Skip to content

foamInstallationTest can't read the gcc/g++ version

Hi,

When i installed the newest version OpenFOAM-v2406 on our HPC, the foamInstallationTest can't read the right gcc/g++ version, and the output is given by:

ERROR: gcc version is too old for this release of OpenFOAM
     User version    :
     Minimum required: 4.8.5

Before that, i have module loading the gcc 9.4.0, and openmpi 4.1.6. The OpenFOAM has been installed rightly accoring to the installation guide in OpenFOAM.com. So i modified the etc/bashrc in 273 and 274 lines, as follow.

*gcc* | *g++*)
     VERSION=$($APP_NAME --version 2>&1 \
             | sed -ne 's/.*g* (GCC) \([0-9][0-9.]*\).*/\1/p')

After that, foamInstallationTest can read the gcc/g++ version rightly. The system of our HPC is centOS 8.4.

cheers, chenggong li

Edited by Mark OLESEN