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

[netCDF #QBM-450894]: Re: requesting netcdf support - ifort 32 bit installation is failing



Steve,

> I hope my last response was read-able....

Yes, thanks, it was readable.  The output from "make check" shows you
were building the netCDF Fortran interface for the "pgf95" Fortran
compiler rather than the ifort compiler:

   ...
  make[2]: Entering directory `/usr/local/ifort/netcdf32/src/nf_test'
  pgf95 -o nf_test test_get.o test_put.o nf_error.o nf_test.o test_read.o 
test_write.o util.o fortlib.o ../libsrc/libnetcdf.a -lm
  pgf95 -o ftest ftest.o fortlib.o ../libsrc/libnetcdf.a
   ...

The netCDF Fortran interface library must be built separately for each
Fortran compiler, because different Fortran compilers use different
conventions for calling C functions, and the netCDF Fortran interface
is just a thin layer on top of the core C library.  If you want a
library that will work with the ifort compiler, you should rebuild
from source and specify the Fortran compiler to be used as the value
of the FC and F90 environment variables, for example as described
here:

  
http://www.unidata.ucar.edu/software/netcdf/docs/other-builds.html#Linux_ifort-360

You could use the source directory you have if you run "make
distclean" first, before rerunning the configure script with FC, F90,
and possible FFLAGS set properly.  Here is an example of output from
building netcdf-3.6.2 on a Linux system using the ifort compiler:

  
http://www.unidata.ucar.edu/software/netcdf/builds/3_6_2/imogene_Linux_netcdf-3.6.2_2007-03-05-10-44.txt

It is possible to build and install the netCDF library to support
multiple Fortran compilers, so if you want to do that, use the
configure flag

  --enable-separate-fortran 
    This will cause the Fortran 77 and Fortran 90 APIs to be built
    into their own separate library, instead of being included in the
    C library. This is useful for supporting more than one fortran
    compiler with the same netCDF C library. This is turned on by
    default for shared library builds.  

Users have to specify the required fortran library in addition to the
netCDF C library in this case, with something like -lnetcdf -lnetcdff.
If you build from source this way, you can see from the tests how to
link in your specific case.

> btw.. the test program failed...

Your "make check" seems to have succeeded, running all the test
programs without failing any of the tests.  If you mean that the
simple_xy_wr.f90 program failed, that may be because you were trying
to build and link it with ifort to a netCDF library built for pgf95.

--Russ

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



Ticket Details
===================
Ticket ID: QBM-450894
Department: Support netCDF
Priority: Normal
Status: Closed