wiki:cypress/glibc-version-problems

Version 2 (modified by fuji, 18 months ago) ( diff )

glibc version problems

Compute nodes in partitions defq and interactive (as well as login nodes) have Centos version 6.5 with glibc version 2.12.

When you try to run a pre-build software that is built on a newer operating system, you will encounter the error, for example,

$ prefetch
./prefetch: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./prefetch)

Since glibc version on Centos version 6.5 nodes is 2.12, GLIBC_2.14 isn't available. It is possible to run this software if you use the compute nodes in partition centos7, which have Centos version 7.4 with glibc version 2.17. See here for more details.

See the alternate solution below if your software requires a glibc version greater than 2.17.

Work with Singularity Images

Singularity allows you to run an application built for a different distribution of Linux than Cypress OS (Centos 6 or 7). Here we run Rockylinux 9.2 on Cypress using Singularity.

Run Rockylinux Images Interactively

Start an interactive session with centos7 partition.

 idev -t 8 --partition=centos7

Load Singularity module.

 module load singularity/3.9.0

Setup the environmental variables

 source /lustre/project/singularity_images/setup_cypress.sh

Run bash shell in Rockylinux Images,

 singularity shell -s /bin/bash /lustre/project/singularity_images/rockylinux-9.2.sif

You will get a command line prompt. Now the glibc version is 2.34.

Apptainer> ldd --version
ldd (GNU libc) 2.34
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

You can use command line tools as you usually do on Centos6/7 nodes. module command also works but some of the modules may not work because of library incompatibility.

Run Scripts on Rockylinux in Bachjob

An example Slurm script.

#!/bin/bash
#SBATCH --job-name=Singularity # Job Name
#SBATCH --partition=centos7    # Partition must be centos7
#SBATCH --qos=normal           # Quality of Service normal or long
#SBATCH --time=0-01:00:00      # Wall clock time limit in Days-HH:MM:SS
#SBATCH --nodes=1              # Node count required for the job
#SBATCH --ntasks-per-node=1    # Number of tasks to be launched per Node
#SBATCH --cpus-per-task=1     # Number of threads per task (OMP threads 1-20)

# Load Singularity module
module load singularity/3.9.0

# Setup the environmental variables 
SingularityImageDir=/lustre/project/singularity_images
source $SingularityImageDir/setup_cypress.sh

# Run a command on RockyLinux 
singularity exec $SingularityImageDir/rockylinux-9.2.sif gcc --version

The example above runs gcc —version on RockyLinux. Submitting job is the same as you usually do. (See here.) When the job is finished, the log file should contain the output from gcc —version command, which will be:

gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you want to run a bash script, assuming 'my_script.sh' is in the current working directory, modify the above as

singularity run $SingularityImageDir/rockylinux-9.2.sif /bin/bash -l -c ./my_script.sh

'my_script.sh' must be executable. You can make it by 'chmod' command (See here.)

chmod u+x my_script.sh

For example, 'my_script.sh' is

#!/bin/bash
module load intel-psxe/2016
echo "Hello world from $0 running in ${SINGULARITY_NAME}"
pwd
date
icc --version

When the job is finished, the log file will have:

Hello world from ./my_script.sh running in rockylinux-9.2.sif
/home/userid/test
Fri Jun  9 13:21:01 CDT 2023
icc (ICC) 16.0.0 20150815
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

If you find missing packages in rockylinux-9.2.sif, please let us know.

Note: See TracWiki for help on using the wiki.