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

[netCDF #ZBH-501382]: netcdf-fortran



You shouldn't have had to copy netcdf.inc from anywhere else. During
the "make' for netcdf-fortran, it is supposed to be read from
fortran/netcdf.inc in the sources (where you say you found it), and it
is supposed to be copied to the include/ directory specified by
--prefix as part of "make install", for use when compiling other
Fortran programs that have an "include 'netcdf.inc'" and call netCDF
Fortran functions. The netcdf.inc file doesn't change much between
versions, so it's possible that using a netcdf.inc file from another
version wouldn't cause any problems, but I can't guarantee that. No
one else has reported that problem, as far as I know, and the software
works OK on our test platforms, but if "make check" now works OK for
you, it's probably OK to run "make install" and assume it's probably
OK.

--Russ


> Sorry, I miswrote. By "prefix" where the netcdf.inc was found, I meant the
> include folder within the prefix directory.
> 
> Thank you.
> 
> Regards,
> Jae-Min
> 
> On Thu, Jun 25, 2015 at 9:40 AM, Jae-Min Jo <address@hidden> wrote:
> 
> > Hello Russ,
> >
> > As you have mentioned that netcdf.inc that was in
> > ....../netcdf-fortran-4.4.2/fortran directory could not be found, I looked
> > for it and found it in 2 different places (one in the fortran directory and
> > the other in the prefix of both netcdf-4.3.3.1 and netcdf-fortran-4.4.2). I
> > moved and replaced the one in fortran directory, and the make check for
> > both netcdf-4.3.3.1 and netcdf-fortran-4.4.2 seems to work. Would there be
> > a way of just making the netcdf.inc file go to prefix in the first place?
> > if not, do you think manually placing the netcdf.inc file is a valid
> > or reliable solution?
> >
> > Thank you for your help.
> >
> > Regards,
> > Jae-Min
> >
> > address@hidden> wrote:
> >
> >> > Thank you for your reply. I have located the netcdf.inc in
> >> > /lustre05/vol0/jojchi/Projects/REEMS/netcdf-fortran-4.4.2/fortran/
> >> > directory. I have put this in the LD_LIBRARY_PATH. It's not working yet
> >> but
> >> > I will try along the lines of looking for netcdf.inc and setting
> >> > environment variables appropriately for the fortran compiler.
> >>
> >> Note that LD_LIBRARY_PATH is just a list of directories containing
> >> libraries, not
> >> include files. The CPPFLAGS environment variable contains -I options that
> >> specify include file directories (among other things), so a typo in
> >> CPPFLAGS
> >> would be a more libely place to look for an error leading to a missing
> >> include
> >> file.
> >>
> >> --Russ
> >>
> >> > address@hidden> wrote:
> >> >
> >> > > Jae-Min,
> >> > >
> >> > > > netcdf-fortran-4.4.2 "configure" now worked and "make" worked, but
> >> make
> >> > > > check failed.
> >> > > > Could you take a look at my make check output please?
> >> > >
> >> > > Here's the instructions for building netCDF-Fortran:
> >> > >
> >> > >
> >> http://www.unidata.ucar.edu/netcdf/docs/building_netcdf_fortran.html
> >> > >
> >> > > The error you are seeing seems to indicate that the "netcdf.inc"
> >> > > file is not being found when you run the tests. Or maybe an older
> >> > > netcdf.inc file is being found from a previous installation, for
> >> > > example in /usr/include/netcdf.inc.
> >> > >
> >> > > The fortran/netcdf.inc that comes with netcdf-fortran-4.4.2 has the
> >> > > following statements:
> >> > >
> >> > >       integer nf_char
> >> > >    ...
> >> > >       parameter (nf_char = 2)
> >> > >
> >> > > which declare a type for the nf_char parameter, so any
> >> > > program that has the
> >> > >
> >> > >       include 'netcdf.inc'
> >> > >
> >> > > statement and uses the right compiler directive to tell where to
> >> > > look for the netcdf.inc include file should get the type.
> >> > >
> >> > > So the error you are seeing:
> >> > >
> >> > >    make[2]: Entering directory
> >> > > `/lustre05/vol0/jojchi/Projects/REEMS/netcdf-fortran-4.4.2/nf_test'
> >> > >    gfortran -DHAVE_CONFIG_H -I. -I.. -I../libsrc
> >> > >  -I/lustre05/vol0/jojchi/Projects/REEMS/mpi/include -I../fortran
> >> > >  -I../fortran -g -O2 -c -o test_get.o test_get.F
> >> > >    test_get.F:29.50:
> >> > >
> >> > >             canConvert = (var_type(i) .eq. NF_CHAR) .eqv.
> >> > >                                                   1
> >> > >    Error: Symbol 'nf_char' at (1) has no IMPLICIT type
> >> > >    test_get.F:35.34:
> >> > >
> >> > > means that the gfortran compiler, when running in the fortran/
> >> > > subdirectory,
> >> > > isn't finding the netcdf.inc file where it's specified to be with
> >> > > "-I../fortran".
> >> > > I'm not sure why this error is occurring or how to fix it. The
> >> software
> >> > > compiles
> >> > > fine here on our test platforms, with no errors. Check for the file
> >> > >
> >> > >
> >> > >
> >> /lustre05/vol0/jojchi/Projects/REEMS/netcdf-fortran-4.4.2/fortran/netcdf.inc
> >> > >
> >> > > to make sure it exists and is readable.
> >> > >
> >> > > Possible solutions for the problems you aOther things you might try
> >> that
> >> > > seem
> >> > > unrelated to the error you are seeing might include:
> >> > >
> >> > >   - setting the LD_LIBRARY_PATH environment variable to point to
> >> where the
> >> > > netCDF-C library is installed
> >> > >   - setting environment variables F77 to mpif77 and F90 to mpif90 for
> >> > > supporting parallel I/O from Fortran
> >> > >      or setting F77 and F90 to mpifort if you are using the ifort
> >> compiler
> >> > >
> >> > > --Russ
> >> > >
> >> > > > On Tue, Jun 23, 2015 at 2:18 PM, Jae-Min Jo <address@hidden>
> >> > > wrote:
> >> > > >
> >> > > > > It also says it cant compute sizeof (off_t).
> >> > > > > It says "configure:22367"
> >> > > > > Thank you.
> >> > > > >
> >> > > > > Regards,
> >> > > > > Jae-Min
> >> > > > >
> >> > > > > On Tue, Jun 23, 2015 at 2:04 PM, Jae-Min Jo <address@hidden
> >> >
> >> > > wrote:
> >> > > > >
> >> > > > >> Hello,
> >> > > > >>
> >> > > > >> I am trying to build netcdf-fortran-4.4.2, and the configuration
> >> is
> >> > > not
> >> > > > >> working. I tried to look through the config.log and found that it
> >> > > can't
> >> > > > >> find libnetcdf.so.7, exit number is 77.
> >> > > > >>
> >> > > > >> I have attached the config.log.
> >> > > > >>
> >> > > > >> Thank you.
> >> > > > >>
> >> > > > >> Regards,
> >> > > > >> Jae-Min
> >> > > > >>
> >> > > > >
> >> > > > >
> >> > > >
> >> > > >
> >> > > Russ Rew                                         UCAR Unidata Program
> >> > > address@hidden
> >> http://www.unidata.ucar.edu
> >> > >
> >> > >
> >> > >
> >> > > Ticket Details
> >> > > ===================
> >> > > Ticket ID: ZBH-501382
> >> > > Department: Support netCDF
> >> > > Priority: Normal
> >> > > Status: Closed
> >> > >
> >> > >
> >> >
> >> >
> >>
> >> Russ Rew                                         UCAR Unidata Program
> >> address@hidden                      http://www.unidata.ucar.edu
> >>
> >>
> >>
> >> Ticket Details
> >> ===================
> >> Ticket ID: ZBH-501382
> >> Department: Support netCDF
> >> Priority: Normal
> >> Status: Closed
> >>
> >>
> >
> 
> 

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



Ticket Details
===================
Ticket ID: ZBH-501382
Department: Support netCDF
Priority: Normal
Status: Closed