CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Installation Quirks on Centos 6.6 (https://www.cfd-online.com/Forums/openfoam-installation/148733-installation-quirks-centos-6-6-a.html)

enrico.carrara@rina.org February 18, 2015 09:14

Installation Quirks on Centos 6.6
 
Hello,

I installed OpenFOAM 2.3.1 on CentOS 6.6 following this procedure except that I installed in /opt/OpenFOAM and not in $HOME/OpenFOAM. I did that by modifying bashrc manually and commenting/uncommenting relevant foamInstall.

At the end of procedure I noticed two possible quirks:

1) blockMesh and other binaries are installed in
/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64Gcc48DPOpt/bin

while PATH is set to
/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/bin

i.e. there is a "48" missing in the path. This seems due to incorrect setting of WM_COMPILER variable in bashrc. If not corrected, blockMesh cannot be found

2) When paraFoam is executed it gives
/usr/lib64/libstdc++.so.6: version 'GLIBCXX_3.4.15' not found

How can I fix this?

Thanks in advance

wyldckat February 18, 2015 14:12

Greetings Enrico,

By compiling directly at "/opt/OpenFOAM", you have put in danger your whole system :(. Because one wrong character while following the instructions, is all that it takes to damage your CentOS installation.

As for the first problem you're seeing: please study again step #7.

As for the second problem: it's probably related to the first one.

Best regards,
Bruno

enrico.carrara@rina.org February 19, 2015 03:40

Thank you, Bruno, for your prompt answer.

Thanks also for caring about the sanity of my whole system: I am aware of the risks, and this is exactly why I am doing these installation experiments on a safe and expendable environment and not on a production line with service level guarantees.

Concerning step #7, I guess you refer to the command line on paragraph 2.2 "CentOS 6.5", branch "x86_64":

source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=4 foamCompiler=ThirdParty \
WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI

that is what I actually did. Indeed, in my installation I have a lot of "linux64Gcc48DPOpt" and "linux64Gcc48" directories and this name, as far as I understand, comes from the composition of several environment variables, WM_COMPILER among them. It is not clear to me why bashrc seems not to set WM_COMPILER to a consistent value ("Gcc48" instead of "Gcc"), if due.

Concerning the error on libstdc++.so.6, googling a bit I could find several sites (e.g. http://qt-project.org/forums/viewthread/25550 and https://www.centos.org/forums/viewtopic.php?t=5807) where various explanations are given for similar problems. What I noticed is that my LD_LIBRARY_PATH (set with the of231 alias) does not contain the path to the version of libstdc++.so.6 required by paraFoam and the underlying Qt library, that is not the native CentOS 6.6 version.
Of course, I could solve my problem setting LD_LIBRARY_PATH in .bashrc as follows:

module load openmpi-x86_64
source /opt/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc $FOAM_SETTINGS
LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/platforms/linux64/gcc-4.8.4/lib64:$LD_LIBRARY_PATH

but I deem this solution sub-optimal for many reasons, first of all because it is not what is indicated in the instructions. Is there anyone who experienced the same problems and found a more satisfactory solution?

Cordially,
Enrico

P.S. For more information, this is what I have in my library path:

LD_LIBRARY_PATH=
/opt/OpenFOAM/ThirdParty-2.3.1/platforms/linux64Gcc48/boost_1_54_0/lib:
/opt/OpenFOAM/ThirdParty-2.3.1/platforms/linux64Gcc48/CGAL-4.3/lib:
/opt/OpenFOAM/ThirdParty-2.3.1/platforms/linux64Gcc48/gperftools-svn/lib:
/opt/OpenFOAM/ThirdParty-2.3.1/platforms/linux64Gcc48/ParaView-4.1.0/lib/paraview-4.1:
/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64Gcc48DPOpt/lib/openmpi-system:
/opt/OpenFOAM/ThirdParty-2.3.1/platforms/linux64Gcc48DPOpt/lib/openmpi-system:
/usr/lib64/openmpi/lib:
/home/eca/OpenFOAM/eca-2.3.1/platforms/linux64Gcc48DPOpt/lib:
/opt/OpenFOAM/site/2.3.1/platforms/linux64Gcc48DPOpt/lib:
/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64Gcc48DPOpt/lib:
/opt/OpenFOAM/ThirdParty-2.3.1/platforms/linux64Gcc48DPOpt/lib:
/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64Gcc48DPOpt/lib/dummy

wyldckat February 19, 2015 17:43

Quick answer: Replace this line you have:
Code:

source /opt/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc $FOAM_SETTINGS
with this one:
Code:

source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=4 foamCompiler=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI
because "FOAM_SETTINGS" will only work if you had done exactly the steps indicated in the instructions ;)

enrico.carrara@rina.org February 20, 2015 02:50

Thanks for your invaluable help, Bruno,

Now it seems to work, and I prefer this solution by far. Only I had to tweak the line a bit:
In my .bashrc I had to put
source /opt/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=4 foamCompiler=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI
instead of:
source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=4 foamCompiler=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI
I'll fix it for all users, and voilą!
Cordially
Enrico


All times are GMT -4. The time now is 18:47.