CAF Implementation
N.M. Maclaren
nmm1@cam.ac.uk
Thu Mar 25 11:14:00 GMT 2010
On Mar 24 2010, Paul Richard Thomas wrote:
>
>> my assumption is we are targeting initially a single computer
>> implementation suitable for use with multi-core SMP systems which are
>> currently everywhere.
I was told that the initial target is to add the syntax and check the
constraints, and a decision on where to go after that will be taken
later.
I have quite a lot of experience in this area, with a fair number of
both shared-memory and distributed-memory systems, and know most of
the relevant standards pretty well. I was also involved with Fortran
2008 coarrays, and can explain why some of the words are why they are.
Basically, the implementation problems are FAR fouler than almost
anyone realises, once you start being concerned about reliability and
portability. Here is an executive summary of my thinking:
POSIX threads are toxic, but there isn't much alternative for shared-
memory systems. The key there is the DESIGN of the primitives, to
maximise the chances of them being implementable. The worst nightmare
is the atomic primitives, of course, but locks are also pretty evil.
And remember that POSIX provides NO mechanism for synchronising any
non-memory action, including I/O, signalling, locales or any other
process-global state. It just LOOKS as if it does :-( Yes, that
misdesign really does cause trouble in practice, and you need well-
designed primitives, so you can put in implementation-dependent hacks.
For distributed memory, the answer is MPI (mainly MPI-1) - what was
the question, again? :-) When coindexed objects should be transferred
is a little trickier, but I would tend to use non-blocking transfers
when possible and blocking ones otherwise. One-sided transfers are a
horror, and should be avoided as far as possible. Whether atomics and
locks should use one-sided transfers or another mechanism is more
debatable but, again, that should be the other side of a well-designed
primitive.
>Tobias is the main driver of CAF. However, he is conferencing this
>week and so will not pick up you offer until the weekend.
I'll try to send him a message, too.
Regards,
Nick Maclaren.
More information about the Fortran
mailing list