Error with missing glibc

Hi @Yann.Sagon, I get the error

version `GLIBCXX_3.4.26’ not found

which is apparently required by GCC-11.3.0.

Doing

strings /lib64/libstdc++.so.6 | grep LIBCXX

yields

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_DEBUG_MESSAGE_LENGTH
GA+GLIBCXX_ASSERTIONS

Would it be possible to also install GLIBCXX_3.4.26? :grinning:

Cheers,
Imahn

I actually need to correct myself, it seems I need multiple new versions of GLIBCXX_3.4.x?

Failed to execute gpdc: gpdc:
/opt/ebsofts/MATLAB/2021a/sys/os/glnxa64/libstdc++.so.6: version
GLIBCXX_3.4.26 not found (required by
/opt/ebsofts/Qt5/5.15.5-GCC-11.3.0/lib/libQt5Core.so.5)
gpdc: /opt/ebsofts/MATLAB/2021a/sys/os/glnxa64/libstdc++.so.6: version
GLIBCXX_3.4.29 not found (required by
/opt/ebsofts/Qt5/5.15.5-GCC-11.3.0/lib/libQt5Core.so.5)
gpdc: /opt/ebsofts/MATLAB/2021a/sys/os/glnxa64/libstdc++.so.6: version
GLIBCXX_3.4.28 not found (required by
/opt/ebsofts/Qt5/5.15.5-GCC-11.3.0/lib/libQt5Core.so.5)

@Yann.Sagon How can it be that I need multiple versions?

Dear Imahn,

please explain what you try to do?

You probably remember that you recently installed gpdc? Now I try to run gpdc from within Matlab, for which I load the following modules:

module load MATLAB/2021a
module load GCC/11.3.0
module load OpenMPI/4.1.4
module load geopsy/3.4.2

Then in Matlab, I do

gpdc_exec = 'gpdc';

Out of gpdc_exec, I build myself an exec_line and finally I do system(exec_line).

In the Matlab script, a parpool object is created (for parallelization).

The above error I posted then happens inside a parfor loop.

Does this help? Should I share the path to the matlab script?

– Imahn

No I don’t remember and I don’t find anything related to gpdc in our issue tracking. Who installed that for you please?`

Ah! gpdc is related to geopsy? In this case yes I remember.

The issue is: Matlab is a commercial software that we can’t “compile”, we can just install it and it is packed with its own GLIBC library. When you load GCC module after MATLAB module, you override the Matlab GLIBC and it can’t work anymore. Can you try with module MATLAB/2022a?

I’m afraid it won’t be easy to launch MATLAB and geopsy together. Is this a hard requisite or is there other way to proceed?

Ah! gpdc is related to geopsy ? In this case yes I remember.

Yep!

I think using 2022a is a good idea, since now I get less complaints:

The following have been reloaded with a version change:
  1) MATLAB/2021a => MATLAB/2022a

Error using inversion_main
Failed to execute gpdc: gpdc:
/opt/ebsofts/MATLAB/2022a/sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.29' not found (required by
/opt/ebsofts/Qt5/5.15.5-GCC-11.3.0/lib/libQt5Core.so.5)
gpdc: /opt/ebsofts/MATLAB/2022a/sys/os/glnxa64/libstdc++.so.6: version
`CXXABI_1.3.13' not found (required by
/opt/ebsofts/Qt5/5.15.5-GCC-11.3.0/lib/libQt5Core.so.5)
gpdc: /opt/ebsofts/MATLAB/2022a/sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.29' not found (required by
/opt/ebsofts/Qt5/5.15.5-GCC-11.3.0/lib/libQt5Qml.so.5)
gpdc: /opt/ebsofts/MATLAB/2022a/sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.29' not found (required by
/opt/ebsofts/Qt5/5.15.5-GCC-11.3.0/lib/libQt5Network.so.5)

So it’s just a single GLIBCXX_3.4.29 version that is required now (the complaints about CXXABI had also accored before).


What I found online is that people created symbolic links (cf. here e.g.), do you think I should give it a try?

Another thing I was wondering about is whether it makes a difference whether I’d first load GCC, OpenMPI, geopsy and then Matlab? Do you think that could help?

I’m afraid it won’t be easy to launch MATLAB and geopsy together. Is this a hard requisite or is there other way to proceed?

I’m afraid so, yes…

– Imahn

Pleas try the following:

(baobab)-[sagon@login2 ~]$ ml MATLAB/2022a GCC/11.3.0  OpenMPI/4.1.4 geopsy/3.4.2
(baobab)-[sagon@login2 ~]$ LD_PRELOAD="$EBROOTGCCCORE/lib64/libstdc++.so" matlab

Thanks for the answer. Unfortunately, it’s not the solution yet… I use a submit-file, so after all the module loading I put in the LD_PRELOAD, but it doesn’t seem to change anything…

– Imahn

Hello Imahn,

you must specify the full path to the executable that matlab will launch via the UNIX command line interface, which is /opt/ebsofts/geopsy/3.4.2-foss-2022a/bin/gpdc
exec_gpdc = '/opt/ebsofts/geopsy/3.4.2-foss-2022a/bin/gpdc'

(base) (yggdrasil)-[savardg@login1 stationXML]$ which gpdc
/opt/ebsofts/geopsy/3.4.2-foss-2022a/bin/gpdc
(base) (yggdrasil)-[savardg@login1 stationXML]$ /opt/ebsofts/geopsy/3.4.2-foss-2022a/bin/gpdc -h
Usage: gpdc [OPTIONS] [FILES]

  Compute dispersion curves for layered models given through stdin or FILES.
  
  Format for layered models:
    Line 1    <number of layers including half-space for first model>
    Line 2    <thickness (m)> <Vp (m/s)> <Vs (m/s)> <Density (kg/m3)>[ <Qp> <Qs>]
    ....
    Line n    0 <Vp (m/s)> <Vs (m/s)> <Density (kg/m3)>[ <Qp> <Qs>]
    Line n+1  <number of layers including half-space for second model>
    ....
  
  Quality factors are not mandatory. If not specified, pure elastic computation is performed. Any number of models can be given as input.

Gpdc options: [level=0]
  -step <s>                 Step between frequencies (default=1.025 for log scale)
  -n <count>                Number of samples (default=use step to get number of samples)
  -L <n modes>              Number of Love modes (default=0)
  -R <n modes>              Number of Rayleigh modes (default=1)
  -one-mode                 Instead of outputting all modes (see options '-R' and '-L'), output only the highest one.
  -f                        Does not return immediately if dispersion curve cannot be calculated.
  -grid <L | R>             Ouput a grid of the wave solutions (not set by default). The letter L or R stands for Love or Rayleigh.
  -group                    Switches to group slowness (default=phase)
  -s <sampling>             Defines the sampling type:
                              period     regular sampling in period
                              frequency  regular sampling in frequency
                              log        regular sampling in log(frequency) (default)
  -min <min>                Minimum of range for dispersion curve (default=0.2)
  -max <max>                Maximum of range for dispersion curve (default=20)
  -vn <count>               Number of velocity samples (only for -grid, default=100)
  -vmin <min>               Minimum of range for velocity (only for -grid, default=100)
  -vmax <max>               Maximum of range for velocity (only for -grid, default=3000)
  -delta-k                  Computes wavenumber gaps between modes. Number of modes must be at least 2.
  -half-space <index>       Take Vp and Vs from layer index and compute the Rayleigh phase slowness for a half-space with these Vp and Vs.
  
  More options are available. Use '-h all' to display all of them.

Examples:

         gpdc < test.model

  Calculate fundamental Rayleigh dispersion curve from 0.2 Hz to 20 Hz for model 'test.model'.

         gpdc -L 1 -R 2 < test.model

  Calculate fundamental Love mode and fundamental and first higher mode for Rayleigh.

         gpdc < test.model | figue -c

  Calculate the same dispersion curve and plot it.

         gpdc < test.model | figue -c -m dc.mkup

  Show the same dispersion curve on a log-log plot. 'dc.mkup' is a tar.gz file containing an xml description of the graphic format, it can be generated from figue's interface.

See also:
  gpell, gpprofile
  More information at http://www.geopsy.org

Authors:
  Marc Wathelet
  Marc Wathelet (LGIT, Grenoble, France)

As it turned out, I only got the same output after doing

module purge

Thanks @Yann.Sagon and @Genevieve.Savard!

Unfortunately, I was too soon pleased… When doing module purge and then loading all the other modules in bash (from the terminal),

/opt/ebsofts/geopsy/3.4.2-foss-2022a/bin/gpdc -h

works. However, in my submit file from which I launch Matlab (and from one matlab script, I launch gpdc), the above command doesn’t work and I get the same missing modules error as before.

Here’s the path to my submit file on baobab

/home/users/s/shekhza2/ant-migrate/submit_files/run_step_riehen_aargau.sh

@Yann.Sagon Could you please help me investigate? I’m a bit clueless at the moment…

I report that @Yann.Sagon’s solution works. Thank you!

@Genevieve.Savard great!
@Imahn.Shekhzadeh1 working for you too?

Best

Yes, with an export before LD_PRELOAD=[...] it’s working :grinning:

LD_PRELOAD="$EBROOTGCCCORE/lib64/libstdc++.so" matlab

or

export LD_PRELOAD="$EBROOTGCCCORE/lib64/libstdc++.so"
matlab

should work.

1 Like