Skip to content

Comments

Relax ucobounds preconditions and fix ucobound defects#297

Open
bonachea wants to merge 7 commits intoBerkeleyLab:mainfrom
bonachea:ucobounds-on-main
Open

Relax ucobounds preconditions and fix ucobound defects#297
bonachea wants to merge 7 commits intoBerkeleyLab:mainfrom
bonachea:ucobounds-on-main

Conversation

@bonachea
Copy link
Member

This PR reworks Caffeine's handling of ucobounds, fixing it to comply with F23 UCOBOUND and deploying the ucobound relaxation on coarray descriptor creation proposed for PRIF 0.8.

Fixes #296

Implements prif#154

See commit messages for details.

* Accept ucobounds of size (corank - 1) when creating coarray descriptors

If provided, the trailing ucobounds must still meet the specified invariants

* Add coshape_epp to the coarray descriptor

  This new field holds the precomputed exclusive prefix product of
  the coshape.

* Fix prif_ucobound to recompute the trailing ucobound based on current team size

* Fix prif_coshape to properly account for the trailing ucobound

* Use coshape_epp to accelerate prif_image_index and prif_initial_team_index
* Simplify the logic for the common case of corank == 1
* Remove some redundant arithmetic and branchs for the general case
* Add a safety check for coshape overflow
New expected trailing ucobound values, and exercise optional trailing ucobound
@bonachea bonachea added this to the Caffeine 0.7.2 milestone Feb 22, 2026
@bonachea bonachea requested a review from ktras February 22, 2026 21:54
@bonachea bonachea added bug Something isn't working enhancement New feature or request priority=high image queries PRIF image query subroutines coarray queries PRIF coarray query subroutines labels Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working coarray queries PRIF coarray query subroutines enhancement New feature or request image queries PRIF image query subroutines priority=high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prif_ucobound and prif_coshape report/use non-conforming trailing ucobound

1 participant