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

[netCDF #ZAP-332278]: support-netcdf@unidata.ucar.edu



Kamal,

> I tried again to install the netcdf fortran with LD_LIBRARY_PATH and it
> got installed without any problem , Now I have my netcdf.mod file .
> 
> 
> When I tried to launch my code with the libraries I got this error
> 
> Warning: DO loop at (1) will be executed zero times
> /usr/local/bin/mpif90  -cpp -c -O3 -mcmodel=medium
> -I/home/kamal/local_lib/include/  ./program/velocity.f90
> /tmp/ccHrH1bL.s: Assembler messages:
> /tmp/ccHrH1bL.s:2136: Warning: ignoring incorrect section type for .lbss
> /usr/local/bin/mpif90  -cpp -c -O3 -mcmodel=medium
> -I/home/kamal/local_lib/include/  ./program/io.f90
> /tmp/ccFgURN3.s: Assembler messages:
> /tmp/ccFgURN3.s:4784: Warning: ignoring incorrect section type for .lbss
> /usr/local/bin/mpif90  -cpp -c -O3 -mcmodel=medium
> -I/home/kamal/local_lib/include/  ./program/main.f90
> /usr/local/bin/mpif90  -o ./main.out main.o disturbance.o ibm.o io.o
> meshs.o mpi.o parameters.o puff.o timestep.o transform.o variables.o
> velocity.o -L/home/kamal/local_lib/lib/ cheby.o -lfftw3 -llapack -lblas
> -lnetcdf -lcurl
> io.o: In function `__io_MOD_io_save_coll':
> io.f90:(.text+0x21b0): undefined reference to
> `__netcdf_MOD_nf90_put_var_2d_eightbytereal'
> io.f90:(.text+0x2258): undefined reference to
> `__netcdf_MOD_nf90_put_var_2d_eightbytereal'
> io.o: In function `__io_MOD_io_define_coll':
> io.f90:(.text+0x232e): undefined reference to
> `__netcdf_MOD_nf90_def_var_manydims'
> io.f90:(.text+0x2349): undefined reference to
> `__netcdf_MOD_nf90_put_att_one_fourbyteint'
> io.f90:(.text+0x2364): undefined reference to
> `__netcdf_MOD_nf90_put_att_one_fourbyteint'
> io.o: In function `__io_MOD_io_save_velbc':

In your Mkaefile, I see you have:

  LIBS            = -L/home/kamal/local_lib/lib/ \
                    cheby.o -lfftw3 -llapack -lblas -lnetcdf -lcurl

Try inserting "-lnetcdff" before "-lnetcdf" to make sure the netCDF Fortran
library is searched before the netCDF C library by the linker.

--Russ

> and so on ..
> 
> I have attached the out put of my code as well as my makefile
> 
> Thank you .
> 
> 
> 
> On 13/12/2013 14:42, Unidata netCDF Support wrote:
> > Kamal,
> >
> >> I reinstalled Netcdf library with mpicc and it went sucessfully
> >>
> >> then I tried to install Fortran library with mpif90
> >> along with CFLAGS = - Dgfortran
> >>
> >>
> >> I am getting the same error as before when I do Make Check.
> >
> > Please send the "config.log" file created by the netcdf-fortran
> > configure script that you ran before invoking "make check".
> >
> > Also, note that if you are installing the netCDF C library in
> > a directory not searched by default, you will need to set the
> > LD_LIBRARY_PATH environment variable before building the netCDF
> > Fortran library, as instructed here:
> >
> >    http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html
> >
> > --Russ
> >
> >>
> >> collect2: ld returned 1 exit status
> >> make[2]: *** [nf_test] Error 1
> >> make[2]: Leaving directory
> >> `/home/kamal/local_lib/source/netcdf-fortran-4.2/nf_test'
> >> make[1]: *** [check-am] Error 2
> >> make[1]: Leaving directory
> >> `/home/kamal/local_lib/source/netcdf-fortran-4.2/nf_test'
> >> make: *** [check-recursive] Error 1
> >>
> >> could you please help me fix this.
> >>
> >>
> >>
> >> Thank you.
> >>
> >> Kamal
> >>
> >>
> >>
> >> address@hidden> wrote:
> >>
> >>> Hi Kamal,
> >>>
> >>>> I Installed the C libraries of NetCDF along with zlib and HDF5 which was
> >>>> successful.
> >>>> Later I tried to Install Fortran libraries to get 'netcdf.mod' so I did
> >>>>
> >>>> make distclean
> >>>> CXX=""
> >>>> FC=/usr/local/bin/mpif90
> >>>> FFLAGS='-mcmodel=medium'
> >>>>
> >>>> export CXX FC FFLAGS
> >>>>
> >>>>
> >>>> CPPFLAGS=-I/home/kamal/local_lib/include
> >>>> LDFLAGS=-L/home/kamal/local_lib/lib ./configure
> >>>> --prefix=/home/kamal/local_lib
> >>>>
> >>>> make
> >>>> make check
> >>>>
> >>>>
> >>>> but I get error saying ' undefined reference to `nf_create_' and many
> >>>> more, I have attached OUT file to this mail.
> >>>>
> >>>>
> >>>> when I run the same command with gfortran complier it gets installed
> >>>> successfully.
> >>> I think you must use mpicc to build the netCDF library if you are
> >>> going to use mpif90 for the Fortran library.
> >>>
> >>> Also, if you are building with parallel I/O using wrappers such as
> >>> mpicc and mpif90, you sometimes have to set CFLAGS to indicate which
> >>> Fortran compiler is wrapped by mpif90. For example, if "mpicc --show"
> >>> and "mpif90 --show" indicate gcc and gfortran are being used, then
> >>> set
> >>>
> >>>    CFLAGS=-DgFortran
> >>>
> >>> and similarly set
> >>>
> >>>    CFLAGS=-DpgiFortran
> >>>
> >>> for Portland Group compilers.
> >>>
> >>> --Russ
> >>>
> >>> Russ Rew                                         UCAR Unidata Program
> >>> address@hidden                      http://www.unidata.ucar.edu
> >>>
> >>>
> >>>
> >>> Ticket Details
> >>> ===================
> >>> Ticket ID: ZAP-332278
> >>> Department: Support netCDF
> >>> Priority: Normal
> >>> Status: Closed
> >>>
> >>>
> >>
> >> --
> >> Kamal SELVAM,
> >> Ph.D student,
> >> LOMC-CNRS,
> >> France.
> >>
> >>
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: ZAP-332278
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> 
> 
> 

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



Ticket Details
===================
Ticket ID: ZAP-332278
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.