[J3] Comments on 23-146
Jeff Hammond
jehammond at nvidia.com
Mon Feb 27 15:21:57 UTC 2023
> The eighth proposal is for asynchronous tasking. This was provided in Ada 83. The Ada community eventually concluded the overhead was too high, and provided "protected variables" as an alternative.These are essentially coroutines. If another community has discovered that something is a bad idea, or maybe a decent but suboptimal idea, it would be a good idea to study their experience instead of starting with what they replaced. "Concurrent and Real-Time Programming in Ada" by Alan Burns and Andy Wellings has a good description.
Essentially all modern programming languages, including C++, C, C#, Python, Go, Rust, Java, JavaScript, Swift, Ruby, Lua, etc. as well as OpenMP and OpenACC support a form of ASYNC that is at least roughly equivalent to what I’m proposing. I would prefer that Fortran join this modern language set rather than fade into history like Ada. I also want to provide the Fortran community in HPC a way to do asynchronous parallelism without resorting to directives.
> A less flexible alternative to asynchronous tasking is a PARALLEL...FORK...END PARALLEL construct. Bill Long has pointed out that this is just syntactic sugar for a DO CONCURRENT construct with a SELECT CASE inside See 06-187, some of which already is included.
It’s not always, and the exceptions are extremely important. One key motivation for ASYNC is to support asynchronous offload of DO CONCURRENT regions to GPUs and similar devices. How do you propose to implement that using DO CONCURRENT, given that we have no way to tell compilers which type of parallelism to use, and fine-grain parallelism such as SIMD and SIMT, which are targeted by DO CONCURRENT by many compilers, are not capable of implementing the desired asynchrony.
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230227/1ce85802/attachment-0003.htm>
More information about the J3
mailing list