Skip to content

Conversation

@jackbondpreston-arm
Copy link
Contributor

Gloo is currently hitting two compilation issues when trying to compile examples/looks_like_mpi. These are addressed by two commits in this PR:

  1. Fake-MPI functions have return type int, but don't return anything. Fix this by just always returning MPI_SUCCESS (0), since this example handles error cases with ASSERT statements.
  2. The new shared_ptr-based API for gloo Stores (9ba706d) is not being used. Fixed by using the new API.

jackbondpreston-arm and others added 2 commits October 14, 2025 13:35
These MPI-like functions have int return types, but never return. This throws
warnings at build time, for example:
gloo/examples/looks_like_mpi.cc: In function ‘int MPI_Barrier(MPI_Comm)’:
gloo/examples/looks_like_mpi.cc:62:1: warning: control reaches end of non-void
function [-Wreturn-type]
   62 | }

Fix these warnings by simply returning MPI_SUCCESS (0) from these functions. It
seems failure cases are already covered by assertions for this example.
The Store API was changed to use shared_ptrs in
9ba706d. However, the looks_like_mpi
example app was not updated for this new API, and fails to build.

Fix this by using shared_ptrs for the {File,Prefix}Store in
looks_like_mpi.
@jackbondpreston-arm jackbondpreston-arm changed the title examples/looks_like_mpi: Fix build errors. examples/looks_like_mpi: Fix build errors Oct 14, 2025
@meta-cla meta-cla bot added the CLA Signed label Oct 14, 2025
Copy link
Member

@d4l3k d4l3k left a comment

Choose a reason for hiding this comment

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

LGTM

@meta-codesync
Copy link

meta-codesync bot commented Oct 20, 2025

@d4l3k has imported this pull request. If you are a Meta employee, you can view this in D85094081.

@meta-codesync meta-codesync bot merged commit 5ef5170 into pytorch:main Oct 21, 2025
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants