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

[netCDF #ELI-872519]: netcdf-fortran-4.2



Taran,

> It seems to show the right version of ifort after doing ifort --version.
> ------------------------------------------------------------------------------------------------------------------
> gadar@igsagiegwstkal0:~/Documents/Development/SCRIP_COAWST$ ifort --version
> ifort (IFORT) 15.0.3 20150407
> Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.
> -------------------------------------------------------------------------------------------------------------------
> 
> I also tried " which ifort " and " which gfortran " respectively and they
> give expected outputs
> ------------------------------------------------------------------------------------------------------------------
> gadar@igsagiegwstkal0:~/Documents/Development/SCRIP_COAWST$ which ifort
> /opt/intel/composer_xe_2015.3.187/bin/intel64/ifort
> ------------------------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------------------------
> gadar@igsagiegwstkal0:~/Documents/Development/SCRIP_COAWST$ which gfortran
> /usr/bin/gfortran
> ------------------------------------------------------------------------------------------------------------------

Then you will have to figure out why, when you run the configure script, it
shows gfortran runs when it invokes "ifort --version". It's something in your 
environment or the way in which you run the configure script.

You could probably debug the problem by just creating a little shell script
that runs "ifort --version", and trying to run it under the same conditions you 
use to run configure. For example, if you run configure using sudo or as root
(not recommended because some environment variables aren't inherited by
root subshells), then run this little shell script the same way, and see if it 
fails 
the same way. Then find and fix the cause of the problem, which may be a 
problem with your PATH, with the shell you are using, with a shell alias, with
symbolic link, or something else.

Altrernatively, you can set FC and F77 to the absolute path for ifort before 
invoking configure and see if that works. We can't reproduce the problem
here, so would still be interested if you discover the cause and let us know.

Thanks.

--Russ



> address@hidden> wrote:
> 
> > Taran,
> >
> > Thanks for sending the config.log.
> >
> > The first thing I notice are these puzzling lines in that file:
> >
> >    configure:4659: finding Fortran compiler (will not be used if Fortran
> > API is not desired)
> >    configure:4767: checking for Fortran compiler version
> >    configure:4776: ifort --version >&5
> >    GNU Fortran (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
> >    Copyright (C) 2013 Free Software Foundation, Inc.
> >
> > When you invoke "ifort --version" do you also get this output from
> > what is obviously gfortran?  If so, try instead using an absolute path
> > to the ifort compiler, to eliminate the possibility of a symbolic link or
> > shell alias or a weird PATH being used when the shell runs "ifort".
> >
> > I think when you find and correct that problem, rerunning configure
> > will use ifort.
> >
> > --Russ
> >
> > > Hi Russ,
> > >
> > > Firstly, I hope that I am replying back through the right email address.
> > >
> > > Please find the config.log attached. Also, netcdf.mod was the most recent
> > > one. I have double checked that.
> > >
> > > Actually, the gfortran header that I have in the other netcdf.mod that
> > was
> > > only with gfortran also has a similar, ie. large case header.
> > > That works fine though.
> > >
> > > thanks,
> > > Taran
> > >
> > > Taran
> > >
> > > address@hidden> wrote:
> > >
> > > > Hi Taran,
> > > >
> > > > From the configure output you sent in the configure.log attachment, it
> > > > appears
> > > > that the configure script accepted your ifort specification for the
> > > > Fortran compiler,
> > > > which you can see by grepping for "ifort" in that file. Another way to
> > > > check is to
> > > > look at the output from "make" or "make check" to see what compiler is
> > > > actually
> > > > being used to compile the library sources. If it's definitely
> > "gfortran"
> > > > rather than
> > > > "ifort", please send us the "config.log" created by the configure
> > script
> > > > (not the
> > > > "configure.log" file you generated by redirecting the output of
> > configure)
> > > > for
> > > > further diagnosis.
> > > >
> > > > Also, is the NETCDF.mod file you are looking at from the
> > > > /usr/local/netcdf_ifort/
> > > > directory, and does it have approximately the same creation time as
> > when
> > > > you ran "make install"? If not, you may be looking at a different
> > > > netcdf.mod or
> > > > not have specified -I/usr/local/netcdf_ifort_include when compiling
> > Fortran
> > > > applications with the newly installed library.
> > > >
> > > > Finally, when we build with gfortran, the resulting netcdf.mod (it's
> > all
> > > > lower case
> > > > when created by gfortran) file doesn't have a header such as the one
> > you
> > > > sent,
> > > > which makes me thin that maybe the compiler that creates that
> > NETCDF.mod
> > > > file is derived from gfortran but may be part of ifort?
> > > >
> > > > --Russ
> > > >
> > > >
> > > > > I am trying to build the netcdf-fortran-4.2 on my local machine. I
> > > > earlier
> > > > > had a gfortran compiler and now recently installed an ifort compiler.
> > > > When
> > > > > i try to configure netcdf-fortran with my ifort compiler, it still
> > > > reverts
> > > > > back to gfortran compiler. I am using this command to configure :
> > > > >
> > > > > sudo ./configure --prefix=/usr/local/netcdf_ifort FC=ifort F90=ifort
> > > > > F77=ifort CC=gcc --enable-shared 2>&1 | tee configure.log
> > > > >
> > > > > I am also attaching the "configure.log". If you check inside the
> > file on
> > > > > line, it still uses the GNU compiler. After doing a "make" and "make
> > > > > install", the resulting "netcdf.mod" shows that I used "gfortran". I
> > am
> > > > > attaching the file as well.
> > > > >
> > > > > I am not sure why it is not getting configured with ifort when I
> > specify
> > > > > the flags to use ifort.
> > > > >
> > > > > Any help is appreciated.
> > > > >
> > > > > thanks,
> > > > > Taran
> > > > >
> > > > >
> > > > Russ Rew                                         UCAR Unidata Program
> > > > address@hidden                      http://www.unidata.ucar.edu
> > > >
> > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: ELI-872519
> > > > Department: Support netCDF
> > > > Priority: Normal
> > > > Status: Closed
> > > >
> > > >
> > >
> > >
> >
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: ELI-872519
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> >
> 
> 

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



Ticket Details
===================
Ticket ID: ELI-872519
Department: Support netCDF
Priority: Normal
Status: Closed