An error reported by the nvfortran compiler

Dear members,

I tried to run a fortran program compiled by Nvfortran in the NVIDIA HPC SDK on ubuntu. An error was reported as follows:

./a.out: error while loading shared libraries: libnvhpcatm.so: cannot open shared object file: No such file or directory.

How can it be fixed?

Thank you very much for your help!

Regards,

Jingbo

Hi Jingbo,

You most likely need to add the path to the compiler runtime libraries to you LD_LIBRARY_PATH environment variable. Something like:

export LD_LIBRARY_PATH=/opt/nv/Linux_x86_64/20.9/compilers/lib/:$LD_LIBRARY_PATH

Please adjust the path to match the compiler version you’re using and the base directory where you have the compilers installed. If you don’t already have LD_LIBRARY_PATH set, you can remove the “:$LD_LIBRARY_PATH”. Also, if you’re using csh instead of bash, replace “export” with “setenv” and replace the “=” with a space.

-Mat