<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">Ok.</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
Here is detailed explanation.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">There is example 5.22 on page 182 in mpi22-report.pdf, which can be found here <a href="http://www.mpi-forum.org/docs/docs.html" target="_blank" style="color:rgb(17,85,204)">http://www.mpi-forum.org/docs/docs.html</a></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
Here is test code <a href="http://pastebin.com/ZhYfhDVK" target="_blank" style="color:rgb(17,85,204)">http://pastebin.com/ZhYfhDVK</a> (same code here <a href="http://www.everfall.com/paste/id.php?0b7mgk2zh0xg" target="_blank" style="color:rgb(17,85,204)">http://www.everfall.com/paste/id.php?0b7mgk2zh0xg</a>, just in case)</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
If i run this code using openmpi in archlinux, i get the following result (as expected, in accordance with info from mpi22-report.pdf).</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">mpicc code.c -o openmpi_version (mpicc from openmpi package, mpich is not installed in archlinux)</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">mpirun -n 8 ./openmpi_version </span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
<span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">0       0 1.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">1       0 2.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
<span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">2       1 1.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">3       1 2.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
<span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">4       1 3.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">5       0 1.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
<span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">6       0 2.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">7       1 1.000000  <===== 1, as expected</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">But if i run this code using mpich2 in </span><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">ubuntu 10.04, (mpich package version 1.2.1.1), i get unexpected result. It was also tested in </span><span style="line-height:21px;font-size:15px;font-family:Arial,sans-serif">mpich2-1.4.1p1 and</span><span style="line-height:21px;font-size:15px;font-family:Arial,sans-serif"> mpich2-1.5 in Windows 7 and Ubuntu 10.04.2 respectively.</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="line-height:21px;font-size:15px;font-family:Arial,sans-serif">mpicc code.c -o mpich_version (mpicc from mpich2 package, openmpi is not installed in ubuntu)</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">mpirun -n 8 ./mpich_version</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
<span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">0       0 1.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">1       0 2.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
<span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">2       1 1.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">5       0 1.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
<span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">3       1 2.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">4       1 3.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">
<span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">6       0 2.000000</span><br style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">7       1 3.000000 <===== expected to be 1</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="line-height:21px;font-size:15px;white-space:pre-wrap;font-family:Arial,sans-serif">Also, in openmpi version output is sorted, in accordance with code in lines 60-73 (see pastebin), but in mpich2 this does not work as expected too.</span></div>
<br><div class="gmail_quote">On Tue, Dec 18, 2012 at 11:25 PM, Dave Goodell <span dir="ltr"><<a href="mailto:goodell@mcs.anl.gov" target="_blank">goodell@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Dec 18, 2012, at 4:47 AM CST, n n wrote:<br>
<br>
> I think, i've found a bug in function mpi_scan<br>
<br>
</div>Would you care to share any details of the bug on the mailing list?  Forgive my caution, but you have a somewhat spammy looking email address and email name and wrote a rather terse email...<br>
<br>
-Dave<br>
<br>
_______________________________________________<br>
discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
</blockquote></div><br>