[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #WYA-340873]: how to compile fortran90
- Subject: [netCDF #WYA-340873]: how to compile fortran90
- Date: Tue, 11 Jan 2011 05:39:47 -0700
> Full Name: Yuhong Tian
> Email Address: address@hidden
> Organization: IMSG at NOAA NESDIS
> Package Version: 4.1.2
> Operating System: INTEL
> Hardware:
> Description of problem:
>
> When I compile my fortran 90 code using the following command:
>
> ifort -g -o pres_temp_4D_rd pres_temp_4D_rd.f90
> /disk1/pub/netcdf-4.1.2/lib/libnetcdff.a
> /disk1/pub/netcdf-4.1.2/lib/libnetcdf.a -I/disk1/pub/netcdf-4.1.2/include
> -L/disk1/pub/netcdf-4.1.2/lib -lnetcdf
>
> I got pres_temp_4D_rd file, but when I run it I had the following error:
>
> error while loading shared libraries: libnetcdf.so.0: cannot open shared
> object file: No such file or directory (However, I checked the lib directory,
> I found this file)
>
>
> Then I compiled my code using the following,
>
> ifort -g -o pres_temp_4D_rd pres_temp_4D_rd.f90
> /disk1/pub/netcdf-4.1.2/lib/libnetcdff.a
> /disk1/pub/netcdf-4.1.2/lib/libnetcdf.a -I/disk1/pub/netcdf-4.1.2/include
> -L/disk1/pub/netcdf-4.1.2/lib -lnetcdf -Wl,--rpath=/disk1/pub/netcdf-4.1.2/lib
>
> I got pres_temp_4D_rd file again, but when I run it, I got another error as:
> error while loading shared libraries: libhdf5_hl.so.6: cannot open shared
> object file: No such file or directory
>
> Looks like netcdf lib have to link with hdf5 lib. Do you know how to
> solve this problem?
>
> Thanks very much in advance!
> Yuhong
>
>
> Then I change my compiling command to:
>
>
Howdy Yuhong!
Your email message got cut off unfinished.
NetCDF 4.1.2 is not yet released. So how come you are using it? ;-)
You can use the LD_LIBRARY_PATH to a list of places where shared libraries are
installed. A bunch of help for shared library users can be found here:
http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#using_shared
Good luck!
Ed
Ticket Details
===================
Ticket ID: WYA-340873
Department: Support netCDF
Priority: Critical
Status: Closed