Commit 46dc28e7 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Use pack function argument to copy data entries to RDMA window.

parent b26e89c0
......@@ -496,8 +496,10 @@ modelWinEnqueue(int collID,
int offset = header.offset
= (int)roundUpToMultiple(txWin[collID].head - txWin[collID].buffer,
sizeof (double));
memcpy(txWin[collID].buffer + offset, data, size);
txWin[collID].head = txWin[collID].buffer + offset + size;
MPI_Comm comm = commInqCommsIO(collID);
packFunc((void *)data, txWin[collID].buffer, (int)txWin[collID].size,
&offset, &comm);
txWin[collID].head = txWin[collID].buffer + offset;
}
else if (header.id == PARTDESCMARKER)
{
......@@ -579,8 +581,9 @@ pioBufferPartData(int streamID, int varID, const double *data,
struct winHeaderEntry dataHeader
= { .id = streamID, .specific.dataRecord = { varID, nmiss }, .offset = -1 };
modelWinEnqueue(collID, dataHeader, data, chunk * sizeof (data[0]),
memcpyPackFunc);
modelWinEnqueue(collID, dataHeader,
&(struct memCpyDataDesc){data, chunk * sizeof (data[0])},
0, memcpyPackFunc);
{
struct winHeaderEntry partHeader
= { .id = PARTDESCMARKER,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment