[accaf, fortran, 0/4] Allocatable components support in derived typed coarrays
Andre Vehreschild
vehre@gmx.de
Tue Aug 30 15:50:00 GMT 2016
Hi all,
this mail is to announce the first version of a patchset for
current trunk to:
- support allocatable components in derived typed coarrays, and
- unlimited depth of references into coarray objects (was limited to
one or two depending on how you count beforehand).
The patch has four parts (in four mails to come):
1. Support functionality - routines in gfortran that allow for easier
handling of this types of coarray constructs.
2. The front-end changes to support allocatable components for derived
types.
3. The changes in the runtime for caf_single and the documentation.
4. New and changed tests.
The general idea behind the here proposed support for allocatable
components in derived type coarray object hierarchies is to add a
coarray-token for each allocatable object. Arrays already had this
partially implemented for coarrayed components. This is extended to the
general case when an allocatable array is present in a coarray object.
For scalar allocatable components a new hidden component is added which
has the same name as the allocatable component but is prefixed by
"_caf_".
On the runtime side the addressing of allocatable components is
realized by using the coarray tokens provided for each allocatable
component. The new functions _caf_OP_by_ref () (where OP of {get,
send, sendget}) use a chain of structures to describe the referencing
operations to do (similar to gfc_ref). The example implementation in
caf_single is written in a recursive manner to show the design and not
complicate its port for the opencoarrays project. An implementation
tuned for speed will have to evaluate the references iteratively using
its own stacks. There are also more opportunities to harvest
performance (e.g. learn that the ref is an ultimate full array ref and
copy the whole array in one memcpy and not item by item).
I have worked with the opencoarray project and they agreed to the
design. They are just syncing the changes for an mpi implementation.
Comments very welcome.
Regards,
Andre
--
Andre Vehreschild * Email: vehre ad gmx dot de
More information about the Fortran
mailing list