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

Don't use util::generateGid() for MPI messages #203

Merged
merged 1 commit into from
Dec 27, 2021
Merged
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
4 changes: 3 additions & 1 deletion src/scheduler/MpiWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ static thread_local std::set<int> iSendRequests;

static thread_local std::map<int, std::pair<int, int>> reqIdToRanks;

static thread_local int localMsgCount = 1;

// These long-lived sockets are used by each world to communicate rank-to-host
// mappings. They are thread-local to ensure separation between concurrent
// worlds executing on the same host
Expand Down Expand Up @@ -624,7 +626,7 @@ void MpiWorld::send(int sendRank,
bool isLocal = otherHost == thisHost;

// Generate a message ID
int msgId = (int)faabric::util::generateGid();
int msgId = (localMsgCount + 1) % INT32_MAX;

// Create the message
auto m = std::make_shared<faabric::MPIMessage>();
Expand Down