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

Rename setTag to encodeFileOpTag.

parent 6df91ac5
......@@ -21,7 +21,9 @@ long initial_buffersize = 16 * 1024 * 1024;
/* 16 * 1024; */
/* 4 * 1024; */
int tagKey = 100;
enum {
tagKey = 100,
};
double accumProbe = 0.0;
double accumRecv = 0.0;
......@@ -34,7 +36,7 @@ char *token = "%";
/***************************************************************/
int setTag ( int ID, int sc )
int encodeFileOpTag(int ID, int sc)
{
return ID * tagKey + sc;
}
......
......@@ -39,7 +39,7 @@ struct fileOpTag
};
/* pio.c */
int setTag(int, int);
int encodeFileOpTag(int fileID, int command);
struct fileOpTag decodeFileOpTag(int);
/* pio_dbuffer.c */
......
......@@ -348,7 +348,7 @@ void writePF ( aFiledataPF *afd, int id )
amount = dbuffer_data_size ( afd->db );
amountL = ( long ) amount;
tag = setTag ( id, afd->command );
tag = encodeFileOpTag(id, afd->command);
xmpi ( MPI_Sendrecv ( &amountL, 1, MPI_LONG, specialRank, tag,
&offset, 1, MPI_LONG, specialRank, tag,
......@@ -534,8 +534,8 @@ void finalizePOSIXFPGUARDSENDRECV ( void )
int buffer = 0, tag, specialRank = commInqSpecialRankNode ();
MPI_Comm commNode = commInqCommNode ();
tag = setTag ( 0, IO_Finalize );
tag = encodeFileOpTag(0, IO_Finalize);
xmpi ( MPI_Send ( &buffer, 1, MPI_INT, specialRank, tag, commNode ));
if (!queueIsEmpty(bibAFiledataPF))
......
......@@ -107,7 +107,7 @@ sendP(remoteFileBuf *afd, int id)
double startTime;
amount = dbuffer_data_size ( afd->db );
tag = setTag(id, afd->command);
tag = encodeFileOpTag(id, afd->command);
xdebug("send buffer for %s, size: %zu bytes, command=%s, in",
afd->name, amount, command2charP[afd->command]);
......@@ -303,7 +303,7 @@ pioSendFinalize(void)
int buffer = 0, tag, specialRank = commInqSpecialRankNode ();
MPI_Comm commNode = commInqCommNode ();
tag = setTag(0, IO_Finalize);
tag = encodeFileOpTag(0, IO_Finalize);
xmpi(MPI_Send(&buffer, 1, MPI_INT, specialRank, tag, commNode));
xdebug("%s", "SENT MESSAGE WITH TAG \"IO_FINALIZE\" TO SPECIAL PROCESS");
......
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