examples/looks_like_mpi: Fix build errors - #468
Merged
meta-codesync[bot] merged 2 commits intoOct 21, 2025
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gloo is currently hitting two compilation issues when trying to compile examples/looks_like_mpi. These are addressed by two commits in this PR:
int, but don't return anything. Fix this by just always returningMPI_SUCCESS(0), since this example handles error cases withASSERTstatements.shared_ptr-based API for gloo Stores (9ba706d) is not being used. Fixed by using the new API.