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

[netCDF #BHW-570052]: Problem with NF90_CREATE



> That seems to be a step in the right direction.  I am now getting a whole 
> mess of new errors that seem to be thrown by the module itself:
> 
> /opt/intel/Compiler/11.1/064/bin/intel64/ifort  -O1  -convert big_endian -I 
> /home/mbueti/netcdf/include/  -o windonly MAIN.o windsubs.o -L 
> /home/mbueti/netcdf/lib -lnetcdf
> /home/mbueti/netcdf/lib/libnetcdf.a(netcdf.o): In function 
> `nf90_put_var_text':
> /home/mbueti/netcdf-4.1.1/f90/netcdf_text_variables.f90:18: undefined 
> reference to `nf_put_vars_text_'
> /home/mbueti/netcdf/lib/libnetcdf.a(netcdf.o): In function 
> `nf90_put_var_1d_eightbyteint':
> /home/mbueti/netcdf-4.1.1/f90/netcdf_eightbyte.f90:25: undefined reference to 
> `nf_put_varm_int_'
> /home/mbueti/netcdf-4.1.1/f90/netcdf_eightbyte.f90:28: undefined reference to 
> `nf_put_vars_int_'
> /home/mbueti/netcdf-4.1.1/f90/netcdf_eightbyte.f90:31: undefined reference to 
> `nf_put_vara_int_'
> /home/mbueti/netcdf/lib/libnetcdf.a(netcdf.o): In function `nf90_inq_libvers':
> /home/mbueti/netcdf-4.1.1/f90/netcdf_file.f90:5: undefined reference to 
> `nf_inq_libvers_'

It looks like the f90 API is in your library, but not the f77 API it calls.  
Did you 
configure and build in some way that excluded the f77 API, such as by 
specifying both
--disable-f77 and --enable-f90?  I didn't think the configure script would 
permit 
that, but if it does, that won't work  The f90 API requires the f77 API also.

Another possibility is that you have specified --enable-shared or 
--enable-separate-fortran,
when configuring, in which case an extra library named "netcdff" would have to 
be used to 
link, as in

  /opt/intel/Compiler/11.1/064/bin/intel64/ifort  -O1  -convert big_endian -I 
/home/mbueti/netcdf/include/ -o windonly MAIN.o windsubs.o -L 
/home/mbueti/netcdf/lib -lnetcdf -lnetcdff

It might be easiest to try adding "-lnetcdff" at the end of your link line 
first, to see
if that works.  If not, please make sure you don't have any old versions of 
netCDF installed
as shared libraries that might by searched before the new library you have 
installed.

--Russ

> /home/mbueti/netcdf-4.1.1/f90/netcdf_expanded.f90:2636: undefined reference 
> to `nf_get_vars_double_'
> /home/mbueti/netcdf-4.1.1/f90/netcdf_expanded.f90:2639: undefined reference 
> to `nf_get_vara_double_'
> make: *** [windonly] Error 1
> 
> 
> On Oct 14, 2010, at 1:32 PM, Unidata netCDF Support wrote:
> 
> > Hi Mike,
> >
> >> I am trying to create a fresh netCDF archive using the FORTRAN interface 
> >> and am receiving the following error upon compilation:
> >>
> >> windsubs.f:(.text+0x2098): undefined reference to `netcdf_mp_nf90_create_'
> >>
> >> Arising from the method call:
> >>
> >> status = NF90_CREATE(path = "foo.nc",
> >> &         cmode = NF90_CLOBBER, ncid = ncid)
> >>
> >>
> >> I have included a 'USE netcdf' call at the top of my subroutine, that 
> >> seems to be loading the module properly.
> >>
> >> The fortran code is being compiled with the following flags:
> >>
> >> /opt/intel/Compiler/11.1/064/bin/intel64/ifort  -O1  -convert big_endian 
> >> -I /home/mbueti/netcdf/include/ -L /home/mbueti/netcdf/lib -lnetcdf -o 
> >> windonly MAIN.o windsubs.o
> >
> > I think you need to change the order of your arguments so that the library
> > is searched after the object files:
> >
> >  /opt/intel/Compiler/11.1/064/bin/intel64/ifort  -O1  -convert big_endian 
> > -I /home/mbueti/netcdf/include/ -o windonly MAIN.o windsubs.o -L 
> > /home/mbueti/netcdf/lib -lnetcdf
> >
> > --Russ
> >
> >
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: BHW-570052
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> 
> 

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



Ticket Details
===================
Ticket ID: BHW-570052
Department: Support netCDF
Priority: Normal
Status: Closed