Commit 473c62e5 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Only flush file affected by timestamp change.

parent c579d861
......@@ -390,28 +390,26 @@ defTimestepPF(aFiledataPF *afd, int tsID)
/***************************************************************/
static void
flushOp(void *a, void *tsID)
flushOp(aFiledataPF *a, int tsID)
{
writePF((aFiledataPF *)a, ((aFiledataPF *)a)->fileID);
defTimestepPF((aFiledataPF *)a, (int)(intptr_t)tsID);
writePF(a, a->fileID);
defTimestepPF(a, tsID);
}
size_t fwPOSIXFPGUARDSENDRECV( int fileID, int tsID, const void *buffer, size_t len )
{
int error = 0;
int flush = 0;
int filled = 0;
aFiledataPF *afd;
afd = listSetGet(bibAFiledataPF, fileIDTestA, (void *)(intptr_t)fileID);
aFiledataPF *afd
= listSetGet(bibAFiledataPF, fileIDTestA, (void *)(intptr_t)fileID);
flush = ( tsID != afd->tsID ) ? 1 : 0;
bool flush = tsID != afd->tsID;
if ( flush == 1 )
if (flush)
{
xdebug ( "tsID = %d, flush buffer", tsID );
listSetForeach(bibAFiledataPF, flushOp, (void *)(intptr_t)tsID);
xdebug("fileID %d, tsID = %d, flush buffer", fileID, tsID);
flushOp(afd, tsID);
xmpi ( MPI_Barrier ( commInqCommColl ()));
}
......
Markdown is supported
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