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

[netCDF #YCS-670193]: Using netCDF with Multiple Fortran Compilers



Hi David,

> I recently installed NetCDF using yum by following
> www.unidata.ucar.edu/blogs/developer/entry/easiset_way_to_install_netcdf.
> 
> Issuing nc-config -fc gives "gfortran" as the output. Does this mean my
> netcdf compilation can only be used with the gfortran compiler? What is the
> meaning of fc flag?

It depends.  If you built the netCDF-C library as a shared library and you use
version 4.4 or later of the netCDF-Fortran library, and your Fortran com[pilers
support the Fortran-2003 C-compatibility feature, then you should be able to
use the same netCDF-C library with multiple Fortran compilers.  However, we
don't test that capability, and only test with GNU Fortran on some platforms,
so you may run into problems we haven't anticipated.

The -fc flag used by nc-config just records the compiler with which the
netCDF-Fortran library was compiled when nc-config was built, and if there are
multiple netCD-Fortran libraries, it records the one found first when nc-config
was built.  I think it would generally be better to use the nf-config utility 
rather
than the nc-config utility for this information, because, the nf-config utility 
is
associated with the library with which it was installed.

--Russ

was built found when nc-config
was 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: YCS-670193
Department: Support netCDF
Priority: Normal
Status: Closed