issue with shared library while using nodes

All things involving the setup (compiling, NetCDF, etc.) of the WRF Model itself.

issue with shared library while using nodes

Postby J.Jia » Wed Feb 07, 2018 8:05 pm

Hi all,

I can run wrf.exe in the main machine, but when I try to use nodes, the following error message appears:
"./wrf.exe: error while loading shared libraries: cannot open shared object file: No such file or directory"

Actually, my system has two netcdf libraries and I want to use the netcdf library under /opt.
So, I added this specific path when I configured WRFV3.

-L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf -lnetcdff -lnetcdf -I/opt/netCDF/include -L/opt/netCDF/lib -hdf5_fortran -lhdf5 -I/opt/HDF5/include -L/opt/HDF5/lib -lm -lz

Also, I added the netcdf into my bash file like:
export NETCDF=/opt/netCDF
export PATH=$NETCDF/include:$PATH
export PATH=$NETCDF/bin:$PATH
export LD_LIBRARY_PATH="/opt/netCDF/lib:/opt/intel/compilers_and_libraries/linux/lib/intel64:/opt/HDF5/lib:/opt/intel/impi/2018.1.163/intel64/lib:/opt/intel/lib/intel64:/usr/share/pvm3/lib"

Under /opt/netCDF/lib, I have So, wrf.exe should use not!

I also checked linked libraries to wrf.exe.
In the main machine:
$ ldd wrf.exe => /opt/netCDF/lib/ (0x00002b3c00573000) => /opt/netCDF/lib/ (0x00002b3c00b19000) => /opt/HDF5/lib/ (0x00002b3c03ec2000) => /lib64/ (0x00002b3c04481000) => /lib64/ (0x00002b3c04784000) => /opt/intel/impi/2018.1.163/intel64/lib/ (0x00002b3c0499a000) => /opt/intel/impi/2018.1.163/intel64/lib/ (0x00002b3c04d43000) => /lib64/ (0x00002b3c059c9000) => /lib64/ (0x00002b3c05bcd000) => /lib64/ (0x00002b3c05dd5000) => /lib64/ (0x00002b3c05ff2000) => /lib64/ (0x00002b3c063b5000) => /lib64/ (0x00002b3c065cb000)

In the one of nodes:
ldd wrf.exe => (0x00007ffe75b69000) => /opt/netCDF/lib/ (0x00002aca531a5000) => /opt/netCDF/lib/ (0x00002aca5374b000) => /opt/HDF5/lib/ (0x00002aca56af4000) => /lib64/ (0x00002aca570b5000) => /lib64/ (0x00002aca573b8000) => /opt/intel/impi/2018.1.163/intel64/lib/ (0x00002aca575ce000) => /opt/intel/impi/2018.1.163/intel64/lib/ (0x00002aca57977000) => /lib64/ (0x00002aca585fd000) => /lib64/ (0x00002aca58801000) => /lib64/ (0x00002aca58a09000) => /lib64/ (0x00002aca58c26000) => /lib64/ (0x00002aca58fe9000) => not found

Does anyone has a solution to this problem?
Thanks for your help!
Posts: 1
Joined: Wed Feb 07, 2018 7:45 pm

Re: issue with shared library while using nodes

Postby BHajni » Tue May 29, 2018 2:33 am


It might be a bit late but others could find it useful.

Usually on HPC machines the computing nodes don't have all the libraries since it would be a waste of resources. What you can do is create static libraries of netcdf, grib_api and their related libraries. Then the locations must integrated to the environment variables. Compile and that's it. Static libraries arecompiled into the WRF rather than referencing to shared libraries.

Posts: 35
Joined: Sun Mar 10, 2013 11:50 am

Return to Installation

Who is online

Users browsing this forum: No registered users and 7 guests