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

[netCDF #NKE-128213]: Problem with Fortran90 API using Intel Compilers for NetCDF



Victor,

> According to my .bash_histroy file I did:
> *
> ./configure --prefix=/home/victor/local/sublocal
> make
> make check >& makecheck.txt &
> ls -lt
> vi makecheck.txt
> make install*
> 
> then I moved to the folder:
> victor@antares
> :~/local/sublocal/netcdf-fortran-netcdf-fortran-4.2/examples/F90/
> 
> and there, at the command line, I entered:
> 
> *ifort -o test90 -I/home/victor/local/sublocal/ simple_xy_wr.f90 -lnetcdff
> -lnetcdf*
> simple_xy_wr.f90(19): error #7013: This module file was not generated by
> any release of this compiler.   [NETCDF]

OK, that error means that the netcdf.mod file found in 
/home/victor/local/sublocal/ was
not generated by ifort.  I think the real propblem is that you should have used

  -I/home/victor/local/sublocal/include

instead.  Just to make sure, check that there is a netcdf.mod file in that 
directory
and that its last modification date corresponds to when you ran "make install" 
after
building with ifort.

--Russ



> use netcdf
> ------^
> simple_xy_wr.f90(59): error #6404: This name does not have a type, and must
> have an explicit type.   [NF90_CREATE]
> call check( nf90_create(FILE_NAME, NF90_CLOBBER, ncid) )
> --------------^
> simple_xy_wr.f90(62): error #6404: This name does not have a type, and must
> have an explicit type.   [NF90_DEF_DIM]
> call check( nf90_def_dim(ncid, "x", NX, x_dimid) )
> --------------^
> simple_xy_wr.f90(72): error #6404: This name does not have a type, and must
> have an explicit type.   [NF90_DEF_VAR]
> call check( nf90_def_var(ncid, "data", NF90_INT, dimids, varid) )
> --------------^
> simple_xy_wr.f90(75): error #6404: This name does not have a type, and must
> have an explicit type.   [NF90_ENDDEF]
> call check( nf90_enddef(ncid) )
> --------------^
> simple_xy_wr.f90(80): error #6404: This name does not have a type, and must
> have an explicit type.   [NF90_PUT_VAR]
> call check( nf90_put_var(ncid, varid, data_out) )
> --------------^
> simple_xy_wr.f90(84): error #6404: This name does not have a type, and must
> have an explicit type.   [NF90_CLOSE]
> call check( nf90_close(ncid) )
> --------------^
> simple_xy_wr.f90(92): error #6404: This name does not have a type, and must
> have an explicit type.   [NF90_NOERR]
> if(status /= nf90_noerr) then
> -----------------^
> simple_xy_wr.f90(93): error #6404: This name does not have a type, and must
> have an explicit type.   [NF90_STRERROR]
> print *, trim(nf90_strerror(status))
> --------------------^
> simple_xy_wr.f90(93): error #6362: The data types of the argument(s) are
> invalid.   [TRIM]
> print *, trim(nf90_strerror(status))
> --------------------^
> compilation aborted for simple_xy_wr.f90 (code 1)
> 
> However, If I do:*
> victor@antares:~/local/sublocal/netcdf-fortran-netcdf-fortran-4.2/examples/F90$
> gfortran -o testF90 -I/usr/include/ simple_xy_wr.f90 -lnetcdff -lnetcdf*
> 
> I got the file:
> victor@antares:~/local/sublocal/netcdf-fortran-netcdf-fortran-4.2/examples/F90$
> ./testF90
> 0          12          24          36
> *** SUCCESS writing example file simple_xy.nc!
> 
> It is weird because at the F77 folder, things work well:
> victor@antares:~/local/sublocal/netcdf-fortran-netcdf-fortran-4.2/examples/F77$
> ifort -o testF77 -I/home/victor/local/sublocal/ simple_xy_wr.f -lnetcdff
> -lnetcdf
> victor@antares:~/local/sublocal/netcdf-fortran-netcdf-fortran-4.2/examples/F77$
> ls -lt
> total 1640
> -rwxrwxr-x 1 victor victor 666014 Aug 23 13:25 testF77
> .
> .
> .
> then:
> victor@antares:~/local/sublocal/netcdf-fortran-netcdf-fortran-4.2/examples/F77$
> ./testF77
> *** SUCCESS writing example file simple_xy.nc!
> 
> Regards
> Victor Torres
> 
> 
> 2013/8/23 Unidata netCDF Support <address@hidden>
> 
> > Hi Victor,
> >
> > The "make check" you attached shows all tests passes and the library was
> > built successfully.
> >
> > Did you run "make install" after running "make check" to get the netCDF
> > Fortran library installed in /home/victor/local/sublocal/lib ?
> >
> > If not, that is the problem.
> >
> > Also, you say
> > > ifort -o testF90 -I/home/victor/local/sublocal/ simple_xy_wr.f90
> > -lnetcdff
> > > -lnetcdf .... DOES NOT WORK :S!!
> >
> > What is the error message that indicates the compile and link didn't work?
> >
> > --Russ
> >
> > > I've trying to install the fortran 90 library for NetCDF using intel
> > > compilers, eveything succeeded but when I compile with F90 it does not
> > work
> > > (it compiled with gfortran!!!), it works pretty well with intel C (ICC),
> > > intel fortran77 (ifort), but not with intel fortran90 (ifort).
> > > Do you know why?
> > >
> > > I am using*:
> > > *Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on
> > > Intel(R) 64, Version 13.1.3.192 Build 20130607
> > > Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R)
> > 64,
> > > Version 13.1.3.192 Build 20130607*
> > > ***
> > > The variables I am using are:
> > >
> > > export CC=icc
> > > export CXX=icpc
> > > export CFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
> > > export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
> > > export F77=ifort
> > > export FC=ifort
> > > export F90=ifort
> > > export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
> > > export CPP='icc -E'
> > > export CXXCPP='icpc -E'
> > > export CPPFLAGS='-I/home/victor/local/sublocal/include'
> > > export LDFLAGS='-L/home/victor/local/sublocal/lib'
> > > export F90FLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
> > > *
> > > *Here I attach a "make check"-file and the config.log file.
> > >
> > > to run the programs I give the following orders:
> > > Using gfortran:
> > > gfortran -o test1 -I/usr/include/ simple_xy_wr.f90 -lnetcdff -lnetcdf
> > > (OK)
> > >
> > > Using intel C compiler
> > > icc -o testC -I/home/victor/local/sublocal/ simple_xy_wr.c -lnetcdff
> > > -lnetcdf      (OK)
> > >
> > > Using intel F77 compiler
> > > ifort -o testF77 -I/home/victor/local/sublocal/ simple_xy_wr.f -lnetcdff
> > > -lnetcdf   (OK)
> > >
> > > Using intel F90 compiler
> > > ifort -o testF90 -I/home/victor/local/sublocal/ simple_xy_wr.f90
> > -lnetcdff
> > > -lnetcdf .... DOES NOT WORK :S!!
> > >
> > > Also, the version for the netcdf-fortran library is:
> > > netcdf-fortran-netcdf-fortran-4.2
> > >
> > > I hope you can help me.
> > >
> > > Regards
> > > Victor Torres
> > >
> > >
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: NKE-128213
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> >
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: NKE-128213
Department: Support netCDF
Priority: Normal
Status: Closed