MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / asynchSendArray

Function asynchSendArray

quest/src/comm/comm_routines.cpp:248–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246
247
248void asynchSendArray(qcomp* send, qindex numElems, int pairRank) {
249#if COMPILE_MPI
250
251 // we will not track nor wait for the asynch send; instead, the caller will later comm_sync()
252 MPI_Request nullReq = MPI_REQUEST_NULL;
253
254 // divide the data into multiple messages
255 auto [messageSize, numMessages] = dividePow2PayloadIntoMessages(numElems);
256
257 // asynchronously send the uniquely-tagged messages
258 for (qindex m=0; m<numMessages; m++) {
259 int tag = static_cast<int>(m); // gauranteed int, but m*messageSize needs qindex
260 MPI_Isend(&send[m*messageSize], messageSize, MPI_QCOMP, pairRank, tag, MPI_COMM_WORLD, &nullReq);
261 }
262
263#else
264 error_commButEnvNotDistributed();
265#endif
266}
267
268
269void receiveArray(qcomp* dest, qindex numElems, int pairRank) {

Callers 2

asynchSendGpuSubBufferFunction · 0.85
comm_asynchSendSubBufferFunction · 0.85

Tested by

no test coverage detected