[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #DBY-733925]: netCDF
- Subject: [netCDF #DBY-733925]: netCDF
- Date: Tue, 15 Feb 2011 12:41:57 -0700
Dave,
> That was just the information I was looking for.
>
> One related question is do we need to also build a netCDF library for our
> Intel fortran codes? Or will either a gnu or PGI build netCDF library work
> with the Intel fortran codes?
There are 3 common sets of conventions for calling C functions from Fortran
code, but lots of minor variations, supported by the fortran/cfortran.h
system until we get the Fortran API refactored to use f-2003's standardization
of such conventions. In the meantime, I think a library built for PGI works
the same as for Intel's ifort, but that GNU gfortran uses different
conventions, as in this previous support response:
http://comments.gmane.org/gmane.comp.lib.netcdf/1612
You need to specify the fortran compiler you are using by setting
CPPFLAGS and rerunning netCDF configure. Set -DgFortran if you are using
gfortran, -DpgiFortran for PGI or Intel fortran, and -Df2cFortran for
everything else.
--Russ
> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden]
> Sent: Monday, February 14, 2011 8:52
> To: Reynolds, David CTR 63134
> Cc: address@hidden
> Subject: [netCDF #DBY-733925]: netCDF
>
> Hi Dave,
>
> > Organization: FNMOC
> > Package Version: 3.6.1
> > Operating System: RHEL 5.5
> > Hardware: Linux Cluster
> >
> > We have a user running a PGI compiled code trying to use a v3.6.1
> > gnu compiled netCDF library. The code compiles and loads ok, but the
> > complaint is that on reading the data not all is present. The user was
> > told by another organization that a PGI compiled version of netCDF was
> > required. Assuming the code and usage of netCDF is correct, is it true
> > that a PGI version of is required? As admins we would prefer not to have
> > to maintain multiple versions of the netCDF library.
>
> With C application code compiled using pgcc, it should be OK to call a
> netCDF library built with gcc. Is the user code a Fortran application
> that is calling the Fortran netCDF API?
>
> In that case, it's likely that you will need a netCDF library built
> for the PGI convention for how Fortran code calls functions in a C
> library, because there was no standard way to do this before
> Fortran-2003, and we don't yet support the Fortran-2003 standard.
>
> The Portland Group maintains instructions for how to build netCDF with
> their compilers:
>
> http://www.pgroup.com/resources/tips.htm#NETCDF
>
> and recommends using pgcc with pgfortran, but our testing was
> successful with netCDF version 4.1.1 using gcc with pgf95 in our on a
> 32-bit Linux system:
>
> http://www.unidata.ucar.edu/software/netcdf/builds/4_1_1/index.jsp
>
> --Russ
>
> Russ Rew UCAR Unidata Program
> address@hidden http://www.unidata.ucar.edu
>
>
>
> Ticket Details
> ===================
> Ticket ID: DBY-733925
> Department: Support netCDF
> Priority: Normal
> Status: Closed
>
>
>
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: DBY-733925
Department: Support netCDF
Priority: Normal
Status: Closed