BerkeleyLab / caffeine

A parallel runtime library for Fortran compilers
https://berkeleylab.github.io/caffeine/
Other
40 stars 7 forks source link

Add #if to temporarily omit PRIF/Caffeine code using assumed rank #106

Closed bonachea closed 1 month ago

bonachea commented 6 months ago

flang currently lacks support for assumed-rank dummy arguments like array(..). These are currently required by the following PRIF procedures, and their corresponding Caffeine implementation:

  1. ~prif_put (non-_raw version only)~
  2. ~prif_get (non-_raw version only)~
  3. prif_co_* (all collectives)

This issue suggests creating a temporary (and not officially supported) "dialect" of PRIF and Caffeine, gated by a preprocessor symbol, that entirely omits these features and their corresponding implementation.

To be concrete, this could look something like a -DMISSING_ASSUMED_RANK preprocessor flag added to FPM's C and Fortran flags, and corresponding #if !MISSING_ASSUMED_RANK guards around the declarations and code corresponding to the features above.

Having this in-place should enable us to add flang into CI and test future PRIF PRs submitted against LLVM, which makes this high-priority.

bonachea commented 1 month ago

flang-new has recently added assumed-rank support when passed a -mmlir -allow-assumed-rank flag.

PR #131 adds that flag (and fixes some unrelated issues with flang-new), rendering this issue obsolete