Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Netcdf shared library issue in AWS

GEMSS3D
Beginner
1,285 Views

Hi,

I recently moved my Fortran codes to AWS and I am using oneAPI latest unix version. I am using visual code to work with the code. I also got the appropriate netcdf libraries compiled and developed for AWS. I compiled and linked all object files with netcdf libraries and got the executable successfully.

However, got the following error when I tried to run the executable.

./COSIMModelRLS_v1.exe: error while loading shared libraries: libnetcdf.so.13: cannot open shared object file: No such file or directory.

All the netcdf libraries are in the same directory where I have all the codes and related object files.

The following files related to netcdf are loaded into the same project folder.

libnetcdf.a, libnetcdf.la, libnetcdf.settings, libnetcdf.so, libnetcdf.so.13, libnetcdf.so.13.1.1, libnetcdff.a, libnetcdff.la, libnetcdff.so, libnetcdff.so.5, libnetcdff.so.5.3.1 

I am not able to find solution to fix this error. I checked online and could not find the appropriate fix for my problem.

Can you please suggest a way to fix this problem?

Thanks

Venkat

 

0 Kudos
1 Solution
TobiasK
Moderator
1,213 Views

Hi @GEMSS3D 
could you please try to set:

export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH

 

View solution in original post

2 Replies
TobiasK
Moderator
1,214 Views

Hi @GEMSS3D 
could you please try to set:

export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH

 

GEMSS3D
Beginner
1,199 Views

Thank you, TobiasK for your suggestion.

usr/lib was missing and included that using the export statement you suggested after checking the current library path using the echo statement.

I used this statement:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"

and I am now able to run the model.

 

Thanks

GEMSS3D (Venkat)

0 Kudos
Reply