<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
I notice an uninitialized MPI_Status object can make MPI_Get_count return a wrong result,<br>
when the data amount in the MPI operation is zero (although I only checked MPI-IO).<br>
Attached is a test program that uses MPI collective read where only root process has<br>
non-zero length data to read. The expected result from MPI_Get_count is 0 for all<br>
non-root process. To mimic an uninitialized MPI_Status object, I call memset to make<br>
the object non-zero.<br>
<br>
Here is the code fragment.<br>
<br>
    if (rank == 0) len = 10;<br>
    else len = 0;<br>
<br>
    MPI_File_read_all(fh, buf, len, MPI_BYTE, &status);<br>
<br>
    MPI_Get_count(&status, MPI_BYTE, &get_size);<br>
<br>
For process rank > 0, get_size may not be 0.<br>
<br>
<br>
Wei-keng<br>
<br>
</div>
</span></font></div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">_______________________________________________<br>
discuss mailing list     discuss@mpich.org<br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a></div>
</span></font></div>
</body>
</html>