Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Wed Aug 15, 2018 5:21 am




Post new topic Reply to topic  [ 10 posts ] 

All times are UTC

Author Message
 Post subject: libnetcdf.so.7 error
PostPosted: Sun Feb 03, 2013 6:55 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
I have installed ROMS and netcdf 4.1.3 and have successfully run the Upwelling and Estuary Sediment Test cases. However, recently I started getting an error each time I try to execute ROMS, e.g.,

./oceanS < ocean_estuary_test.in > estuary.out &

Note, I get the same message trying to run the upwelling test now, specifically:

./oceanS error while loading shared libraries: libnetcdf.so.7:
cannot open shared object file: No such file or directory

the file libnetcdf.so.7 does appear in the netcdf/lib path and the size is 18B. Is the file possibly corrupt? Should I replace the file with a copy from my download source code or do I need to reinstall netcdf? Is there another possible cause and/or solution?


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Sun Feb 03, 2013 7:25 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3485
Location: IMS/UAF, USA
I don't know why it would have worked before, but one thing that can happen is that the model will link just fine, but at run time, the shared libraries need to be in directories in your LD_LIBRARY_PATH environment variable. Do you have that environment variable set? Does it include the directory with your netcdf library? The way to set it depends on what shell you are using.


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Sun Feb 03, 2013 9:27 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Thank you Kate. Yes I run the command:

setenv LD_LIBRARY_PATH/$HOME/netcdf/lib


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Mon Feb 04, 2013 5:45 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3485
Location: IMS/UAF, USA
jande023 wrote:
Thank you Kate. Yes I run the command:

setenv LD_LIBRARY_PATH/$HOME/netcdf/lib

You need a space between LD_LIBRARY_PATH and the path that follows. You can check by typing "printenv LD_LIBRARY_PATH" to see that it's set correctly.


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Tue Feb 05, 2013 1:20 am 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Feeling pretty silly. The space did the trick. Thank you.


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Mon Aug 24, 2015 5:07 pm 
Offline

Joined: Tue Aug 04, 2015 4:42 pm
Posts: 13
Location: Universidad Del Mar
i have the same error when i try to run the scrip_test but with libnetcdff.so.6 i have this in my bash_profile:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
export PATH=/opt/subversion/bin:$PATH

export CPPFLAGS="-I/usr/local/hdf5-1.8.13/include -I/usr/local/zlib-1.2.8/include -I/usr/local/netcdf.4.3.2/include"
export LDFLAGS="-L/usr/local/hdf5-1.8.13/lib -L/usr/local/zlib-1.2.8/lib -L/usr/local/netcdf.4.3.2/lib"
export LD_LIBRARY_PATH="/usr/local/hdf5-1.8.13/lib /usr/local/zlib-1.2.8/lib /usr/local/netcdf.4.3.2/lib"

export NETCDF=/usr/local/netcdf.4.3.2
export NETCDF_INCDIR=/usr/local/netcdf.4.3.2/include
export NETCDF_LIBDIR=/usr/local/netcdf.4.3.2/lib

export MCT_INCDIR=/usr/local/include
export MCT_LIBDIR=/usr/local/lib


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Mon Aug 24, 2015 7:45 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3485
Location: IMS/UAF, USA
Quote:
export LD_LIBRARY_PATH="/usr/local/hdf5-1.8.13/lib /usr/local/zlib-1.2.8/lib /usr/local/netcdf.4.3.2/lib"
It's all about the spaces again. In this context, it should be colons instead as in your path:
Quote:
export LD_LIBRARY_PATH="/usr/local/hdf5-1.8.13/lib:/usr/local/zlib-1.2.8/lib:/usr/local/netcdf.4.3.2/lib"


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Wed Aug 26, 2015 3:56 pm 
Offline

Joined: Tue Aug 04, 2015 4:42 pm
Posts: 13
Location: Universidad Del Mar
i did this thaks and i think that this is solved, but when i run scrip_test showme that:

[michel@localhost SCRIP]$ ./scrip_test
&REMAP_INPUTS
FIELD_CHOICE= 2,
INTERP_FILE="rmp_T42_to_POP43_conserv.nc ",
OUTPUT_FILE="out_T42_to_POP43_conserv.nc ",
/
Error in netCDF: No such file or directory


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Wed Aug 26, 2015 4:59 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3485
Location: IMS/UAF, USA
Then this becomes a question for some other forum. Is this scrip for setting up COAWST? Take it to the COAWST forum then. Do you think it has the file it can't find or did you not read the error message?


Top
 Profile  
Reply with quote  
 Post subject: Re: libnetcdf.so.7 error
PostPosted: Sat Jun 10, 2017 3:19 pm 
Offline

Joined: Mon Dec 05, 2011 3:29 pm
Posts: 7
Location: Instituto de oceanolodia(IDO)
Hello everyone,
I have the same issue (error while loading shared libraries libnetcdf.so.7), and I made "export LD_LIBRARY_PATH=/usr/local/lib:$PATH" and the problem still remain.
I'm trying to run in a Rock Cluster.
Grettings


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group