[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #QGV-335526]: Problem with netcdf and fortran 90



Delphine

> I finally solve my problem by installing hdf5 1.8.5 patch1 and netcdf 4.1.1
> many thanks for your support,

I'm glad you get that combination working, thanks for letting us know.

--Russ

> On 16 Mar 2011, at 23:52, Delphine Deryng wrote:
> 
> > Dear Ruth,
> >
> > I've re-installed all the libraries trying to have them better organized.
> >
> > However, I'm encountering a different problem.
> >
> > I've installed hdf5 1.8.6 and netcdf 4.1.2-beta2.
> >
> > I got 3 errors when I performed make check (results from make check is 
> > attached to this email).
> >
> > Then, I have the following output when I run nc-config --all:
> >
> > This netCDF 4.1.2-beta2 has been built with the following features:
> >
> > --cc        -> icc
> > --cflags    ->  -I/opt/local/include  -I/opt/local/include 
> > -I/opt/local/include -I/opt/local/include
> > --libs      -> -L/opt/local/lib -lnetcdf  -L/opt/local/lib -lhdf5_hl -lhdf5 
> > -L/opt/local/lib -lz -L/opt/local/lib -lcurl -L/opt/local/lib 
> > -L/opt/local/lib -L/opt/local/lib -lidn -lssl -lcrypto -lssl -lcrypto -lz 
> > -lz -lz
> >
> > --cxx       -> icpc
> > --has-c++   -> yes
> >
> > --fc        -> ifort
> > --fflags    -> -g -I/opt/local/include
> > --flibs     -> -L/opt/local/lib -lnetcdff -lnetcdf
> > --has-f77   -> yes
> > --has-f90   -> yes
> >
> > --has-dap   -> yes
> > --has-nc2   -> yes
> > --has-nc4   -> yes
> > --has-hdf5  -> yes
> > --has-hdf4  -> no
> > --has-pnetcdf-> no
> > --has-szlib -> no
> >
> > --prefix    -> /opt/local
> > --includedir-> /opt/local/include
> > --version   -> netCDF 4.1.2-beta2
> >
> > I can now compile my fortran program. However, when I run it I got this 
> > error message:
> >
> > dyld: Symbol not found: _H5P_CLS_DATASET_ACCESS_g
> > Referenced from: /opt/local/lib/libnetcdf.0.dylib
> > Expected in: flat namespace
> > in /opt/local/lib/libnetcdf.0.dylib
> > Trace/BPT trap
> >
> > Please, let me know if you could find out how to solve my problem.
> >
> > I'm using ifort version 12.0
> >
> > Thanks in advance.
> > Delphine
> >
> > <make_check>
> >
> > On 16 Mar 2011, at 00:31, Delphine Deryng wrote:
> >
> >> Dear Ruth,
> >> many thanks for your help. I've made sure to build the library for a 
> >> 64-bit.
> >>
> >> I also corrected the links regarding the //
> >>
> >> However, I've perform a make check and got one error.
> >> I'm attaching the result of this command.
> >>
> >> Could this be the cause of the problem?
> >>
> >> Please, let me know.
> >> Thank you,
> >> Delphine
> >>
> >> <make-check>
> >> On 15 Mar 2011, at 21:19, Unidata netCDF Support wrote:
> >>
> >>> Hi Delphine ,
> >>>
> >>>> I'm trying to compile a fortran code but it seems my netcdf library is
> >>>> not referenced correctly. However, I can't find the reason why. I hope
> >>>> you could help me finding the source of the problem.
> >>>>
> >>>> My environment is Mac OS X 10.6.6.
> >>>> Fortran compiler is ifort 12.0.0
> >>>>
> >>>> I have installed the netcdf 4.1.1 library. See below the results of the
> >>>> command 'nc-config --all'
> >>>>
> >>>> I'm trying to compile a simple code requiring netcdf library. However,
> >>>> I'm getting this error message:
> >>>>
> >>>> Undefined symbols:
> >>>> "_nf_open_", referenced from:
> >>>> _wr4dnc_ in netcdf4d.o
> >>>> ld: symbol(s) not found
> >>>> make: *** [main] Error 1
> >>>
> >>> First, please check that the library was compiled for the same 
> >>> architecture
> >>> as your application program.  A common error on Mac's is to build a 
> >>> library
> >>> for a 64-bit x86_64 architecture and try to link a program compiled for a
> >>> 32-bit i386 architecture with that library (or vice versa).  The result is
> >>> that netCDF library functions won't be found.  You can check what
> >>> architectures your program and library are compiled for with the "file"
> >>> command, as in
> >>>
> >>> $ file /opt/local/lib/netcdff.dylib
> >>> /opt/local/lib/netcdff.dylib:  Mach-O 64-bit dynamically linked shared 
> >>> library x86_64
> >>>
> >>> If your Fortran and C compilers have different defaults for arcitectures,
> >>> you may have to use -m64 or -m32 CFLAGS or FCFLAGS explicitly to make sure
> >>> they match.
> >>>
> >>> That may not be the problem, because I see another possible symptom of
> >>> a problem in the nc-config output you sent:
> >>>
> >>>> --libs -> -L/opt/local/lib -lnetcdf -L/opt/local//lib -lhdf5_hl -lhdf5 
> >>>> -L/opt/local//lib -lz -lm -L/opt/local//lib -lsz -L/opt/local/lib -lcurl 
> >>>> -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -lidn -lssl -lcrypto 
> >>>> -lssl -lcrypto -lz -lz
> >>> ...
> >>>> --flibs -> -L/opt/local/lib -lnetcdf -L/opt/local//lib -lhdf5_hl -lhdf5 
> >>>> -L/opt/local//lib -lz -lm -L/opt/local//lib -lsz -L/opt/local/lib -lcurl 
> >>>> -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -lidn -lssl -lcrypto 
> >>>> -lssl -lcrypto -lz -lz
> >>>
> >>> Both of these have a double slash "//" in some -L options, as in
> >>> "-L/opt/local//lib".  That seems wrong, and may be the result of a typo
> >>> when the library was configured and built, or may be a bug in nc-config,
> >>> but I don't see such a double slash in the --libs or --flibs output of
> >>> the 4.1.1 nc-config here.
> >>>
> >>> Can you check if things work if you change this "//" to "/" in your link
> >>> command?
> >>>
> >>> --Russ
> >>>
> >>>> nc-config --all
> >>>>
> >>>> This netCDF 4.1.1 has been built with the following features:
> >>>>
> >>>> --cc        -> icc
> >>>> --cflags    ->  -I/opt/local/include
> >>>> --libs      -> -L/opt/local/lib -lnetcdf -L/opt/local//lib -lhdf5_hl 
> >>>> -lhdf5  -L/opt/local//lib -lz -lm  -L/opt/local//lib -lsz  
> >>>> -L/opt/local/lib -lcurl -L/opt/local/lib -L/opt/local/lib 
> >>>> -L/opt/local/lib -lidn -lssl -lcrypto -lssl -lcrypto -lz -lz
> >>>>
> >>>> --cxx       -> icpc
> >>>> --has-c++   -> yes
> >>>>
> >>>> --fc        -> ifort
> >>>> --fflags    -> -g -I/opt/local/include
> >>>> --flibs     -> -L/opt/local/lib -lnetcdf -L/opt/local//lib -lhdf5_hl 
> >>>> -lhdf5  -L/opt/local//lib -lz -lm  -L/opt/local//lib -lsz  
> >>>> -L/opt/local/lib -lcurl -L/opt/local/lib -L/opt/local/lib 
> >>>> -L/opt/local/lib -lidn -lssl -lcrypto -lssl -lcrypto -lz -lz
> >>>> --has-f77   -> yes
> >>>> --has-f90   -> yes
> >>>>
> >>>> --has-dap   -> yes
> >>>> --has-nc2   -> yes
> >>>> --has-nc4   -> yes
> >>>> --has-hdf5  -> yes
> >>>> --has-hdf4  -> no
> >>>> --has-szlib -> yes
> >>>>
> >>>> --prefix    -> /opt/local
> >>>> --includedir-> /opt/local/include
> >>>> --version   -> netCDF 4.1.1
> >>>>
> >>>>
> >>>
> >>> Russ Rew                                         UCAR Unidata Program
> >>> address@hidden                      http://www.unidata.ucar.edu
> >>>
> >>>
> >>>
> >>> Ticket Details
> >>> ===================
> >>> Ticket ID: QGV-335526
> >>> Department: Support netCDF
> >>> Priority: Normal
> >>> Status: Closed
> >>>
> >>
> >
> 
> 

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: QGV-335526
Department: Support netCDF
Priority: Normal
Status: Closed