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: libnetcdf.so.7: 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.

=====configure.wrf===
LIB_EXTERNAL = \
-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 libnetcdf.so.13. So, wrf.exe should use libnetcdf.so.13 not libnetcdf.so.7!

I also checked linked libraries to wrf.exe.
In the main machine:
====================
$ ldd wrf.exe
libnetcdff.so.6 => /opt/netCDF/lib/libnetcdff.so.6 (0x00002b3c00573000)
libnetcdf.so.13 => /opt/netCDF/lib/libnetcdf.so.13 (0x00002b3c00b19000)

libhdf5.so.10 => /opt/HDF5/lib/libhdf5.so.10 (0x00002b3c03ec2000)
libm.so.6 => /lib64/libm.so.6 (0x00002b3c04481000)
libz.so.1 => /lib64/libz.so.1 (0x00002b3c04784000)
libmpifort.so.12 => /opt/intel/impi/2018.1.163/intel64/lib/libmpifort.so.12 (0x00002b3c0499a000)
libmpi.so.12 => /opt/intel/impi/2018.1.163/intel64/lib/libmpi.so.12 (0x00002b3c04d43000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b3c059c9000)
librt.so.1 => /lib64/librt.so.1 (0x00002b3c05bcd000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b3c05dd5000)
libc.so.6 => /lib64/libc.so.6 (0x00002b3c05ff2000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b3c063b5000)
libnetcdf.so.7 => /lib64/libnetcdf.so.7 (0x00002b3c065cb000)
..
====================

In the one of nodes:
====================
ldd wrf.exe
linux-vdso.so.1 => (0x00007ffe75b69000)
libnetcdff.so.6 => /opt/netCDF/lib/libnetcdff.so.6 (0x00002aca531a5000)
libnetcdf.so.13 => /opt/netCDF/lib/libnetcdf.so.13 (0x00002aca5374b000)

libhdf5.so.10 => /opt/HDF5/lib/libhdf5.so.10 (0x00002aca56af4000)
libm.so.6 => /lib64/libm.so.6 (0x00002aca570b5000)
libz.so.1 => /lib64/libz.so.1 (0x00002aca573b8000)
libmpifort.so.12 => /opt/intel/impi/2018.1.163/intel64/lib/libmpifort.so.12 (0x00002aca575ce000)
libmpi.so.12 => /opt/intel/impi/2018.1.163/intel64/lib/libmpi.so.12 (0x00002aca57977000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002aca585fd000)
librt.so.1 => /lib64/librt.so.1 (0x00002aca58801000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aca58a09000)
libc.so.6 => /lib64/libc.so.6 (0x00002aca58c26000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aca58fe9000)
libnetcdf.so.7 => not found
====================


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

Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests