-
Notifications
You must be signed in to change notification settings - Fork 13
Update collective subroutines to match PRIF 0.5 #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@everythingfunctional flang supports kind type parameters for derived types but not length type parameters. Does Caffeine use length type parameters? |
One of the tests was trying to demonstrate how |
bonachea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, although there's obviously still a ways to go before it reaches feature parity with PRIF 0.4 / main
171bf08 to
6d6ac10
Compare
|
Brad's version at 171bf08 rebased onto main and conflicts resolved manually |
e2140ff to
94f2c07
Compare
1d5b3d3 to
d9f75a6
Compare
|
Now also fixes #159, completing the Collectives Subroutines |
test(collectives): outline simpler test suite chore: remove old collective implementations chore: update interfaces of collectives feat(co_broadcast): use wrapper to make contiguous feat: re-implement co_sum feat: create implementation of co_reduce feat: create co_min implementation feat: create implementation for co_max
These now pass using our flang-new snapshot on perlmutter: flang version 21.0.0git (git@github.com:llvm/llvm-project.git 5929de8c7731748bf58ad9b1fedfed75e7aae455) co_sum test remains broken at runtime.
Be more explicit and add more sanity-check assertions
`-mmlir -allow-assumed-rank` are unnecessary in current versions of flang-21 that we are using/requiring. `-Ofast` is a deprecated option that causes our build to spew spurious warnings. More importantly, it appears responsible for ICEs with the code on this branch. Resolves #196
* Workaround a lack of F18 intrinsic REDUCE() in gfortran (13)
… derived types Our test of prif_co_reduce over an array of parameterized derived type appears to require compiler support that is lacking in both recent flang and gfortran. Disable it gated by an optional command-line define HAVE_PARAM_DERIVED Add comments.
… types Perform a widening conversion into a temporary before the reduction, and narrow back on the result. Fixes issue #159.
Alse more verbose reporting of envvar values
155d529 to
eb8500e
Compare
|
Rebased to pickup CI changes on |
Also fix flang detection, which only happenned to work when the flang install appeared in a directory containing the string `llvm`
Eliminate code duplication and rename local variables for clarity
There are ZERO changes in this commit, just file renames
Co-authored-by: Katherine Rasmussen <krasmussen@lbl.gov>
For unrelated reasons we no longer support the gfortran version 11 that motivated this now-obsolete workaround.
ktras
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the response to feedback.
PR BerkeleyLab#158 brings the collectives into compliance with PRIF 0.5. As such prif.F90 is now believed to contain correct interfaces backed by linkable procedures for every entry point specified in PRIF 0.5. Some procedures still throw an unimplemented error if invoked at runtime (see docs/implementation-status.md for the latest on implementation status), but the interfaces are complete. Resolves issue BerkeleyLab#157
PR BerkeleyLab#158 brought the collectives interface into compliance with PRIF 0.5. As such the prif.F90 provided by Caffeine is now believed to contain correct interfaces for every entry point specified in PRIF 0.5, and all are backed by linkable procedures. Some procedures still throw an unimplemented error if invoked at runtime (see docs/implementation-status.md for the latest on implementation status), but the interfaces are complete. Resolves issue BerkeleyLab#157
Description
Updates the collective interfaces and implementations to match the latest PRIF 0.5 revision.
Largely rewrites all the relevant test code.
This PR was begun by @everythingfunctional and has been continued by @bonachea.
Fixes #69
Fixes #132
Fixes #144
Fixes #151
Fixes #152
Fixes #153
Fixes #154
Fixes #155
Fixes #159
Status:
-Ofastoption has been replaced with-O3, and flags specific to flang-19 have been hoisted out of install.sh into CI input.prif_co_reducesection of PRIF 0.5 spec. However there's probably nothing further we can do about this other than filing compiler bugs.prif_co_{min,max,sum}do not supportlong double(orlong double complex), nor do they support integer types wider than 64-bit. However those types seem sufficiently unimportant in practice that I think we should just open an issue and defer it indefinitely.