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

Fix incorrect use of MPI_CHAR.

* Also add missing fail-safe wrapper.
parent 5c5f4d39
......@@ -146,9 +146,9 @@ writeMPINONB(aFiledataM *of)
rankNode, amount );
xmpi ( MPI_Wait ( & ( of->request ), &status ));
xmpi ( MPI_File_iwrite_shared ( of->fh, of->db->buffer, amount, MPI_CHAR,
& ( of->request )));
xdebug ( "%d bytes written for fileID=%d", amount, fileID );
xmpi(MPI_File_iwrite_shared(of->fh, of->db->buffer, amount, MPI_UNSIGNED_CHAR,
&of->request));
xdebug("%d bytes written for fileID=%d", amount, fileID);
/* change outputBuffer */
......
......@@ -266,7 +266,7 @@ void pioWriterAIO(void)
struct fileOpTag rtag = decodeFileOpTag(tag);
int messagesize;
xmpi (MPI_Get_count(&status, MPI_CHAR, &messagesize));
xmpi(MPI_Get_count(&status, MPI_UNSIGNED_CHAR, &messagesize));
xdebug ( "receive message from source=%d, id=%d, command=%d ( %s ), "
"messagesize=%d", source, rtag.id, rtag.command,
......@@ -280,7 +280,7 @@ void pioWriterAIO(void)
* sizeof (messageBuffer[0]));
char *pMB = messageBuffer;
xmpi(MPI_Recv(messageBuffer, messagesize, MPI_CHAR, source,
xmpi(MPI_Recv(messageBuffer, messagesize, MPI_UNSIGNED_CHAR, source,
tag, commNode, &status ));
char *filename = strtok(pMB, token);
......@@ -350,8 +350,9 @@ void pioWriterAIO(void)
bfd->nextOpIndex = ( bfd->nextOpIndex + 1 ) % nPrefStreams;
MPI_Recv((void *)bfd->ctrlBlks[bfd->currOpIndex].aio_buf,
messagesize, MPI_CHAR, source, tag, commNode, &status);
xmpi(MPI_Recv((void *)bfd->ctrlBlks[bfd->currOpIndex].aio_buf,
messagesize, MPI_UNSIGNED_CHAR,
source, tag, commNode, &status));
writePA(bfd, (size_t)messagesize);
......
......@@ -154,8 +154,8 @@ pioWriterStdIO(void)
tag = status.MPI_TAG;
rtag = decodeFileOpTag(tag);
xmpi ( MPI_Get_count ( &status, MPI_CHAR, &messagesize ));
xmpi(MPI_Get_count(&status, MPI_UNSIGNED_CHAR, &messagesize));
xdebug ( "RECEIVE MESSAGE FROM SOURCE=%d, ID=%d, COMMAND=%d ( %s ),"
"MESSAGESIZE=%d", source, rtag.id, rtag.command,
......@@ -169,8 +169,8 @@ pioWriterStdIO(void)
= xmalloc((size_t)messagesize * sizeof (messageBuffer[0]));
pMB = messageBuffer;
xmpi ( MPI_Recv ( messageBuffer, messagesize, MPI_CHAR, source,
tag, commNode, &status ));
xmpi(MPI_Recv(messageBuffer, messagesize, MPI_UNSIGNED_CHAR,
source, tag, commNode, &status));
xdebug("%s", "after recv, in loop");
......@@ -219,8 +219,8 @@ pioWriterStdIO(void)
xdebug("COMMAND %s, ID=%d, NAME=%s", command2charP[rtag.command],
rtag.id, bfd->name);
xmpi(MPI_Recv(bfd->fb->buffer, messagesize, MPI_CHAR, source, tag,
commNode, &status));
xmpi(MPI_Recv(bfd->fb->buffer, messagesize, MPI_UNSIGNED_CHAR,
source, tag, commNode, &status));
writeP(bfd, amount);
break;
......
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