CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   OpenFOAM on cluster: version GLIBCXX_3.4.9 and GLIBCXX_3.4.11 not found (https://www.cfd-online.com/Forums/openfoam/75218-openfoam-cluster-version-glibcxx_3-4-9-glibcxx_3-4-11-not-found.html)

ovie April 19, 2010 15:03

OpenFOAM on cluster: version GLIBCXX_3.4.9 and GLIBCXX_3.4.11 not found
 
Hi,

I have installed OpenFOAM in my directory on a cluster. I have also been able to run an interactive parallel computation. However, when I try to run a batch job using a PBS script, I get the following error message:

blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by blockMesh)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libdynamicMesh.so)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libtriSurface.so)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libdecompositionMethods.so)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/liblagrangian.so)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/mpich2-1.1.1p1/libPstream.so)
blockMesh: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /home/ba01/u125/edoro/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/mpich2-1.1.1p1/libPstream.so)

The message is the same for all the other OpenFOAM commands, such as setFields, decomposePar, reconstructPar etc.

My installation uses the ThirdParty gcc supplied with OpenFOAM although I initially used the system's compilers but changed it when I had some errors after running foamInstallationTest. The system runs on MPICH and not OpenFOAM's OpenMPI.

I have tried to create and rename the symbolic link by doing:

cd /home/USER_NAME/OpenFOAM/ThirdParty-1.6.x/gcc-4.3.3/platforms/linux64/lib64
mv libstdc++.so.6 libstdc++.so.6.orig
ln -s /usr/lib/libstdc++.so.6.0.8 libstdc++.so.6

But I still get the error messages.

Could someone please help?

Thanks
Ovie

niklas April 19, 2010 15:29

oooooo, that is dangerous.
The cluster is not using the same gcc-libs as your linux desktop.
The cluster is probably running an older linux-version than your desktop.

I suggest you treat it as another system and set up your environment differently depending on which computer you are.
You can either make the PBS system the default environment and check the hostname
or something of your desktop and then modify the environment so that different libs are sourced.

or if that is too complicated you can created 2 foam-installations, for instance
copy 1.6.x to 1.6.pbs and in your .bashrc you do something like this

if (my desktop) then
source 1.6.x
else
source 1.6.pbs

then you submit the Allwmake script to PBS to compile foam there.
If you plan to modify the code you might need to submit your compilation jobs to the
cluster to get it to work, but for me it works as long as the main libraries have been compiled on the cluster.

or...

It might be sufficient to just recompile gcc on the cluster and hope that the newer system
is backwards compatible.

N

niklas April 19, 2010 15:32

oohhh I just read that you managed to run it interactively.

Did you remember to source foam in the run-script?

ovie April 19, 2010 15:55

Thanks for your reply Niklas.

This is a copy of my pbs script:
#PBS -q standby-
#PBS -l select=2:ncpus=8
#PBS -l walltime=00:10:00
#PBS -V

#unload/load required modules
module unload mpich-intel64
module unload mpich-gcc
module load mpich2-gcc/4.4.0

source $HOME/.cshrc

echo "I ran on:"
cat $PBS_NODEFILE

cd $PBS_O_WORKDIR

#Mesh the geometry
blockMesh

#Run setFields to initialize alpha1
setFields

#Decompose the mesh for parallel run
decomposePar

#Run the solver and create solution log file
mpirun -np 16 interFoam -parallel > log&

#Reconstruct the parallel results
reconstructPar

I source my $HOME/.cshrc file where I have the command to source the foam environment variables.

The system has libstdc++so.6.0.8. My desktop has libstdc++so.6.0.10.

ovie April 19, 2010 16:19

Hi Niklas,

I am quite at a loss why this GLIBCXX errors appear.

When I log on to the cluster and cd to a directory with my OpenFOAM job, I can run all the various commands easily. eg blockMesh, setFields etc so long as I load the correct modules.

But if I type the command :
unload mpich2-gcc

then those OpenFOAM commands would no longer work. It gives the error
blockMesh: error while loading shared libraries: libmpich.so.1.1: cannot open shared object file: No such file or directory

but when I load mpich2, then it works fine. So I really dont understand why it works ok for local runs and then wont work for a pbs batch job.

If you have experience with installation and running OpenFOAM on a cluster, then I would deeply appreciate your guidance and assistance in helping sorting this out. I have been on this error for quite some time now and it seems everything I try to do to fix it just doesnt work.

Thanks again.

niklas April 20, 2010 05:32

can you echo the LD_LIBRARY_PATH environment variable, when it is working
and when it is not.
maybe this will give you a clue if anything is different

ovie April 22, 2010 16:36

Hi Niklas,

Sorry for the delayed response. I have been able to fix the problem by simply reinstalling OpenFOAM from start and using the right mpich2 module on the cluster. The error was most likely a result of the environment variables for the communication library set to an earlier version of mpich2 which the system probably doesnt recognise anymore I guess.

In anycase, after the correction in the fresh install, the solver runs and outputs results nicely.

Thanks for your assistance.

Ovie

flowris June 14, 2010 11:04

Hello all,

I am using OpenFOAM-1.5-dev on Ubuntu 9.10 and experiencing similar problems. In the file etc/settings.sh, around line 114, one can chose between the OpenFOAM and the system compiler. I tried both options and ran foamInstallationTest and blockMesh in the cavity tutorial. These are the results:

- When compilerInstall=OpenFOAM and running blockMesh:
blockMesh: /home/jmatthei/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by blockMesh)

and some more errors


-When compilerInstall=System and running foamInstallationtest
Third party software
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
WARNING: gcc version does not match gcc supplied with this release of OpenFOAM
Supplied version: 4.3.1
User version : ../src/configure
4.4.1
Minimum required: 4.2.0

gcc ...figure
WARNING: Conflicting installations:
OpenFOAM settings : /bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR

gzip 1.3.12 /bin/gzip
tar 1.22 /bin/tar
icoFoam 1.5-dev ...penFOAM-1.5-dev/applications/bin/linuxGccDPOpt/icoFoam
-------------------------------------------------------------------------------


Checking networking...
-------------------------------------------------------------------------------
Action Result Crit
-------------------------------------------------------------------------------
Pinging_jmatthei-laptop Successful yes
Pinging_localHost Successful yes
Test_rsh: Unsuccessful_connection_refused* yes
Test_ssh: Unsuccessful_connection_refused* yes
FATAL ERROR: No remote shell available.
OpenFOAM 1.5-dev enviroment requires either ssh and/or rsh.
Contact your system administrator.


-------------------------------------------------------------------------------

The system test has evoked 1 fatal error(s).

The foam installation contains 1 critical error(s).

Review the output for warning messages and consult
the installation guide for trouble shooting.

done.



But in this case I can run blockMesh and other commands. Please note that the critical error about mpi also appears in the first case.


Can someone tell me:
- which version of gcc I best use
- what to do about the second error

ovie June 14, 2010 12:51

[QUOTE=flowris;262921]Hello all,

I am using OpenFOAM-1.5-dev on Ubuntu 9.10 and experiencing similar problems. In the file etc/settings.sh, around line 114, one can chose between the OpenFOAM and the system compiler. I tried both options and ran foamInstallationTest and blockMesh in the cavity tutorial. These are the results:



Hi Flowris

I would stick to the OpenFOAM supplied thirdparty software if running on a local work station.

When you changed between system and OpenFOAM for compiler choice, did you run Allwmake again?

Finally, when I have problems like this, I simply do a fresh install following the instructions. If you have no need to change choice of compilers, please run allwmake on a COMPLETELY new install without messing with the settings in the etc/settings or bashrc files. I am sure it would be fine.

phuchuynh October 15, 2012 02:59

[QUOTE=ovie;262936]
Quote:

Originally Posted by flowris (Post 262921)
Hello all,

I am using OpenFOAM-1.5-dev on Ubuntu 9.10 and experiencing similar problems. In the file etc/settings.sh, around line 114, one can chose between the OpenFOAM and the system compiler. I tried both options and ran foamInstallationTest and blockMesh in the cavity tutorial. These are the results:



Hi Flowris

I would stick to the OpenFOAM supplied thirdparty software if running on a local work station.

When you changed between system and OpenFOAM for compiler choice, did you run Allwmake again?

Finally, when I have problems like this, I simply do a fresh install following the instructions. If you have no need to change choice of compilers, please run allwmake on a COMPLETELY new install without messing with the settings in the etc/settings or bashrc files. I am sure it would be fine.


hi Ovie,

I have the following solutions :
One of these can be resolved by downloading libstdc.so.6.0.9: You can find it at here http://rpmfind.net/linux/rpm2html/search.php?query=%2Fusr%2Flib%2Flibstdc%2B%2B.so.6 .0.13

+ You will then need to place it in /usr/lib64 and link it to the versions being requested :
Code:

chmod 755 libstdc++.so.6.0.13
cp libstdc++.so.6.0.13 /usr/lib/
cd /usr/lib/ unlink libstdc++.so.6
ln -s libstdc++.so.6.0.13
libstdc++.so.6 /sbin/ldconfig

Otherwise,
+ You can export LD_LIBRARY_PATH path of libstdc++so.6.0.13 into your file run.
Hope that it is userful for you.

phuc

yanglu April 19, 2021 19:06

I have the same problem when I am running the ANSYS Forte in the HPC. The error is:
/ansys_inc/v190/reaction/forte.linuxx8664/bin/forte: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /ansys_inc/v190/reaction/forte.linuxx8664/bin/forte)
/ansys_inc/v190/reaction/forte.linuxx8664/bin/forte: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /ansys_inc/v190/reaction/forte.linuxx8664/bin/libKINetics.so)

I tried to solve the problem by downloading the libstdc++.so.6.0.13 to a directory and run the command 'export LD_LIBRARY_PATH= /your/directory/path'. Howeren, the problem is still there. It seems the default directory is /usr/lib64/l. How should I solve this problem? Thanks.


All times are GMT -4. The time now is 10:37.