Error while loading shared libraries

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
ryansmith
Posts: 2
Joined: Tue Dec 16, 2008 9:50 pm
Location: University of Southern California

Error while loading shared libraries

#1 Unread post by ryansmith »

I am new to ROMS and am trying to get it up and running on my linux box.
I downloaded and installed all the libraries; zlib, hdf5 and netCDF4.
I am using the gfortran compiler.
Running "make" in the ROMS home directory seems to work fine and produces the oceanS application. However, when I try to execute oceanS I get the following error

ryan@Gnomeputer:/media/sdb1/ROMS3$ sudo ./oceanS < /media/sdb1/ROMS3/ROMS/External/ocean_upwelling.in > test1.log
./oceanS: error while loading shared libraries: libhdf5_hl.so.0: cannot open shared object file: No such file or directory

The file "libhdf5_hl.so.0" exists and is in the lib folder of hdf5. I tried changing LD_LIBRARY path but get the same error.

Any suggestions???

Thanks,
Ryan

feroda

Re: Error while loading shared libraries

#2 Unread post by feroda »

ryansmith wrote: I am using the gfortran compiler.
./oceanS: error while loading shared libraries: libhdf5_hl.so.0: cannot open shared object file: No such file or directory

The file "libhdf5_hl.so.0" exists and is in the lib folder of hdf5. I tried changing LD_LIBRARY path but get the same error.
Ryan
I think you are quite near from the right way.
Firstly, $ vim /home/ryan/.bashrc
add
LD_LIBRARY_PATH=/usr/local/hdf5/lib
export LD_LIBRARY_PATH
at the end of the file.
:wq
$source .bashrc
$./oceanS < /media/sdb1/ROMS3/ROMS/External/ocean_upwelling.in > test1.log
It should work.
If not, please
try to use the ifort compiler to reset the NETCDF-4 and run makefile.

I have met the same problem, and I fixed it by using the first method.
Please let me know if it works for you.

ryansmith
Posts: 2
Joined: Tue Dec 16, 2008 9:50 pm
Location: University of Southern California

Re: Error while loading shared libraries

#3 Unread post by ryansmith »

Thank you very much for your comment. I ended up just copying the library to /usr/lib and it worked just fine.
I will also try your solution for a more robust fix.
Ryan

soeyanto
Posts: 2
Joined: Tue Nov 09, 2010 3:44 pm
Location: Ehime University

Re: Error while loading shared libraries

#4 Unread post by soeyanto »

hello,
I am new in ROMS, just trying to compile for upwelling case. Compiling for ./OceanG is succsess but why when i run some error come, i.e:

Code: Select all

-----
[endros@pop4 roms]$ ./oceanG < ROMS/External/ocean_upwelling.in 
./oceanG: error while loading shared libraries: libhdf5_hl.so.6: cannot open shared object file: No such file or directory
-----
I have modify .bashrc file following as suggesting by feroda.
Anyone can help me?

Soeyanto

machaielder
Posts: 43
Joined: Wed Mar 18, 2015 3:40 pm
Location: Universidade Federal Fluminense

Re: Error while loading shared libraries

#5 Unread post by machaielder »

hello Soeyanto ..did you manage to solve the problem...I am having the same problem now

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Error while loading shared libraries

#6 Unread post by kate »

I think you are quite near from the right way.
Firstly, $ vim /home/ryan/.bashrc
add
export LD_LIBRARY_PATH=/usr/local/hdf5/lib
at the end of the file.
Yes, it's something like this, unless you are on a Mac in which case you want:

Code: Select all

export DYLD_LIBRARY_PATH=someValue

machaielder
Posts: 43
Joined: Wed Mar 18, 2015 3:40 pm
Location: Universidade Federal Fluminense

Re: Error while loading shared libraries

#7 Unread post by machaielder »

hello Kate I am using ubuntu. whe do I type that command

machaielder
Posts: 43
Joined: Wed Mar 18, 2015 3:40 pm
Location: Universidade Federal Fluminense

Re: Error while loading shared libraries

#8 Unread post by machaielder »

I tried the option you gave but the error persists...thanks Kate

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Error while loading shared libraries

#9 Unread post by kate »

You type this:

Code: Select all

export LD_LIBRARY_PATH=/usr/local/hdf5/lib
but with the path to your hdf libraries. You can type it in your shell window and/or in your .bashrc, assuming you are using bash. Are you using bash? You put it in the shell window for this session, in your .bashrc for all your future session.

machaielder
Posts: 43
Joined: Wed Mar 18, 2015 3:40 pm
Location: Universidade Federal Fluminense

Re: Error while loading shared libraries

#10 Unread post by machaielder »

I Kate it seams to work..here is a new problem
root@dell-Inspiron-N5110:/home/dell/Roms/projects/upwelling# ./oceanS <ocean_upwelling.in

Model Input Parameters: ROMS/TOMS version 3.7
Saturday - April 18, 2015 - 7:46:19 AM
-----------------------------------------------------------------------------

MOD_NCPARAM - Unable to open variable information file:
../External/varinfo.dat
Default file is located in source directory.
root@dell-Inspiron-N5110:/home/dell/Roms/projects/upwelling#

machaielder
Posts: 43
Joined: Wed Mar 18, 2015 3:40 pm
Location: Universidade Federal Fluminense

Re: Error while loading shared libraries

#11 Unread post by machaielder »

solved using viewtopic.php?f=31&t=1

now I get the following error
root@dell-Inspiron-N5110:/home/dell/Roms/projects/upwelling# ./oceanS <ocean_upwelling.in

Model Input Parameters: ROMS/TOMS version 3.7
Saturday - April 18, 2015 - 8:05:48 AM
-----------------------------------------------------------------------------

Wind-Driven Upwelling/Downwelling over a Periodic Channel

Operating system : Linux
CPU/hardware : x86_64
Compiler system : gfortran
Compiler command : /usr/bin/gfortran
Compiler flags : -frepack-arrays -O3 -ffast-math -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none

SVN Root URL : https://www.myroms.org/svn/src/trunk
SVN Revision : Unversioned directory

Local Root : /home/dell/Roms/trunk
Header Dir : /home/dell/Roms/projects/upwelling
Header file : upwelling.h
Analytical Dir: /home/dell/Roms/projects/upwelling

Resolution, Grid 01: 0041x0080x016, Parallel Threads: 1, Tiling: 003x003


Physical Parameters, Grid: 01
=============================

288 ntimes Number of timesteps for 3-D equations.
300.000 dt Timestep size (s) for 3-D equations.
30 ndtfast Number of timesteps for 2-D equations between
each 3D timestep.
1 ERstr Starting ensemble/perturbation run number.
1 ERend Ending ensemble/perturbation run number.
0 nrrec Number of restart records to read from disk.
T LcycleRST Switch to recycle time-records in restart file.
72 nRST Number of timesteps between the writing of data
into restart fields.
1 ninfo Number of timesteps between print of information
to standard output.
T ldefout Switch to create a new output NetCDF file(s).
72 nHIS Number of timesteps between the writing fields
into history file.
F LuvSponge Turning OFF sponge on horizontal momentum.
F LtracerSponge(01) Turning OFF sponge on tracer 01: temp
F LtracerSponge(02) Turning OFF sponge on tracer 02: salt
1.0000E-06 Akt_bak(01) Background vertical mixing coefficient (m2/s)
for tracer 01: temp
1.0000E-06 Akt_bak(02) Background vertical mixing coefficient (m2/s)
for tracer 02: salt
1.0000E-05 Akv_bak Background vertical mixing coefficient (m2/s)
for momentum.
3.0000E-04 rdrg Linear bottom drag coefficient (m/s).
3.0000E-03 rdrg2 Quadratic bottom drag coefficient.
2.0000E-02 Zob Bottom roughness (m).
2 Vtransform S-coordinate transformation equation.
4 Vstretching S-coordinate stretching function.
3.0000E+00 theta_s S-coordinate surface control parameter.
0.0000E+00 theta_b S-coordinate bottom control parameter.
25.000 Tcline S-coordinate surface/bottom layer width (m) used
in vertical coordinate stretching.
1025.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
0.000 dstart Time-stamp assigned to model initialization (days).
0.00 time_ref Reference time for units attribute (yyyymmdd.dd)
0.0000E+00 Tnudg(01) Nudging/relaxation time scale (days)
for tracer 01: temp
0.0000E+00 Tnudg(02) Nudging/relaxation time scale (days)
for tracer 02: salt
0.0000E+00 Znudg Nudging/relaxation time scale (days)
for free-surface.
0.0000E+00 M2nudg Nudging/relaxation time scale (days)
for 2D momentum.
0.0000E+00 M3nudg Nudging/relaxation time scale (days)
for 3D momentum.
0.0000E+00 obcfac Factor between passive and active
open boundary conditions.
F VolCons(1) NLM western edge boundary volume conservation.
F VolCons(2) NLM southern edge boundary volume conservation.
F VolCons(3) NLM eastern edge boundary volume conservation.
F VolCons(4) NLM northern edge boundary volume conservation.
14.000 T0 Background potential temperature (C) constant.
35.000 S0 Background salinity (PSU) constant.
1027.000 R0 Background density (kg/m3) used in linear Equation
of State.
1.7000E-04 Tcoef Thermal expansion coefficient (1/Celsius).
7.6000E-04 Scoef Saline contraction coefficient (1/PSU).
1.000 gamma2 Slipperiness variable: free-slip (1.0) or
no-slip (-1.0).
F LuvSrc Turning OFF momentum point Sources/Sinks.
F LwSrc Turning OFF volume influx point Sources/Sinks.
F LtracerSrc(01) Turning OFF point Sources/Sinks on tracer 01: temp
F LtracerSrc(02) Turning OFF point Sources/Sinks on tracer 02: salt
F LsshCLM Turning OFF processing of SSH climatology.
F Lm2CLM Turning OFF processing of 2D momentum climatology.
F Lm3CLM Turning OFF processing of 3D momentum climatology.
F LtracerCLM(01) Turning OFF processing of climatology tracer 01: temp
F LtracerCLM(02) Turning OFF processing of climatology tracer 02: salt
F LnudgeM2CLM Turning OFF nudging of 2D momentum climatology.
F LnudgeM3CLM Turning OFF nudging of 3D momentum climatology.
F LnudgeTCLM(01) Turning OFF nudging of climatology tracer 01: temp
F LnudgeTCLM(02) Turning OFF nudging of climatology tracer 02: salt
T Hout(idFsur) Write out free-surface.
T Hout(idUbar) Write out 2D U-momentum component.
T Hout(idVbar) Write out 2D V-momentum component.
T Hout(idUvel) Write out 3D U-momentum component.
T Hout(idVvel) Write out 3D V-momentum component.
T Hout(idWvel) Write out W-momentum component.
T Hout(idOvel) Write out omega vertical velocity.
T Hout(idTvar) Write out tracer 01: temp
T Hout(idTvar) Write out tracer 02: salt
T Hout(idDano) Write out density anomaly.

Output/Input Files:

Output Restart File: ocean_rst.nc
Output History File: ocean_his.nc

Tile partition information for Grid 01: 0041x0080x0016 tiling: 003x003

tile Istr Iend Jstr Jend Npts

0 1 14 1 27 6048
1 15 28 1 27 6048
2 29 41 1 27 5616
3 1 14 28 54 6048
4 15 28 28 54 6048
5 29 41 28 54 5616
6 1 14 55 80 5824
7 15 28 55 80 5824
8 29 41 55 80 5408

Tile minimum and maximum fractional coordinates for Grid 01:
(interior points only)

tile Xmin Xmax Ymin Ymax grid

0 -1.50 43.50 0.50 82.50 RHO-points
1 -2.50 43.50 0.50 82.50 RHO-points
2 -2.50 42.50 0.50 82.50 RHO-points
3 -1.50 43.50 -0.50 82.50 RHO-points
4 -2.50 43.50 -0.50 82.50 RHO-points
5 -2.50 42.50 -0.50 82.50 RHO-points
6 -1.50 43.50 -0.50 81.50 RHO-points
7 -2.50 43.50 -0.50 81.50 RHO-points
8 -2.50 42.50 -0.50 81.50 RHO-points

0 -2.00 43.50 0.50 82.50 U-points
1 -2.50 43.50 0.50 82.50 U-points
2 -2.50 42.00 0.50 82.50 U-points
3 -2.00 43.50 -0.50 82.50 U-points
4 -2.50 43.50 -0.50 82.50 U-points
5 -2.50 42.00 -0.50 82.50 U-points
6 -2.00 43.50 -0.50 81.50 U-points
7 -2.50 43.50 -0.50 81.50 U-points
8 -2.50 42.00 -0.50 81.50 U-points

0 -1.50 43.50 0.00 82.50 V-points
1 -2.50 43.50 0.00 82.50 V-points
2 -2.50 42.50 0.00 82.50 V-points
3 -1.50 43.50 -0.50 82.50 V-points
4 -2.50 43.50 -0.50 82.50 V-points
5 -2.50 42.50 -0.50 82.50 V-points
6 -1.50 43.50 -0.50 81.00 V-points
7 -2.50 43.50 -0.50 81.00 V-points
8 -2.50 42.50 -0.50 81.00 V-points

Lateral Boundary Conditions: NLM
============================

Variable Grid West Edge South Edge East Edge North Edge
--------- ---- ---------- ---------- ---------- ----------

zeta 1 Periodic Closed Periodic Closed

ubar 1 Periodic Closed Periodic Closed

vbar 1 Periodic Closed Periodic Closed

u 1 Periodic Closed Periodic Closed

v 1 Periodic Closed Periodic Closed

temp 1 Periodic Closed Periodic Closed

salt 1 Periodic Closed Periodic Closed

Activated C-preprocessing Options:

UPWELLING Wind-Driven Upwelling/Downwelling over a Periodic Channel
ANA_BSFLUX Analytical kinematic bottom salinity flux.
ANA_BTFLUX Analytical kinematic bottom temperature flux.
ANA_GRID Analytical grid set-up.
ANA_INITIAL Analytical initial conditions.
ANA_SMFLUX Analytical kinematic surface momentum flux.
ANA_SSFLUX Analytical kinematic surface salinity flux.
ANA_STFLUX Analytical kinematic surface temperature flux.
ANA_VMIX Analytical vertical mixing coefficients.
ASSUMED_SHAPE Using assumed-shape arrays.
DJ_GRADPS Parabolic Splines density Jacobian (Shchepetkin, 2002).
DOUBLE_PRECISION Double precision arithmetic.
NONLINEAR Nonlinear Model.
!NONLIN_EOS Linear Equation of State for seawater.
POWER_LAW Power-law shape time-averaging barotropic filter.
PROFILE Time profiling activated .
!RST_SINGLE Double precision fields in restart NetCDF file.
SALINITY Using salinity.
SOLVE3D Solving 3D Primitive Equations.
SPLINES Conservative parabolic spline reconstruction.
TS_C4HADVECTION Fourth-order centered horizontal advection of tracers.
TS_C4VADVECTION Fourth-order centered vertical advection of tracers.
UV_ADV Advection of momentum.
UV_COR Coriolis term.
UV_U3HADVECTION Third-order upstream horizontal advection of 3D momentum.
UV_C4VADVECTION Fourth-order centered vertical advection of momentum.
VAR_RHO_2D Variable density barotropic mode.

CHECKDEFS - no bottom stress formulation is selected.

Elapsed CPU time (seconds):


ROMS/TOMS - Output NetCDF summary for Grid 01:

ROMS/TOMS - Configuration error ..... exit_flag: 5


ERROR: Illegal model configuration.
root@dell-Inspiron-N5110:/home/dell/Roms/projects/upwelling#

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Error while loading shared libraries

#12 Unread post by kate »

You don't need to post things twice...

Post Reply