Skip to content

Conversation

@ktras
Copy link
Collaborator

@ktras ktras commented Nov 11, 2025

This PR will not pass CI (with the current macros being set for flang) until PR #165573 is merged into the llvm-project repo.

@ktras ktras requested a review from bonachea November 11, 2025 22:58
@ktras
Copy link
Collaborator Author

ktras commented Nov 11, 2025

@bonachea I have not used macros for each individual team feature. In my initial draft of adding macros to my changes to this program, I did use macros for each individual team feature. However, particularly because of team_number, the use of macros around each different team number was a lot. I didn't prefer that style, so I ended up with the current strategy. If you feel strongly about the additional macros for each separate team feature, I can update the PR to add them back.

Copy link
Member

@bonachea bonachea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR. The overall design looks good, I added a few requests for improvements based on a quick skim

Comment on lines +100 to +103
res = get_team(CURRENT_TEAM)
res = get_team(INITIAL_TEAM)
res = get_team()
write(*,'(A,I3)') "Initial team number is ", team_number()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please preserve the convention used in this file of upper-case for intrinsics (to help them stand-out relative to lower-case variable/procedure names defined in the program)

Suggested change
res = get_team(CURRENT_TEAM)
res = get_team(INITIAL_TEAM)
res = get_team()
write(*,'(A,I3)') "Initial team number is ", team_number()
res = GET_TEAM(CURRENT_TEAM)
res = GET_TEAM(INITIAL_TEAM)
res = GET_TEAM()
write(*,'(A,I3)') "Initial team number is ", TEAM_NUMBER()

and similarly below

Comment on lines +105 to +107
if (ni < 2) then
if (me == 1) write(*,'(A)') "Please run program again with at least 2 images to test more TEAM features."
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we excluding single-image execution here?

By my reading the code below should still be fully correct (and hence testable) with a single image. It's obviously less interesting with only one image, but I don't see a reason to prohibit execution.

integer :: me, ni, peer, tmp
integer :: me, ni, peer, tmp, team_id
character(len=5) :: c
type(team_type) :: subteam, res
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This declaration should be conditional on HAVE_TEAM

@bonachea
Copy link
Member

Rebasing to pick-up CI changes

@bonachea bonachea force-pushed the update-multi-image-app branch from 7f5f0d2 to b9a42b3 Compare November 19, 2025 03:29
Copy link
Member

@bonachea bonachea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recording one new observation

Copy link
Member

@bonachea bonachea Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flang-latest runs of the test in this PR are now throwing the non-fatal exit-time warning:

IEEE arithmetic exceptions signaled: INEXACT

This is effectively a regression of #259 and probably due to something along the new team-support code paths exercised in libcaffeine. We should either track down which piece of team support code is signalling an exception and fix it, or enter a new release-blocker issue to ensure this regression doesn't get forgotten.

If/when we do fix the problem, we should instrument the native multi-image test step in CI to detect future regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants