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

**URL:** <https://forums.developer.nvidia.com/t/error-while-loading-shared-libraries-libatomic-so-1/213810>\
**Category:** nvc, nvc++ and nvfortran\
**Created:** [May 9, 2022, 10:54am UTC](https://forums.developer.nvidia.com/t/error-while-loading-shared-libraries-libatomic-so-1/213810 "2022-05-09T10:54:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fw407](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fw407](https://forums.developer.nvidia.com/u/fw407)\
**Post date:** [May 9, 2022, 10:54am UTC](https://forums.developer.nvidia.com/t/error-while-loading-shared-libraries-libatomic-so-1/213810/1 "2022-05-09T10:54:12Z")

</div>

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/](https://centos.org/)”  
> BUG\_REPORT\_URL=“[https://bugs.centos.org/](https://bugs.centos.org/)”  
> CENTOS\_MANTISBT\_PROJECT=“CentOS-8”  
> CENTOS\_MANTISBT\_PROJECT\_VERSION=“8”

Is there a way to fix this?

Thanks,  
Feng

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [May 9, 2022, 8:03pm UTC](https://forums.developer.nvidia.com/t/error-while-loading-shared-libraries-libatomic-so-1/213810/2 "2022-05-09T20:03:52Z")

</div>

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.

[https://linuxize.com/post/how-to-install-gcc-on-centos-8/](https://linuxize.com/post/how-to-install-gcc-on-centos-8/)

-Mat

---

<div class="post-metadata">

**Author:** ![fw407](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fw407](https://forums.developer.nvidia.com/u/fw407)\
**Post date:** [May 9, 2022, 10:27pm UTC](https://forums.developer.nvidia.com/t/error-while-loading-shared-libraries-libatomic-so-1/213810/3 "2022-05-09T22:27:36Z")

</div>

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
