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

20040603: netcdf-3.5.1 built with the ifort Fortran compiler



>From: Deanna Bergondo <address@hidden>
>Organization: URI
>Keywords: 200406031811.i53IBBtK022293 netCDF ifort

Hi Deanna,

>I've installed the netcdf-3.5.1 package on a Linux machine
>running Rad Hat 7.1 with ifort as the F90 compiler and gcc as the C
>compiler, however when I compile my model I get an undefined reference to 
>nf_close_ and other files.  In libnetcdf nf_close__ and nf_close_ both
>exist, but nf_close_ is undefined.  Is there something I've done wrong?

It appears to us that you did not do a 'make test' after building the
interface.  Is this true?  The reason we say this is that a 'make test'
will test the capability of building a Fortran application linking
against the just built netCDF library.

Second, are you using the ifort compiler to compile your model?  If you
are using different Fortran compilers to build libnetcdf.a and compile
your model then you could run into the inconsistent use/need for
single/double trailing underscores in entry point names.

Third, if you did not run 'make test' and you are using the ifort
compiler to build the netCDF library and compile your model, it is
possible that you defined CFLAGS to include -Df2cFortran instead of
-DpgiFortran.  If this is the case, we suggest that you redefine CFLAGS
to use the -DpgiFortran flag and rebulid the netCDF library from
scratch.

Our surmise is based on comments from a user who was able to build
successfully using the ifort compiler:

http://www.unidata.ucar.edu/packages/netcdf/other-builds.html#32-bit%20linux%20opteron%20ifort%203.5.1

>Thank you.

No worries.  Please let us know if the above does not solve your problem.

Cheers,

Tom Yoksas
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically 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.