Skip to content
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

Locality aware gather #198

Merged
merged 6 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions include/faabric/scheduler/MpiWorld.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,16 @@ class MpiWorld
/* MPI internal messaging layer */

// Track at which host each rank lives
std::vector<std::string> rankHosts;
std::vector<std::string> hostForRank;
int getIndexForRanks(int sendRank, int recvRank);
std::vector<int> getRanksForHost(const std::string& host);

// Track ranks that are local to this world, and local/remote leaders
// Store the ranks that live in each host
std::map<std::string, std::vector<int>> ranksForHost;

// Track local and remote leaders. The leader is stored in the first
// position of the host to ranks map.
// MPITOPTP - this information exists in the broker
int localLeader = -1;
std::vector<int> localRanks;
std::vector<int> remoteLeaders;
void initLocalRemoteLeaders();

// In-memory queues for local messaging
Expand Down
Loading