Error while loading shared libraries: libatomic.so.1:

Hello,

I have been developing my code in my local workstation using the hpc_sdk 22.3 and everything was fine. Now I am trying to compile my code in a cluster as they have a few nice Nvidia GPUs, but I have the following error when I compile the code:

~/nvidia_hpc_sdk/Linux_x86_64/22.3/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpicxx: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

The system information of the cluster when I run "cat /etc/os-release"is:

NAME=“CentOS Linux”
VERSION=“8”
ID=“centos”
ID_LIKE=“rhel fedora”
VERSION_ID=“8”
PLATFORM_ID=“platform:el8”
PRETTY_NAME=“CentOS Linux 8”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:centos:centos:8”
HOME_URL=“https://centos.org/
BUG_REPORT_URL=“https://bugs.centos.org/
CENTOS_MANTISBT_PROJECT=“CentOS-8”
CENTOS_MANTISBT_PROJECT_VERSION=“8”

Is there a way to fix this?

Thanks,
Feng

Hi Feng,

“libatomic.so” should be installed with you’re GNU system libraries. Looking at a CentOS 8 system here, I see it in the “/lib/gcc/x86_64-redhat-linux/8/” directory.

Not sure why the loader doesn’t have it your default path, but you can set the environment variable “LD_LIBRARY_PATH” to include this directory (or where it’s actually located) so the loaded can find it.

Another possibility is that this system doesn’t have the GNU development tools and libraries installed. In which case, you’ll need to install them. A quick web search I found this page with instructions. No idea if it’s correct, so you may need to do your own search if it’s not.

-Mat

Hi Mat,

Thanks for your reply. Then it is a issue of the cluster, which I have no permission to install stuff. I will contact the support team and see if this can be resolved.

Thanks,
Feng