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

Re: NetCDF4 and Fortran95



Roy,

> > That comes from something the HDF5 people told us, that yes F95 has
> > structures, but there is no way to portably read into them.  Their
> > layout in memory is platform and compiler dependent and there are no
> > hooks to paper over this problem.  Ed knows more about this, so I'm
> > Cc:ing him.
> >
> > --Russ
> 
> I was surprised by this, because I thought I remember either Fortran  
> 2003 or Fortran 2005 dealing with this issue.  So, I did a little  
> searching.  The response below if from Steve Lionel, who is on the  
> Intel Fortran Team.  I know you guys only have so much say with the  
> HDF folk, but I thought I would at least pass on the info.

Right, if we could assume a Fortran 2003 compiler is available, we
could probably solve this problem, since one of its major features is
interoperability with C.  In fact Fortran 2003 makes the cfortran.h
macros currently needed for parameterizing the way C functions are
called from Fortran completely unnecessary also, because the way this
is done is standardized in F03.  But as far as I know, no available
compilers fully implement the Fortran 2003 standard yet.  A lot of
them are implemented in Sun's f95 and gfortran, but not all.  I see
Sun's f95 does implement the BIND(C) statement, so maybe we could test
a solution with that ...

--Russ