(j3.2006) [ukfortran] (SC22WG5.5025) Canada's national body report to WG 9 (Ada)
N.M. Maclaren
nmm1
Wed Jul 10 06:32:06 EDT 2013
On Jul 10 2013, Van Snyder wrote:
>
>> > I believe that it would be straightforward to add a tasking facility
>> > to Fortran, if restricted to PURE procedures, and feasible if not.
>> > Defining asynchronous procedures would not be trivial, of course.
>> > However, I cannot see how to fit it in with coarrays.
>>
>> We already have one form of tasking - asynchronous I/O. ...
>
>Ada has had tasking, and not limited to the local SMP threaded form,
>since 1983. ...
>
>I have proposed at least three asynchronous computation and data
>transfer mechanisms: ...
>
>Bill has suggested that this is syntactic sugar for
>
> DO CONCURRENT ( I = 1:3 )
> SELECT CASE ( I )
> CASE ( 1 )
> BLOCK
> [ <specification-part> ]
> <block>
> END BLOCK
> CASE ( 2 )
> BLOCK
> [ <specification-part> ]
> <block>
> END BLOCK
> CASE ( 3 )
> BLOCK
> [ <specification-part> ]
> <block>
> END BLOCK
> END SELECT
> END DO
Yes - but really only for PURE procedures.
>perhaps with embedded IF constructs, but there is an important
>difference: A task/thread/activity is not created if "IF
>( <logical-expr> )" appears and the <logical-expr> is false.
>
>(see 00-317 and 06-187).
>
>In either case, a variable that is not declared within a
><specification-part> within the construct should not be allowed in a
>variable definition context, except within a CRITICAL construct, which
>needs to be extended beyond images to sequences of execution. Similarly,
>an impure procedure can only be invoked from within a CRITICAL
>construct. An alternative is a new PARALLEL attribute for procedures,
>which indicates that any alteration to a nonlocal variable or dummy
>argument occurs within a CRITICAL construct.
Yes. It is this sort of thing that is the issue. Fortran already has
a lot of mechanism for asynchronous PURE procedure calls, which would
need only syntactic sugar, and the real problem is impure ones. I am
sure that it could be done, and cleanly, but is a significant amount
of effort in checking for gotchas and wordsmithing.
Regards,
Nick Maclaren.
More information about the J3
mailing list