Skip to content
Snippets Groups Projects
Commit 1c2f92dd authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Tidy up

parent f3f691d8
No related branches found
No related tags found
1 merge request!8Draft: RDMA version with wrapped infinity calls
......@@ -252,22 +252,23 @@ static void *recv_thread(void *arg) {
auto *context = new infinity::core::Context();
auto *qpFactory = new infinity::queues::QueuePairFactory(context);
// Create buffer to receive messages. Only size for one, or not...
auto *receiveBuffer = new infinity::memory::Buffer(
context, 16 * tobytes(MESSAGE_SIZE));
// Create buffer to receive messages. This is big enough for the largest
// message.
auto *receiveBuffer =
new infinity::memory::Buffer(context, tobytes(MESSAGE_SIZE));
context->postReceiveBuffer(receiveBuffer);
// Port binding.
//message("%d binding to %d on port %d", myrank, rank, BASE_PORT + rank);
fflush(stdout);
if (verbose)
message("%d binding to %d on port %d", myrank, rank, BASE_PORT + rank);
qpFactory->bindToPort(BASE_PORT + rank);
//message("Blocking for first message on %d", BASE_PORT + rank);
if (verbose)
message("Blocking for first message on %d", BASE_PORT + rank);
starting[rank] = 0; // really need to do this in acceptIncomingConnection().
auto qp =
qpFactory
->acceptIncomingConnection(); // We block here for first message.
//message("Accepting incoming connections on %d", BASE_PORT + rank);
auto qp = qpFactory->acceptIncomingConnection();
if (verbose)
message("Accepting incoming connections on %d", BASE_PORT + rank);
/* No. of receives to process and associated queue. */
int todo_recv = nr_recvs[rank];
......@@ -339,7 +340,6 @@ static void *recv_thread(void *arg) {
delete qp;
delete qpFactory;
/* Thread exits. */
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment