Commit a10eb91c authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Simplify send of finalize command to PIO server.

parent 94fe8ade
...@@ -886,17 +886,16 @@ void pioEndTimestepping ( void ) ...@@ -886,17 +886,16 @@ void pioEndTimestepping ( void )
void pioFinalize ( void ) void pioFinalize ( void )
{ {
int collID, ibuffer = 1111;
xdebug("%s", "START"); xdebug("%s", "START");
/* pioNamespace_ is unchanged on I/O servers */ /* pioNamespace_ is unchanged on I/O servers */
if (pioNamespace_ == -1) if (pioNamespace_ == -1)
return; return;
namespaceDelete(pioNamespace_); namespaceDelete(pioNamespace_);
for ( collID = 0; collID < commInqNProcsColl (); collID++ ) for (int collID = 0; collID < commInqNProcsColl (); collID++ )
{ {
xmpi ( MPI_Send ( &ibuffer, 1, MPI_INT, commInqNProcsModel (), xmpi(MPI_Send(NULL, 0, MPI_INT, commInqNProcsModel(),
FINALIZE, commInqCommsIO ( collID ))); FINALIZE, commInqCommsIO ( collID )));
xdebug("%s", "SENT MESSAGE WITH TAG \"FINALIZE\""); xdebug("%s", "SENT MESSAGE WITH TAG \"FINALIZE\"");
} }
modelWinCleanup (); modelWinCleanup ();
......
...@@ -1088,12 +1088,8 @@ void cdiPioServer(void (*postCommSetupActions)(void)) ...@@ -1088,12 +1088,8 @@ void cdiPioServer(void (*postCommSetupActions)(void))
switch ( tag ) switch ( tag )
{ {
case FINALIZE: case FINALIZE:
{ xdebugMsg(tag, source, nfinished);
int i; xmpi(MPI_Recv(NULL, 0, MPI_INT, source, tag, commCalc, &status));
xdebugMsg(tag, source, nfinished);
xmpi(MPI_Recv(&i, 1, MPI_INTEGER, source,
tag, commCalc, &status));
}
xdebug("%s", "RECEIVED MESSAGE WITH TAG \"FINALIZE\""); xdebug("%s", "RECEIVED MESSAGE WITH TAG \"FINALIZE\"");
nfinished++; nfinished++;
xdebug("nfinished=%d, nProcsModel=%d", nfinished, nProcsModel); xdebug("nfinished=%d, nProcsModel=%d", nfinished, nProcsModel);
......
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