Commit 4ef5e228 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Replace send/recv function call pair with single MPI_Sendrecv call.

parent 5d790ed9
......@@ -180,7 +180,6 @@ void modelRun ( MPI_Comm comm )
char * recvBuffer, * sendBuffer;
int bufferSize, differ;
MPI_Status status;
pioNamespaceSetActive ( 0 );
......@@ -195,11 +194,10 @@ void modelRun ( MPI_Comm comm )
defineStream ( streamID, vlistID );
reshPackBufferCreate ( &sendBuffer, &bufferSize, comm );
xmpi ( MPI_Send ( sendBuffer, bufferSize, MPI_PACKED, 0, 0, comm ));
recvBuffer = xmalloc ( bufferSize * sizeof ( char ));
xmpi ( MPI_Recv ( recvBuffer, bufferSize, MPI_PACKED, 0,
0, comm, &status ));
xmpi(MPI_Sendrecv(sendBuffer, bufferSize, MPI_PACKED, 0, 0,
recvBuffer, bufferSize, MPI_PACKED, 0, 0,
MPI_COMM_SELF, MPI_STATUS_IGNORE));
pioNamespaceSetActive ( 1 );
rpcUnpackResources ( recvBuffer, bufferSize, comm );
free ( recvBuffer );
......
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