This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: array descriptors -- direction?


Hello Tom,

Thomas Breuel wrote:
> I'm a bit unclear about the direction that GFortran is taking.  There
> are currently internal array descriptors that are shared between
> GFortran, G95, and others that differ from TR 29113.  There have been
> some check-ins to use macros for accessing array descriptors.  And
> there have been some comments on the mailing list suggesting that
> GFortran might start using TR 29113 as its native array descriptor.
>   
One thing is sure: The array descriptor format will change. There are
some things which cannot be represented in the current array descriptor,
which need to be included. As it has to change, the question was whether
it should follow TR 29113 or not. Currently, TR 29113 is still a bit in
a flux and thus one does not know how soon the format there is settled.
On the gfortran side, some other items had become more important thus it
might happen that 4.5 will still ship with the current array descriptor
and the change is postponed to 4.6. (Making a half-complete change does
not make sense; as array descriptors touch a large part of libgfortran,
we probably will break the ABI. But we don't want to break the ABI for
4.5 _and_ 4.6.)

> TR 29113 seems designed so that it would be a fairly simple add-on to
> an existing compiler, since it translates back and forth between
> native and portable descriptors;
That was one design goal; I think the format was modeled after the
descriptors in Pathscale, which are similar to those in ifort and
probably also similar to other compilers.

> is there any implementation of TR 29113 for GFortran already?
>   
To my knowledge not. Some voting was planned for last Tokyo meeting, but
then WG5 run out of time; this time at the Las Vegas meeting it was also
not discussed. I expect still some changes, presumably small but they
can also be large. Until the draft has more stabilized, I believe no
vendor will start implementing the draft. (I hope the TR will be
released soon - it is also very useful for MPI - but I fear it will
still take several months).

> Should I start writing the interface code based on GFortran's current
> array descriptors?  Should I implement a TR 29113 on top of GFortran's
> current descriptors?  Or is a TR 29113 native implementation around
> the corner?
>   
In principle, TR 29113 would be the best solution as it is
well-documented and vendor independent. However, as it is not set in
stone and (more importantly) not implemented, it is not yet an option.
Whether TR 29113 will become the native implementation for gfortran or
not, is still unclear. And when the ABI will be broken, is also unclear.
The current guess is rather 4.6 than 4.5, but that might change.

Thus: If you want to add an array descriptor soon, you should use the
current one, which was unchanged for many 4.x versions up to today's
4.5. However, I would implement it such that switching to a different
implementation, e.g., TR 29113 is relatively easy. (Or one lives with
assumed-size arrays which don't need an array descriptor.)

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]