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

Support send/recv on the same rank #344

Open
vishwakaria opened this issue Oct 20, 2022 · 0 comments
Open

Support send/recv on the same rank #344

vishwakaria opened this issue Oct 20, 2022 · 0 comments

Comments

@vishwakaria
Copy link

Use-case

I have a client and server, each running on a different thread on the same GPU rank. I need to send data from client thread to server thread using gloo's send operation.

Issue

Does gloo support this out-of-the-box? If yes, can you share a simple snippet?
I can implement a pipe-based communication between the two threads, but this would be a nice-to-have feature.

From my code examination, Gloo's TCP implementation for the context does not create a TCPPair for a rank with itself. So send/recv on same rank causes seg faults. I have implemented my send functionality following the looks_like_mpi example:

int Send(const void *buf, int count, void* datatype, int dest, int tag) {
    auto ubuf = kContext->createUnboundBuffer(const_cast<void*>(buf), count);
    ubuf->send(dest, tag);
    ubuf->waitSend();
    return 0;
  }
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

No branches or pull requests

1 participant