Commit 573af921 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Assign negative IDs to RPC entries.

* This will later ease distinguishing both in the MPI window index.
parent 06feab31
......@@ -521,8 +521,8 @@ void pioBufferFuncCall(int funcID, int argc, ... )
int tokenSep = SEPARATOR, tokenFuncCall = FUNCCALL;
size_t size = 0;
xassert(funcID >= 0 && funcID < nFuncs);
xdebug("%s, func: %s", "START", funcMap[funcID]);
xassert(funcID >= MINFUNCID && funcID <= MAXFUNCID);
xdebug("%s, func: %s", "START", funcMap[(-1 - funcID)]);
if ( rankGlob != root ) return;
......@@ -566,7 +566,7 @@ void pioBufferFuncCall(int funcID, int argc, ... )
sizeof ( tokenSep ));
}
xdebug ( "WROTE FUNCTION CALL IN BUFFER OF WINS: %s, streamID=%d",
funcMap[funcID], streamID );
funcMap[(-1 - funcID)], streamID );
}
break;
case STREAMOPEN:
......@@ -611,7 +611,7 @@ void pioBufferFuncCall(int funcID, int argc, ... )
xdebug("WROTE FUNCTION CALL IN BUFFER OF WINS: %s, filenamesz=%zu,"
" filename=%s, filetype=%d",
funcMap[funcID], filenamesz, filename, filetype );
funcMap[(-1 - funcID)], filenamesz, filename, filetype );
}
break;
case STREAMDEFVLIST:
......@@ -648,7 +648,7 @@ void pioBufferFuncCall(int funcID, int argc, ... )
xdebug ( "WROTE FUNCTION CALL IN BUFFER OF WINS: %s, streamID=%d,"
" vlistID=%d",
funcMap[funcID], streamID, vlistID );
funcMap[(-1 - funcID)], streamID, vlistID );
}
break;
default:
......
......@@ -42,8 +42,8 @@ enum
#define MAXWINBUFFERSIZE ((size_t)512 * 1024 * 1024)
enum { nFuncs = 3, STREAMOPEN = 0, STREAMDEFVLIST = 1, STREAMCLOSE = 2 };
enum { MAXDATAFILENAME = 256, MINFUNCID = STREAMOPEN, MAXFUNCID = STREAMCLOSE };
enum { nFuncs = 3, STREAMOPEN = -1, STREAMDEFVLIST = -2, STREAMCLOSE = -3 };
enum { MAXDATAFILENAME = 256, MINFUNCID = STREAMCLOSE, MAXFUNCID = STREAMOPEN };
extern char * funcMap[nFuncs];
void rpcUnpackResources ( char *, int, MPI_Comm );
......
......@@ -182,7 +182,7 @@ static
streamClose ( streamID );
xdebug ( "READ FUNCTION CALL FROM WIN: %s, streamID=%d,"
" closed stream",
funcMap[funcID], streamID );
funcMap[(-1 - funcID)], streamID );
}
break;
case STREAMOPEN:
......@@ -204,7 +204,7 @@ static
streamID = streamOpenWrite ( filename, filetype );
xdebug("READ FUNCTION CALL FROM WIN: %s, filenamesz=%zu,"
" filename=%s, filetype=%d, OPENED STREAM %d",
funcMap[funcID], filenamesz, filename,
funcMap[(-1 - funcID)], filenamesz, filename,
filetype, streamID);
free(filename);
}
......@@ -220,7 +220,7 @@ static
streamDefVlist ( streamID, vlistID );
xdebug ( "READ FUNCTION CALL FROM WIN: %s, streamID=%d,"
" vlistID=%d, called streamDefVlist ().",
funcMap[funcID], streamID, vlistID );
funcMap[(-1 - funcID)], streamID, vlistID );
}
break;
default:
......
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