Commit 6b66e0ed authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Get rid of legacy timers.

parent 1041ac80
......@@ -29,13 +29,6 @@ long initial_buffersize = 16 * 1024 * 1024;
/* 16 * 1024; */
/* 4 * 1024; */
double accumProbe = 0.0;
double accumRecv = 0.0;
double accumSend = 0.0;
double accumSuspend = 0.0;
double accumWait = 0.0;
double accumWrite = 0.0;
char *token = "%";
/***************************************************************/
......
......@@ -17,8 +17,6 @@
extern long initial_buffersize;
extern double accumWait;
typedef struct
{
size_t size;
......@@ -86,7 +84,6 @@ destroyAFiledataMPINONB(void *v)
aFiledataM *of;
MPI_Status status;
int rankNode = commInqRankNode ();
double startTime;
MPI_Offset endpos;
of = (aFiledataM * ) v;
......@@ -95,11 +92,8 @@ destroyAFiledataMPINONB(void *v)
rankNode, of->fileID, of->name );
/* close file */
startTime = MPI_Wtime ();
xmpi ( MPI_Wait ( & ( of->request ), &status ));
xmpi(MPI_Wait(&of->request, &status));
xmpi(MPI_Barrier(commInqCommNode()));
accumWait += ( MPI_Wtime () - startTime );
xmpi(MPI_File_get_position_shared(of->fh, &endpos));
xmpi(MPI_File_set_size(of->fh, endpos));
iret = MPI_File_close ( & ( of->fh ));
......@@ -224,7 +218,6 @@ int fcMPINONB ( int fileID )
{
aFiledataM *of;
int iret;
double accumWaitMax;
MPI_Comm commNode = commInqCommNode ();
int rankNode = commInqRankNode ();
......@@ -237,21 +230,7 @@ int fcMPINONB ( int fileID )
writeMPINONB(of);
/* remove file element */
iret = listSetRemove(bibAFiledataM, fileIDTest, (void *)(intptr_t)fileID);
/* timer output */
if ( ddebug == MAXDEBUG )
{
xmpi ( MPI_Reduce ( &accumWait, &accumWaitMax,
1, MPI_DOUBLE, MPI_MAX, 0, commNode ));
xdebug ( "IOPE%d: Wait time %15.10lf s",
rankNode, accumWait );
if ( rankNode == 0 )
xdebug ( "IOPE%d: Max wait time %15.10lf s",
rankNode, accumWaitMax );
}
int iret = listSetRemove(bibAFiledataM, fileIDTest, (void *)(intptr_t)fileID);
return iret;
}
......
......@@ -31,9 +31,6 @@ extern char * command2charP[6];
extern char *token;
extern double accumSuspend;
extern double accumWrite;
typedef struct
{
......@@ -105,7 +102,6 @@ destroyBFiledataPA ( void *v )
ssize_t ssiret;
int nextFinishOp = (bfd->nextOpIndex - bfd->prefIndex + nPrefStreams)
% nPrefStreams;
double startTime;
xdebug ( "filename=%s, cleanup and close file", bfd->name );
......@@ -115,10 +111,6 @@ destroyBFiledataPA ( void *v )
{
xdebug("file: %s, prefIndex=%d", bfd->name, (int)bfd->prefIndex);
ccBP[0] = ( bfd->ctrlBlks + nextFinishOp );
if ( ddebug )
startTime = MPI_Wtime ();
do
{
iret = aio_suspend ( ccBP, 1, NULL );
......@@ -126,9 +118,6 @@ destroyBFiledataPA ( void *v )
}
while ( iret != 0 );
if ( ddebug )
accumSuspend += ( MPI_Wtime () - startTime);
iret = aio_error(bfd->ctrlBlks + nextFinishOp);
if (( ssiret = aio_return ( bfd->ctrlBlks + nextFinishOp )) == -1 )
xabort("aio_return () failed: %s", strerror(iret));
......@@ -170,7 +159,6 @@ writePA(bFiledataPA *bfd, size_t amount)
{
const struct aiocb *ccBP[1];
ssize_t iret;
double startTime;
xdebug ( "file %s, in", bfd->name );
......@@ -181,12 +169,8 @@ writePA(bFiledataPA *bfd, size_t amount)
bfd->name, bfd->ctrlBlks[bfd->currOpIndex].aio_nbytes,
bfd->ctrlBlks[bfd->currOpIndex].aio_offset );
if ( ddebug ) startTime = MPI_Wtime ();
iret = aio_write ( bfd->ctrlBlks + bfd->currOpIndex );
if ( ddebug ) accumWrite += ( MPI_Wtime () - startTime);
xdebug ( "after aio_write(), file %s, aio_nbytes=%zu, aio_offset=%zu,"
"iret=aio_write()=%d",
bfd->name, bfd->ctrlBlks[bfd->currOpIndex].aio_nbytes,
......@@ -205,10 +189,6 @@ writePA(bFiledataPA *bfd, size_t amount)
if ( bfd->prefIndex >= nPrefStreams )
{
ccBP[0] = ( bfd->ctrlBlks + bfd->nextOpIndex );
if ( ddebug )
startTime = MPI_Wtime ();
do
{
iret = aio_suspend ( ccBP, 1, NULL );
......@@ -216,9 +196,6 @@ writePA(bFiledataPA *bfd, size_t amount)
xabort ( "aio_suspend () failed" );
} while ( iret != 0 );
if ( ddebug )
accumSuspend += ( MPI_Wtime () - startTime);
if (( iret = aio_return ( bfd->ctrlBlks + bfd->nextOpIndex )) == -1 )
xabort ( "aio_return () failed" );
......
......@@ -12,7 +12,6 @@
#include "dmemory.h"
extern char *command2charP[];
extern double accumWait;
extern char *token;
extern long initial_buffersize;
......@@ -104,7 +103,6 @@ sendP(remoteFileBuf *afd, int id)
int tag;
size_t amount;
MPI_Status status;
double startTime;
amount = dbuffer_data_size ( afd->db );
tag = encodeFileOpTag(id, afd->command);
......@@ -112,12 +110,8 @@ sendP(remoteFileBuf *afd, int id)
xdebug("send buffer for %s, size: %zu bytes, command=%s, in",
afd->name, amount, command2charP[afd->command]);
if ( ddebug ) startTime = MPI_Wtime ();
xmpiStat(MPI_Wait(&(afd->request), &status), &status);
if ( ddebug ) accumWait += ( MPI_Wtime () - startTime );
/* FIXME: amount > INT_MAX unhandled */
xmpi(MPI_Issend(afd->db->buffer, (int)amount, MPI_UNSIGNED_CHAR,
commInqSpecialRankNode(), tag, commInqCommNode(),
......@@ -174,11 +168,8 @@ pioSendWrite(int id, int tsID, const void *buffer, size_t len)
flushOp(afd, tsID);
{
double startTime;
MPI_Status status;
if (ddebug) startTime = MPI_Wtime();
xmpiStat(MPI_Wait(&(afd->request), &status), &status);
if (ddebug) accumWait += MPI_Wtime() - startTime;
}
xmpi(MPI_Barrier(commInqCommColl()));
}
......@@ -209,10 +200,7 @@ pioSendWrite(int id, int tsID, const void *buffer, size_t len)
int
pioSendClose(int id)
{
double accumWaitMax;
remoteFileBuf *afd;
int iret;
xdebug ( "fileID %d: send buffer, close file and cleanup",id );
afd = listSetGet(bibRemoteFileBuf, fileIDTest, (void *)(intptr_t)id);
......@@ -226,18 +214,7 @@ pioSendClose(int id)
xmpi(MPI_Barrier(commInqCommColl()));
/* remove file element */
iret = listSetRemove(bibRemoteFileBuf, fileIDTest, (void *)(intptr_t)id);
/* timer output */
if ( ddebug )
{
enum { root = 0 };
xmpi(MPI_Reduce(&accumWait, &accumWaitMax,
1, MPI_DOUBLE, MPI_MAX, root, commInqCommColl()));
xdebug ( "Wait time %15.10lf s", accumWait );
if ( commInqRankColl () == root )
xdebug ( "Max wait time %15.10lf s", accumWaitMax );
}
int iret = listSetRemove(bibRemoteFileBuf, fileIDTest, (void *)(intptr_t)id);
return iret;
}
......
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