[flang-commits] [flang] Parallel runtime library design doc (PRIF) (PR #76088)

Jeff Hammond via flang-commits flang-commits at lists.llvm.org
Mon May 6 21:09:55 PDT 2024


jeffhammond wrote:

My (partial) review:
- All communication operations are locally blocking.  There is no way for the compiler to defer or aggregate synchronization.
- `prif_put` says it blocks on completion.  `prif_put_raw` doesn't say it blocks.  I infer that it does, but every function needs to be clear. (same for get)
- `prif_{get,put}_strided` need to exist to allow for an efficient implementation over MPI.  The `MPI_Win` argument is going to be in `type(prif_coarray_handle)` and therefore that argument needs to be present for all communication that is going to lead to MPI RMA.
- Please do not use `c_intmax_t`.  Just use `c_size_t` for bounds, etc.
- `final_func` takes the coarray handle as `intent(in)`.  Is there no use case for `final_func` modifying the state inside of the coarray handle?
- `prif_base_pointer` should be immediately prior to the `raw` operations since the usage will be paired.  I know it's a query but locality of reference when reading the document is important.
- `For example, this document references the term coindexed-named-object multiple times, but does not define it since it is part of the language and the Fortran standard defines it. As such, in order to fully understand the PRIF specification, it is critical to read and reference the Fortran standard alongside it.`  I appreciate the idea here but this is going to be hostile to potential implementers of PRIF who are not Fortran language lawyers.  The Fortran standard is not easy to read and some of the people who implement PRIF may be non-Fortran programmers.  Requiring Fortran language expertise much beyond CFI will impede implementation efforts.

https://github.com/llvm/llvm-project/pull/76088


More information about the flang-commits mailing list